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

html.report: step.text contains HTML elements in rendered HTML page #79

Closed
jenisys opened this issue Jun 8, 2023 · 2 comments
Closed
Labels
bug Something isn't working fixed

Comments

@jenisys
Copy link

jenisys commented Jun 8, 2023

Describe the bug
If a scenario contains steps with step.text (multi-line docstring), the output of this scenario contains <br/> HTML elements that are not part of the original output.

  • MAYBE: <br/> is contained in a <pre> ... </pre> HTML element ?!?

EXAMPLE:

# -- HINT: Copied from HTML page in web browser
Scenario:  Duplicated Step in same File   <-- COLLAPSABLE SECTION: For Scenario is here
  Given a new working directory
  And a file named "features/steps/alice_steps.py" with
    from behave import given, when, then<br><br>@given(u'I call Alice')<br> ... <-- PROBLEM-POINT 1 is HERE
  And a file named "features/duplicated_step_alice.feature" with
    Feature:<br> Scenario: Duplicated Step<br> Given I call Alice ...    <-- PROBLEM-POINT 2 is HERE.

To Reproduce
Steps to reproduce the behavior:

  1. Run behavex with step.duplicated_step.feature and inspect the HTML report after the test run

Expected behavior

  • Rendered HTML should not contain HTML elements (in step.text or ...), like: <br/>

Version Info:

  • behavex v2.0.2 (current HEAD of repository)
@anibalinn
Copy link
Collaborator

Fix implemented in the upcoming release branch release_2.0.2

@anibalinn anibalinn added fixed bug Something isn't working labels Jul 19, 2023
@anibalinn
Copy link
Collaborator

Fix released in version 3.0.0: https://pypi.org/project/behavex/3.0.0/
branch release_3.0.0
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed
Projects
None yet
Development

No branches or pull requests

2 participants