-
Notifications
You must be signed in to change notification settings - Fork 32
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
test(e2e): restore report generation and fix location of received images #3145
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
The report was no longer generated and the development server did not stop at the end of the test execution. This was due to our custom function `toMatchImageSnapshot` becoming asynchronous in commit bffd25b. The original function is synchronous, so the custom function must be too. In addition to this fix, the logic of the code managing image attachments has been improved, mainly to better separate responsibilities. Storing the expected image copy and calculating the image location are specific to j-i-s, so there's no need to do this. to j-i-s, and are therefore performed first. The function for attaching images to the report only uses the previously calculated image location and is unaware that j-i-s is being used. For tests that redefined the location of output images (usually in a subfolder), the path to the received images was not updated accordingly. It was stored in the same location for each test, so only one file was kept and not stored with the diff and the expected image.
- disable "fit on load" to generate e2e test errors - disable panning and mouse zoom to generate e2e test errors - reproduce the pb with overlays tests
This reverts commit 8e53f9fcb52b028d168d448316b567b39ddd997e.
tbouffard
added
the
chore
Build, CI/CD or repository tasks (issues/PR maintenance, environments, ...)
label
Aug 16, 2024
csouchet
reviewed
Aug 21, 2024
csouchet
approved these changes
Aug 21, 2024
ℹ️ Converted to draft to take the time to integrate review feedback. |
Quality Gate passedIssues Measures |
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.
When an test failure occurred, the report was not generated and the development server did not stop at the end of the test execution.
This was due to our custom function
toMatchImageSnapshot
becoming asynchronous in commit bffd25b.The original function is synchronous, so the custom function must be too.
In addition to this fix, the logic of the code managing image attachments has been improved, mainly to better separate responsibilities.
Storing the expected image copy and calculating the image location are specific to j-i-s, so there's no need to do this. to j-i-s, and are therefore performed first.
The function for attaching images to the report only uses the previously calculated image location and is unaware that j-i-s is being used.
For tests that redefined the location of output images (usually in a subfolder), the path to the received images was not updated accordingly. It was stored in the same location for each test, so only one file was kept and not stored with the diff and the expected image.
Also regenerate the image for the “subprocess.03.collapsed.with.elements” test.
Notes
First detection of problems fixed in this PR:
Error reproductions and progressive fix with the "overlays" e2e tests
Command run:
DEBUG=bv:test:jest:img npm run test:e2e -- --runTestsByPath test/e2e/overlays.rendering.test.ts
Examples of reports generated with all tests involving "custom received directory"