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

cucumber-core: Use the docstring content type in the json formatter. #1265

Merged
merged 2 commits into from Sep 30, 2018

Conversation

rjwittams
Copy link
Contributor

@rjwittams rjwittams commented Oct 22, 2017

Summary

Docstring content type is currently not carried down into the json formatter.
This worked in 1.2.5.
PickleString did not have the corresponding field, so I added that in:
cucumber/common#292
(The mono repo PR is required for this one to compile, so this will fail CI).

#1263
Fixing this bug.

Passes the contentType field down into the map that gets json serialized.
Uses the content_type name to match 1.2.5 and other language reports.

Motivation and Context

#1263

How Has This Been Tested?

Unit test added.
All tests run, Pax Exam Calculator Test appears to be broken before this change, due to a deployment issue?

Screenshots (if appropriate):

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:

  • I've added tests for my code.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

I do not know if any docs need changing. I expect not as this is a regression from 1.2.5

@mlvandijk
Copy link
Member

mlvandijk commented Oct 22, 2017

@rjwittams Thank you for submitting a PR. Unfortunately the build fails due to a compilation error in cucumber-core:

[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /home/travis/build/cucumber/cucumber-jvm/core/src/main/java/cucumber/runtime/formatter/JSONFormatter.java:[253,51] cannot find symbol
symbol: method getContentType()
location: variable docString of type gherkin.pickles.PickleString

@rjwittams
Copy link
Contributor Author

I'm not sure if this is an automatic reply. It fails because the cucumber mono repo needs to apply its PR before this will work, as stated above. I didn't want to mess about with the versions in pom.xml before it made sense.

@@ -678,6 +678,68 @@ public void should_format_scenario_with_a_step_with_a_doc_string() throws Throwa
}

@Test
public void should_format_scenario_with_a_step_with_a_doc_string2() throws Throwable {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd suggest should_format_scenario_with_a_step_with_a_doc_string_and_content_type

@rjwittams
Copy link
Contributor Author

rjwittams commented Oct 22, 2017 via email

@mlvandijk
Copy link
Member

@rjwittams Not a bot ;) Sorry, I missed your comment about the PRs being related.

@brasmusson
Copy link
Contributor

Should cucumber/common#292 be accepted and the content type of doc strings be included in the Pickles, then it is convenient for the Json Formatter to get in from the Pickle, until then #1309 is fixing the regression from v1.x.x so that the content type is included in the Json Formatter output.

@stale
Copy link

stale bot commented Mar 8, 2018

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.

@stale stale bot added the ⌛ stale Will soon be closed by stalebot unless there is activity label Mar 8, 2018
@stale
Copy link

stale bot commented Mar 15, 2018

This issue has been automatically closed because of inactivity. You can support the Cucumber core team on opencollective.

@stale stale bot closed this Mar 15, 2018
@brasmusson
Copy link
Contributor

cucumber/common#292 has been accepted, now we just have to wait for a Gherkin release before this PR can be merged.

@brasmusson brasmusson reopened this Mar 15, 2018
@stale stale bot removed the ⌛ stale Will soon be closed by stalebot unless there is activity label Mar 15, 2018
@brasmusson brasmusson added the 🧷 pinned Tells Stalebot not to close this issue label Mar 15, 2018
@mpkorstanje mpkorstanje merged commit c27106e into cucumber:master Sep 30, 2018
@aslakhellesoy
Copy link
Contributor

Hi @rjwittams,

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:

  • ✅ Continue to use branches and pull requests. When someone on the core team approves a pull request (yours or someone else's), you're welcome to merge it yourself.
  • 💚 Commit to setting a good example by following and upholding our code of conduct in your interactions with other collaborators and users.
  • 💬 Join the community Slack channel to meet the rest of the team and make yourself at home.
  • ℹ️ Don't feel obliged to help, just do what you can if you have the time and the energy.
  • 🙋 Ask if you need anything. We're looking for feedback about how to make the project more welcoming, so please tell us!

On behalf of the Cucumber core team,
Aslak Hellesøy
Creator of Cucumber

@lock
Copy link

lock bot commented Sep 30, 2019

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.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🧷 pinned Tells Stalebot not to close this issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants