Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report CSS breaks with snippet highlight endpoint #400

Open
camilamaia opened this issue Jun 11, 2021 · 14 comments
Open

Report CSS breaks with snippet highlight endpoint #400

camilamaia opened this issue Jun 11, 2021 · 14 comments
Assignees
Labels
Bug Something isn't working Reporter Related with the API doc generated by ScanAPI
Projects

Comments

@camilamaia
Copy link
Member

camilamaia commented Jun 11, 2021

Bug report

Environment

  • Operating System: MacOS
  • ScanAPI version: 2.4.0

Description of the bug

Report CSS breaks when ScanAPI hits snippet highlight endpoint from Demo API.
image

image

Expected behavior ?

The report should look like this:

image

but showing the snippets highlight endpoint too.

How to reproduce the bug ?

@camilamaia camilamaia added Bug Something isn't working Needs Triage Needs triage from the maintainer or core devs. Reporter Related with the API doc generated by ScanAPI and removed Needs Triage Needs triage from the maintainer or core devs. labels Jun 11, 2021
@hebertjulio hebertjulio self-assigned this Jul 5, 2021
@hebertjulio
Copy link
Member

hebertjulio commented Jul 5, 2021

Hey @camilamaia ,

When I runned scanapi using the scanapi-400 branch, I receive a HTML code as response.

Screenshot from 2021-07-05 18-19-51

Something changed?

Thanks

@hebertjulio hebertjulio added this to In progress in Improve UX Jul 5, 2021
@camilamaia
Copy link
Member Author

@hebertjulio 🤔 Which browser are you using?

@camilamaia
Copy link
Member Author

I tested it here again with

  • safari Version 14.1.1 (16611.2.7.1.4)
  • firefox 89.0.2 (64-bit)
  • chrome Version 91.0.4472.114 (Official Build) (x86_64)

and they all have the same behavior I described before.

Would you mind downloading directly this file and trying to open it? https://github.com/scanapi/examples/blob/scanapi-400/demo-api/scanapi-report.html to see what happens.

@hebertjulio
Copy link
Member

@camilamaia I am using firefox 89.0.2 (64-bit). I think this is related to the body of response or render of report. I running again and get same result, I can not reproduce it. 🤔

P.S. When I open your report file I can see CSS breaks.

@camilamaia
Copy link
Member Author

@hebertjulio weird.... which ScanAPI version and Python version are you using? Here is my setup:

(scanner-test)
▶ pip freeze
appdirs==1.4.4
certifi==2020.12.5
chardet==3.0.4
click==7.1.2
curlify2==1.0.0
idna==2.10
Jinja2==2.11.2
MarkupSafe==1.1.1
PyYAML==5.3.1
requests==2.24.0
responses==0.12.1
scanapi==2.4.0
six==1.15.0
urllib3==1.25.11
(scanner-test)
▶ python --version
Python 3.6.10

Let me try to upgrade Python and see what happens

@camilamaia
Copy link
Member Author

With Python 3.9.0 i got the same scenario as before... 🤔

@camilamaia
Copy link
Member Author

@Pradhvan or @marcuxyz do you have any ideas here? Would you mind trying it too so we can compare?

@camilamaia
Copy link
Member Author

@hebertjulio one idea would be to compare the source code of the two different reports and see what are the differences.

@hebertjulio
Copy link
Member

I am running.

Python 3.9.5

Package    Version
---------- ---------
appdirs    1.4.4
certifi    2020.12.5
chardet    3.0.4
click      7.1.2
curlify2   1.0.0
idna       2.10
Jinja2     2.11.2
MarkupSafe 1.1.1
pip        21.0.1
PyYAML     5.3.1
requests   2.24.0
responses  0.12.1
scanapi    2.4.0
setuptools 53.0.0
six        1.15.0
urllib3    1.25.11
wheel      0.36.2

Linux 13499 5.11.20-300.fc34.x86_64 #1 SMP Wed May 12 12:45:10 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

With Python 3.6.10, I had been issues with pip and poetry.

😢

@hebertjulio
Copy link
Member

I running again with Python 3.6.10 and take same result. This happen only on iOS? 🤔

@camilamaia
Copy link
Member Author

Hmmmm, maybe! @barbosa can you give us a hand here? I think you are the only one besides me that is also using macOS. Would you mind trying to reproduce the error, please? Instructions are in the issue description.

@camilamaia
Copy link
Member Author

Oh, @astenstrasser also uses mac! Can you give us some help here, please? 😇

@barbosa
Copy link
Member

barbosa commented Jul 31, 2021

Hey @camilamaia - not sure if I understand what is broken. Is it the background that was supposed to be grey but it is white instead?

@camilamaia
Copy link
Member Author

Hey @camilamaia - not sure if I understand what is broken. Is it the background that was supposed to be grey but it is white instead?

Yes, exactly.

When you run locally, how is the background for you? And also, the content of the highlight response is an html code or is it the code block rendered?

Is it like this?

image

or like that?

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Reporter Related with the API doc generated by ScanAPI
Projects
No open projects
Improve UX
In progress
Development

No branches or pull requests

3 participants