Skip to content

Fix intermittent failure in the "must check that a freetext is still here after having updated it and scroll the doc" freetext editor integration test - #21361

Merged
timvandermeij merged 1 commit into
mozilla:masterfrom
timvandermeij:is-canvas-monochrome
Jun 2, 2026

Conversation

@timvandermeij

@timvandermeij timvandermeij commented May 30, 2026 •

Copy link
Copy Markdown
Collaborator

The problem is that we screenshot the page itself rather than the canvas, even though we specifically care about the latter according to the comment, which means that we manually have to take care of hiding and showing the annotation editor. This is problematic because even though we signal that the annotation editor should be hidden, we don't wait until that is actually done, which leads to a situation where we can take the screenshot before the annotation editor is actually invisible in the view.

This commit fixes the issue by screenshotting the canvas instead, which avoids the need for manually hiding/showing the annotation editor. This makes the test less fragile, and matches other tests better.

Fixes #21362.

@codecov-commenter

codecov-commenter commented May 30, 2026 •

Copy link
Copy Markdown

Codecov Report

βœ… All modified and coverable lines are covered by tests.
βœ… Project coverage is 81.45%. Comparing base (327822c) to head (add30f3).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #21361      +/-   ##
==========================================
- Coverage   81.45%   81.45%   -0.01%     
==========================================
  Files         260      260              
  Lines       65829    65829              
==========================================
- Hits        53624    53622       -2     
- Misses      12205    12207       +2     
Flag Coverage Ξ”
integrationtest 66.72% <ΓΈ> (-0.02%) ⬇️
unittestcli 56.01% <ΓΈ> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

πŸš€ New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • πŸ“¦ JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@timvandermeij
timvandermeij force-pushed the is-canvas-monochrome branch from 96d1f17 to d1a764d Compare May 30, 2026 14:46
@timvandermeij
timvandermeij marked this pull request as ready for review May 30, 2026 14:46
@timvandermeij
timvandermeij requested a review from calixteman May 30, 2026 14:46
…there after having updated it and scroll the doc" freetext editor integration test

The problem is that we screenshot the page itself rather than the
canvas, even though we specifically care about the latter according to
the comment, which means that we manually have to take care of hiding and
showing the annotation editor. This is problematic because even though
we signal that the annotation editor should be hidden, we don't wait
until that is actually done, which leads to a situation where we can
take the screenshot before the annotation editor is actually invisible
in the view.

This commit fixes the issue by screenshotting the canvas instead, which
avoids the need for manually hiding/showing the annotation editor. This
makes the test less fragile, and matches other tests better.
@timvandermeij
timvandermeij force-pushed the is-canvas-monochrome branch from d1a764d to add30f3 Compare May 31, 2026 09:36

@calixteman calixteman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. Thank you.

@timvandermeij
timvandermeij merged commit 27b345a into mozilla:master Jun 2, 2026
14 checks passed
@timvandermeij
timvandermeij deleted the is-canvas-monochrome branch June 2, 2026 18:01

This branch was previously deployed

1 inactive deployment
code-coverage β€” add30f3c Deployed May 31, 2026 by timvandermeij via ubuntu-latest / chrome #593
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

3 participants