-
Notifications
You must be signed in to change notification settings - Fork 10
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
omit filtered-out pickles from counts, filters #273
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
davidjgoss
commented
Aug 24, 2022
@@ -27,6 +27,11 @@ export class EnvelopesQuery { | |||
public getTestRunFinished(): messages.TestRunFinished | undefined { | |||
return this.find((envelope) => !!envelope.testRunFinished)?.testRunFinished | |||
} | |||
|
|||
// TODO add to cucumber query |
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.
I'll raise a PR for cucumber-query. It can do this much more efficiently because it already has a map of pickle -> test case.
mpkorstanje
approved these changes
Sep 13, 2022
7 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🤔 What's changed?
When considering pickles, for things like stats and search filters, omit any that don't have a corresponding test case, meaning they were never meant to be executed in this test run.
This would intentionally not omit pickles that were skipped via
return 'skipped'
etc, or pickles that were supposed to be run but never were because of fail fast behaviour or an error.⚡️ What's your motivation?
Fixes cucumber/html-formatter#49. Pickles that were filtered out on the basis of location, name, or tags would show up in the stats as unknown. They should just be omitted.
On the linked issue there is some discussion of listing or otherwise noting the filtered-out scenarios. I think that's a good idea but keeping this change to just the fix as I think that's valuable enough in itself.
🏷️ What kind of change is this?
Notes
Testing is a bit scrappy. I copied some messages from an example test run of cucumber-js. Really this should be generated on the fly by fake-cucumber, but it would need to have filtering capabilities added; I'll pick this up separately.
Looking at these components again highlights to me that they could benefit from being more React-y e.g. tucking away logic in hooks, keeping component code mostly about display. This could benefit custom component authors as well if we exposed some useful hooks. I'll raise a separate issue for that and maybe do a little POC.
📋 Checklist:
This text was originally generated from a template, then edited by hand. You can modify the template here.