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

ScenarioOutput Data Requires Formatting #6

Closed
azohra opened this issue Feb 10, 2016 · 2 comments
Closed

ScenarioOutput Data Requires Formatting #6

azohra opened this issue Feb 10, 2016 · 2 comments

Comments

@azohra
Copy link
Collaborator

azohra commented Feb 10, 2016

Hey @rajatthareja ,

I am testing the new release and I have been thinking of how we can handle formatting ScenarioOutput data. One thing I find interesting is that the newlines show up if you inspect the HTML source, but they do not show up in the report.

I have made an album of images to show the issue in detail:
Cucumber ReportBuilder Output JSON Formatting Issue

  • Image 1, how it looks in HTML Report
  • Image 2, how it looks in Terminal
  • Image 3, how it looks when inspecting the HTML element in chrome
  • Image 4, how it looks in JSON

The \n are required for the terminal output and Cucumber directly writes whatever the Terminal receives into the JSON file. It would appear that we need to add a .gsub('\n', '< b r / >) when reading out this data from the JSON. I believe that would fix the issue.

Let me know what you think, or if you have a better idea.

@rajatthareja
Copy link
Owner

@tk8817
Added few gsub

output.gsub("\n",'</br>').gsub("\t",'&nbsp;&nbsp;').gsub(' ','&nbsp;')

@azohra
Copy link
Collaborator Author

azohra commented Feb 10, 2016

@rajatthareja just checked out master and the data looks perfect now -- matches Terminal output 100%. This issue can be closed.

@azohra azohra closed this as completed Feb 10, 2016
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

2 participants