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

If < or > exists in a step name, it is removed from the report HTML #106

Closed
dawn-minion opened this issue Nov 21, 2019 · 5 comments · Fixed by #107
Closed

If < or > exists in a step name, it is removed from the report HTML #106

dawn-minion opened this issue Nov 21, 2019 · 5 comments · Fixed by #107

Comments

@dawn-minion
Copy link

Environment (please complete the following information):

  • multiple-cucumber-html-reporter: 1.13.1
  • Node.js version: v12.13.1
  • Yarn version: 1.19.1
  • Platform name and version: Ubutnu 19.10
  • Cucucmber version: 6.0.5

Config of multiple-cucumber-html-reporter

    reporter.generate({
        jsonDir: args.report,
        reportPath: args.output,
        customMetadata: true,
        displayDuration: true
    })

Describe the bug
We have a step that takes a string argument, and that argument often times has strings like this in it: <timestamp>. We use it to parse entries from a text file by searching for the string argument.

However, when we generate the report, the argument is changed to an empty string:
Screenshot from 2019-11-21 13-38-43

To Reproduce
Here is an example report I used to generate the above screenshot:

[
  {
    "keyword": "Feature",
    "name": "Test",
    "line": 1,
    "id": "test",
    "tags": [],
    "uri": "features/test.feature",
    "elements": [
      {
        "id": "test;wait-for-2-seconds",
        "keyword": "Scenario",
        "line": 2,
        "name": "Wait for 2 seconds",
        "tags": [],
        "type": "scenario",
        "steps": [
          {
            "arguments": [],
            "keyword": "Given ",
            "line": 3,
            "name": "we look for this text in the file \"<myTest>\"",
            "match": {
              "location": "features/steps/test.js:7"
            },
            "result": {
              "status": "passed",
              "duration": 0
            }
          }
        ]
      }
    ]
  }
]

Expected behavior
I would expect "" to appear in the report, and not an empty string. It's a bit confusing to have it stripped out, as the report does not match the actual step run.

@dawn-minion dawn-minion changed the title If < or > exist in a step name, it is removed from the report HTML If < or > exists in a step name, it is removed from the report HTML Nov 21, 2019
@dawn-minion
Copy link
Author

Looking at the output, it seems the browser interprets it as a tag, causing it not to be shown. Here's the above report:
Screenshot from 2019-11-21 13-46-08

@wswebcreation
Copy link
Collaborator

@dawn-minion
Copy link
Author

@wswebcreation Will do this morning, thanks for releasing it

@dawn-minion
Copy link
Author

Just tried the release, works great.

@wswebcreation
Copy link
Collaborator

Awesome, thanks for your time!

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

Successfully merging a pull request may close this issue.

2 participants