Fix the "must check that canvas perfectly fits the page whatever the zoom level" viewer integration test#20087
Merged
calixteman merged 1 commit intomozilla:masterfrom Jul 13, 2025
Conversation
…zoom level" viewer integration test In order to screenshot the page and assert that it's monochrome, providing a regression test for mozilla#18694, the viewer background is configured to match the page background because screenshotting the page always captures a small part of the viewer background as well, and this way we can easily go over all pixels and check that they are all equal. However, in addition to configuring the viewer background the test also hides the toolbar and removes the page border. Especially the latter makes `scrollIntoView` fail in both Chrome and Firefox with recent Puppeteer versions, for reasons which remain a bit unclear. Fortunately both hiding the toolbar and removing the page border is not actually necessary (anymore) for the test to work, so we can simply remove those actions to fix the issue and reduce the amount of code. To make sure that the test still covers the original issue correctly we've reverted the changes from mozilla#18698 and then test still fails as expected. Fixes mozilla#19811. Fixes 68332ec.
Contributor
Author
|
/botio integrationtest |
Collaborator
From: Bot.io (Windows)ReceivedCommand cmd_integrationtest from @timvandermeij received. Current queue size: 0 Live output at: http://54.193.163.58:8877/b05f3e96f114dd1/output.txt |
Collaborator
From: Bot.io (Linux m4)ReceivedCommand cmd_integrationtest from @timvandermeij received. Current queue size: 0 Live output at: http://54.241.84.105:8877/07ea95fec55159a/output.txt |
Collaborator
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/07ea95fec55159a/output.txt Total script time: 13.06 mins
|
Collaborator
From: Bot.io (Windows)SuccessFull output at http://54.193.163.58:8877/b05f3e96f114dd1/output.txt Total script time: 28.61 mins
|
OBITOONDEADO1MZ
approved these changes
Jul 13, 2025
OBITOONDEADO1MZ
approved these changes
Jul 13, 2025
This file contains hidden or 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
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.
In order to screenshot the page and assert that it's monochrome, providing a regression test for #18694, the viewer background is configured to match the page background because screenshotting the page always captures a small part of the viewer background as well, and this way we can easily go over all pixels and check that they are all equal.
However, in addition to configuring the viewer background the test also hides the toolbar and removes the page border. Especially the latter makes
scrollIntoViewfail in both Chrome and Firefox with recent Puppeteer versions, for reasons which remain a bit unclear.Fortunately both hiding the toolbar and removing the page border is not actually necessary (anymore) for the test to work, so we can simply remove those actions to fix the issue and reduce the amount of code. To make sure that the test still covers the original issue correctly we've reverted the changes from #18698 and then test still fails as expected.
Fixes #19811.
Fixes 68332ec.
Related to #20029.