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

handle retry in html formatter #1631

Merged
merged 45 commits into from
Jul 1, 2021
Merged

Conversation

davidjgoss
Copy link
Contributor

@davidjgoss davidjgoss commented Jun 23, 2021

Details

  • Teach fake-cucumber about retry
  • Add a compatibility-kit feature for retry
  • Give query the smarts to get results from the latest attempt only
  • Move willBeRetried to TestCaseFinished
  • Update test data for json-formatter?

No React components actually need updating.

Motivation and Context

Fixes #1533, #902.

Our Ruby and JavaScript implementations support retry, but the HTML formatter and related tooling don't handle retried test cases at the moment.

This changes query (and thus the React components) to treat the last attempt that ran for any given test case as the "canonical" result. This is consistent with the Cucumber implementations' own reporting with builtin formatters.

Also an opportunity to resolve #902 (and thus cucumber/cucumber-js#1409) before any consumers start using that misplaced field.

Types of changes

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (in messages only) (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.
  • I have updated the CHANGELOG accordingly.

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.

This is a breaking change to messages, so don't forget a changelog entry there.

Great PR!!

@davidjgoss davidjgoss marked this pull request as ready for review June 25, 2021 08:46
@davidjgoss
Copy link
Contributor Author

davidjgoss commented Jun 25, 2021

Would be great to get this out in a patch release of cucumber-js so folks don't have to wait for 8.0.0 (this will have to be a breaking change actually, we do have consuming projects relying on the position of willBeRetried.

Copy link
Contributor

@aurelien-reeves aurelien-reeves left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍

@davidjgoss
Copy link
Contributor Author

@aslakhellesoy you okay with this one now?

@davidjgoss davidjgoss requested a review from aslakhellesoy July 1, 2021 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants