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 not rendering multiline pystring json object #109

Open
nodeJerry opened this issue May 29, 2019 · 15 comments
Open

Report not rendering multiline pystring json object #109

nodeJerry opened this issue May 29, 2019 · 15 comments

Comments

@nodeJerry
Copy link

My report will not render/ display the multiline json object.
when i inspect the html in the browser.
I can see the json data.
But it is just not rendered.

@nodeJerry
Copy link
Author

Can any one give some insight to this ?

for example

the "i send post request ....... with body:

will not output in the report.

image

@PurHur
Copy link
Collaborator

PurHur commented Sep 3, 2019

Can you provide a screenshot of the generated html so we do not have to setup your test?

@nodeJerry
Copy link
Author

Thank you for coming back to me PurHur. While examining this a little more. I believe i am not actually seeing a lot of data.

I have taken the html from webpage behind firewall in our staging environment. and pasted it in to brackets, and then presented it to a browser.

Some UI objects are being presented which i can not see behind firewall.

@nodeJerry
Copy link
Author

image

@nodeJerry
Copy link
Author

So the items with the arrows are not being presented behind firewall

@nodeJerry
Copy link
Author

getting only one error behind firewall

image

@nodeJerry
Copy link
Author

the read me on https://packagist.org/packages/emuse/behat-html-formatter
does not show the ui elements pointed to by the arrows

@nodeJerry
Copy link
Author

Why is my scenario-overview hidden

@PurHur
Copy link
Collaborator

PurHur commented Sep 3, 2019

You showed two diffrent reports. The first one (without the arrows) is the old behat2 report style. You can use that with --format behat2

The second one is the twig template which requires jquery and bootstrap to load from external servers.

I guess the error is happening because your firewall blocked: https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js (and the other resources)

I will merge #114 soon so you can change the template for your needs.

@nodeJerry
Copy link
Author

Thanks again for your help PurHur.

As you can see this is REST API tesging.

Two years ago i made a fork and i created https://github.com/ijerry/BehatHtmlFormatterPlugin
for the report to work behind firewall.
So behind the firewall i can access these resources with this change.

So I am working off Twig version of the report. Not older version

So how can i get the new version of the report display the "Scenario-overview" part of the report ?

Also in the below diagram around the "STAR" graphic; How can i get the report to display the information here " a JSON PAYLOAD"

@nodeJerry
Copy link
Author

image

@zanderFortinbras
Copy link

@PurHur
I am having this problem

@zanderFortinbras
Copy link

image

@zanderFortinbras
Copy link

I am trying to print out the pystring directly because
$body_string = $string->getRaw();
$json_string = json_encode($body_string, JSON_PRETTY_PRINT);
echo($json_string);

@PurHur
Copy link
Collaborator

PurHur commented Jun 21, 2024

@zanderFortinbras
This is expected because the default templates for the test results are quite old and non responsive.

You can define your own template or change the old one to something more elaborate. If you done that feel free to make a PR i will include all templates of the community in this repo if you want to share.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants