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

Using Hierarchical Tags in 1.2.0 is broken when generating html report #868

Closed
jadhindieh opened this issue Apr 6, 2022 · 8 comments · Fixed by #872 or #894
Closed

Using Hierarchical Tags in 1.2.0 is broken when generating html report #868

jadhindieh opened this issue Apr 6, 2022 · 8 comments · Fixed by #872 or #894
Assignees

Comments

@jadhindieh
Copy link

I tried creating Hierarchical tags in jgiven 1.2.0 and the html report never opens. using a single tag in the 1.2.0 we do get an html report.

To reproduce:

  • create a parent tag
  • create a child tag and annotate it with parent
  • add the child annotation to the test case
  • generate the html report
  • check the results

I have tested this scenario on 0.17.1 and I was able to get an html report, but when I upgrade to 1.2.0, I lose the html report.
please find attached the screenshots of scenario and results:

  • jgiven version:

Screenshot 2022-04-06 at 11 44 12

  • tags:

Screenshot 2022-04-06 at 11 44 26

Screenshot 2022-04-06 at 11 44 32

  • html tags results:

Screenshot 2022-04-06 at 11 43 58

  • jgiven version:

Screenshot 2022-04-06 at 11 51 02

  • no change to code

  • html tags results:

Screenshot 2022-04-06 at 11 50 40

@l-1squared
Copy link
Collaborator

Hi,
thanks for informing me about the issue. I will attempt to solve the issue as soon as possible (probably monday)

@l-1squared
Copy link
Collaborator

Managed to reproduce the bug. Feature still seems to work with version 1.1.0

@l-1squared
Copy link
Collaborator

apparently the issue occurs with this commit: fd97825. It appears that the parent tags do not get written into the tagMap.js anymore.
Will continue investigation tomorrow

@l-1squared
Copy link
Collaborator

Identified the root cause. There was a side-effect in the tag creation process that seemed irrelevant but actually ensured that the report model knew the parent tags of a given tag.

@jadhindieh
Copy link
Author

Thank you for the fast resolution

@jadhindieh
Copy link
Author

jadhindieh commented May 25, 2022

I just restarted working on the project and used the version 1.2.1.
There is still an issue after the fix. If a new issue is required please let me know. I will provide the new issue details here for now:

The issue is as follows: if we have 3 layers ( Parent, child, child of child (grandchild) ) the report will be generated, however the tags will get messed up.
supposing I have a tag Parent, I create a new tag Child and annotate it with Parent. then I create a new Tag GChild and I annotate this one with Child. the expected behavior is that we get 3 nested tags: Parent -> Child -> GChild. The actual behavior is that the GChild is showing as a child of the Parent.
Please refer to the screenshots for the Expected (extracted from version 1.1.0) vs Actual ( V1.2.1)
V1.1.0:
Screenshot 2022-05-25 at 15 33 12

V1.2.1:
Screenshot 2022-05-25 at 15 34 31

@l-1squared
Copy link
Collaborator

@jadhindieh Thanks for reporting. I have an idea how that came to pass.

@l-1squared l-1squared reopened this May 31, 2022
@l-1squared l-1squared linked a pull request May 31, 2022 that will close this issue
@l-1squared
Copy link
Collaborator

@jadhindieh I think I found the cause, but I want to take some more time to consolidate the code and maybe come up with another test or two.

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