-
Notifications
You must be signed in to change notification settings - Fork 29
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
Updated logic for when the resultSummary gets set and updated #166
Updated logic for when the resultSummary gets set and updated #166
Conversation
7e3ef18
to
c0527a1
Compare
505506f
to
7cc3d99
Compare
if (resIndex > -1) { | ||
for (const test of data.testSuite.tests) { | ||
const testIndex = this.result[resIndex].testSuite.tests.findIndex( | ||
(tes) => tes.name === test.name, |
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 also excludes tests to be added per project that it fails - is this intentional? I would like it to report per project that fails a particular test.
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.
yea this was an oversight
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.
hey @willbertSmillbert are you good to fix this?
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.
@ryanrosello-og the project thing appeared resolved by #171 I will have a look at the attachment issue tomorrow
Noticed when using the reporter, that if the tests retry, the Results object would be erroneously populated. Refer to the below screenshot. In this example, there are 5 legitimate tests, with one of them retrying 5 times after failing, as you can see, the results array is getting pushed to each time, regardless if that result already exists. Further more, this is made even worse as each time the results array gets pushed to, the current testSuite state also gets pushed.
So instead of there being 1 test suite, 5 result getting pushed, there is the same test suite 5x being pushed
I decide to iterate over the existing results and then push to the array if the result does not exist, and modify the result if it does.
Note; a caveat to this implementation is that for failed tests, only the last instance of it failing will be in the results array
This saves having to do filtering later on, but I can update the logic slightly to push each time for test retries rather than replace