-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 JSON Formatter #1580
Fix JSON Formatter #1580
Conversation
Tests are passing locally |
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.
Thanks a lot for your contribution!
I have a few comments, but no big deal actually 💪
@aurelien-reeves Something else I noticed, the JSON formatter no longer has expanded docstrings for Scenario Outlines. Is there a reason to use the step_source from the lookup here rather than the multiline_arg from the test_step like it used to. https://github.com/cucumber/cucumber-ruby/blob/main/lib/cucumber/formatter/json.rb#L178 It seems like the cucumber gets parsed 3 times, by the old cucumber-core code, the messages code, and the cucumber-gherkin code, and the one it's using here is the only one that doesn't have the expanded docstring text. |
Well, this is beyond my knowledge actually 😅 |
Sorry, I haven't made any significant changes to this file for over a decade. |
I guess I'll ping @brasmusson since he made the most recent change to the relevant code, and otherwise I'll update it to what I said, using the property from |
Don't hesitate to submit PRs 👍 |
My hesitation is that it'd be reverting a change, and I don't understand why the change was made in the first place, lol. |
If some tests are broken, we will have the opportunity to dig deeper and discuss it 😃 Please note that we won't maintain the JSON formatter our-self - the mainteners - anymore. We won't deprecate and remove it either because it is used a lot, but we want to promote the messages formatter instead. That said, we won't reject contributions to the JSON formatter. Of course we may have some feedback depending on the impact those contributions may have, but they will always be welcome. |
@eraffel-MDSol do you want to do something else with that PR? Or is it ready to be merged? |
Yea, I still want to fix the issue with placeholders in doc strings. I'll try to get to it this week. Just been busy. Thanks! |
No worries, no rush :) |
@aurelien-reeves I pushed my changes to support doc strings in Scenario Outlines |
@eraffel-MDSol it looks good, thanks 👍 |
Thanks a lot @eraffel-MDSol 🤩 |
Hi @eraffel-MDSol, Thanks for your making your first contribution to Cucumber, and welcome to the Cucumber committers team! You can now push directly to this repo and all other repos under the cucumber organization! 🍾 In return for this generous offer we hope you will:
On behalf of the Cucumber core team, |
Description
With the change to the JSON class, passing pretty as a parameter no longer does anything.
pretty_generate
should be called for the desired output.End of the background is also broken if the user has Before hooks that come from libraries other than this one.
Type of change
Checklist:
Your PR is ready for review once the following checklist is
complete. You can also add some checks if you want to.
bundle exec rubocop
reports no offenses