Skip to content

Conversation

@timvandermeij
Copy link
Contributor

@timvandermeij timvandermeij commented Jul 12, 2025

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 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 #18698 and then test still fails as expected.

Fixes #19811.
Fixes 68332ec.

Related to #20029.

…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.
@timvandermeij
Copy link
Contributor Author

/botio integrationtest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_integrationtest from @timvandermeij received. Current queue size: 0

Live output at: http://54.193.163.58:8877/b05f3e96f114dd1/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_integrationtest from @timvandermeij received. Current queue size: 0

Live output at: http://54.241.84.105:8877/07ea95fec55159a/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/07ea95fec55159a/output.txt

Total script time: 13.06 mins

  • Integration Tests: FAILED

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Success

Full output at http://54.193.163.58:8877/b05f3e96f114dd1/output.txt

Total script time: 28.61 mins

  • Integration Tests: Passed

Copy link
Contributor

@calixteman calixteman left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you.

@calixteman calixteman merged commit 9070a27 into mozilla:master Jul 13, 2025
7 checks passed
@timvandermeij timvandermeij deleted the fix-intermittent-viewer branch July 13, 2025 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Integration test "must check that canvas perfectly fits the page whatever the zoom level" permafails in Chrome

4 participants