-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Fix issue #128 #129
Fix issue #128 #129
Conversation
This fix should also be committed to version 1.5.0
Well done for finding the fix @sjieg! We will need a test to accept this patch though. You could try https://github.com/cucumber/cucumber-ruby-core/blob/master/spec/cucumber/core/ast/outline_step_spec.rb though it's quite low-level. There might be some higher-level integration tests somewhere that would be a better place to test it, but I don't have time to look for you right now. |
Thanks @mattwynne. I believe the test should be added in https://github.com/cucumber/cucumber-ruby-core/blob/master/spec/cucumber/core/compiler_spec.rb . Because it's compiler that expects the correct outline_step data to be returned to it. compiler_spec.rb:114 expect( visitor.test_case.location ).not_to eq visitor.test_step.location Maybe something like this, but I have little experience writing these kind of test cases. (Gherkin/Cucumber all the way here) Anyway, thanks for the response, let me know if there is anything else I can do to help. |
This will no doubt break formatter specs in Cucumber-Ruby, they could be updated, but it may also break behaviour we want to keep. |
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.
This PR cannot be merged (merge conflicts aside) because
-
if it would 5 rspec examples and 13 feature scenarios of https://github.com/cucumber/cucumber-ruby starts to fail. So a PR for https://github.com/cucumber/cucumber-ruby that when merged when this PR would be merged, the test of https://github.com/cucumber/cucumber-ruby passes.
-
Even though several of the instances of behavior changes of https://github.com/cucumber/cucumber-ruby are intentional (as the data produced by the Json formatter), this PR also breaks the
outline.feature
which should not change. Of course I am biased about this since I implemented that behavior, but I do believe that the stack trace should look like that (when read from the bottom); "from the outline step at line 6Given <state> without a table
, when it is expanded by the example row at line 12 toGiven failing without a table
, then the step definition/^failing without a table$/
is called, and that step definition failed".
I do not think there is a simple fix for #128, I think that the expanded step needs to know both the line of the outline step and the line of the example row, and be able to provide each of these to other classes requiring one or the other. It it quite likely that it when quacking like a step should return the outline step location, but it need also be able to provide the specific location, for outline step or example row, when asked for it.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs. |
This issue has been automatically closed because of inactivity. You can support the Cucumber core team on opencollective. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This fix should also be committed to version 1.5.0
Summary
See issue #128 for all reproduction information.
How Has This Been Tested?
I've run multiple scenario's locally. All data still seems to be correct and now the line number for Scenario Outlines are fixed.
Types of changes
Checklist: