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

Gherkin unique picklestep ids #800

Merged
merged 6 commits into from
Nov 22, 2019
Merged

Conversation

vincent-psarga
Copy link
Contributor

@vincent-psarga vincent-psarga commented Nov 21, 2019

Summary

When gherkin computes the pickles in a feature file containing a Background, the PickleStep originating from the background all share the same id (which is obviously bad).

This fixes it.

How Has This Been Tested?

The feature testing the background has now 2 scenarios (and the GOLDEN Json generated from it shows 2 different ids for the steps).
Also, a new complex_background.feature file has been added, with a Background, another Background inside a Ruleand also a scenario with examples.

Types of changes

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).

Checklist:

  • The change has been ported to Java.
  • The change has been ported to Ruby.
  • The change has been ported to JavaScript.
  • The change has been ported to Go.
  • The change has been ported to .NET.
  • I've added tests for my code.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@vincent-psarga vincent-psarga marked this pull request as ready for review November 21, 2019 16:52
@vincent-psarga
Copy link
Contributor Author

Note: this also fix the last failing tests in #793 :)

Copy link
Contributor

@aslakhellesoy aslakhellesoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beautiful!

@aslakhellesoy aslakhellesoy merged commit 9d68d4e into master Nov 22, 2019
@aslakhellesoy aslakhellesoy deleted the gherkin-unique-picklestep-ids branch November 22, 2019 10:58
Ajwah pushed a commit to Ajwah/ex-gherkin that referenced this pull request Jul 23, 2020
In the past 6 months, `cucumber/cucumber`-repo has seen a variet of
changes all of which have been fixed with this commit:
  * background to have `id`
  * rule to have `id`
  * examples to have `id`
  * ensure to only strip leading and trailing spaces in table cells.
  Keep newline intact
  * ensure escaped delimiter within doc_string is not recorded as escaped
  * doc_string has field change: contentType -> mediaType
  * ignore comments on tags

See:
  cucumber/common#891
  cucumber/common#880
  cucumber/common#889
  cucumber/common#800

At the time of this commit, master for `cucumber/cucumber` was at:
a7c593f479e7ae739b49108f79bba4853352d99c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants