Skip to content

Empty Streamlit report when passing a config with one section #124

@sayalaruano

Description

@sayalaruano

Due to the changes from #108, an empty Streamlit report is created when a config with only one section is passed.

I tested it using the APICall config example. This is the output I got:

Image

I also tested the creation of various subsections and adding a component on each, and got the same empty report. The modified config looks like:


report:
  title: APICall example
  description: An APICall example.
sections:
  - title: APICall test
    subsections:
      - title: GET request test
        components:
          - title: GET request
            component_type: apicall
            api_url: https://jsonplaceholder.typicode.com/todos/1
            method: GET

      - title: POST request test
        components:
          - title: POST request
            component_type: apicall
            api_url: https://jsonplaceholder.typicode.com/todos
            method: POST
            request_body: |
              {
                  "userId": 1,
                  "title": "Go running",
                  "completed": false
              }.....

Finally, I changed the config by creating one section per component, and it worked:

Image

Updated config:

report:
  title: APICall example
  description: An APICall example.
sections:
  - title: GET Section
    subsections:
      - title: GET Subsection
        components:
          - title: GET request
            component_type: apicall
            api_url: https://jsonplaceholder.typicode.com/todos/1
            method: GET

  - title: POST Section
    subsections:
      - title: POST Subsection
        components:
          - title: POST request
            component_type: apicall
            api_url: https://jsonplaceholder.typicode.com/todos
            method: POST
            request_body: |
              {
                  "userId": 1,
                  "title": "Go running",
                  "completed": false
              }

So, there is an issue when only one section is defined.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions