-
Notifications
You must be signed in to change notification settings - Fork 252
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
Fixes #604 - remove line overwriting for scenario outlines in cucumber formatter #605
Conversation
Go API Changes# summary Inferred base version: v0.13.0 Suggested version: v0.13.1 |
5a90497
to
8830791
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #605 +/- ##
==========================================
- Coverage 83.22% 83.21% -0.02%
==========================================
Files 28 28
Lines 3416 3413 -3
==========================================
- Hits 2843 2840 -3
Misses 458 458
Partials 115 115 ☔ View full report in Codecov by Sentry. |
8830791
to
4632c0a
Compare
4632c0a
to
47145eb
Compare
Hi @roskee , |
Hi @roskee, also as an example can be used this scenario Scenario: Support of Feature Plus Scenario Outline With Steps which can be executed before the change and after the change to observe changes in lines numbering |
Hi @roskee apologies for chasing on this, would you be able to have a look? |
Sorry for being late. I was very busy. I will take a look and let you know my thoughts. |
No problem, thank you. In essence the change aligns godog cucumber json reporting behavior for scenario outlines with other cucumber implementations so hopefully should be straight forward. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is the right way. I am not sure why step lines were being overwritten in the first place 🤷♂️
Thank you @roskee for confirming! |
🤔 What's changed?
Removing line overwrite from cucumber formatter
⚡️ What's your motivation?
The above code from cucumber/godog/fmt_cucumber.go overwrites the line property values of steps in cucumber reports (for Scenario Outlines only, regular Scenarios reports look good).
As a result, the step line property corresponds to the line in the Examples section rather than to the actual location of step within the feature file.
Due to the above, external tools that process the reports and use the line property for sorting the steps, display the steps out of order.
Other officially supported cucumber implementations (java, js, python, etc.) are generating reports correctly for Scenario Outline - line property corresponds to the actual location of step within the file rather than the line in Examples section.
🏷️ What kind of change is this?
♻️ Anything particular you want feedback on?
📋 Checklist:
This text was originally generated from a template, then edited by hand. You can modify the template here.