Commit 860604e
test: wait for stable page height before visual snapshots
After the Playwright 1.57 -> 1.60 (Chromium) bump in #400, math-heavy
fixture pages on mobile-chrome intermittently settled ~60px shorter
than their baselines (2888-2891px vs 2950px, varying between retries
of the same run). toHaveScreenshot fails on any full-page dimension
mismatch before pixel tolerances apply, so these flaked regardless of
the maxDiffPixelRatio already granted to math pages.
waitForReady now waits for document.fonts.ready and then polls until
the document height is unchanged for three consecutive 250ms polls,
replacing the fixed 500ms sleep after MathJax typesetting.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 0258896 commit 860604e
2 files changed
Lines changed: 29 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
17 | 25 | | |
18 | 26 | | |
19 | 27 | | |
| |||
24 | 32 | | |
25 | 33 | | |
26 | 34 | | |
27 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
28 | 55 | | |
29 | 56 | | |
30 | 57 | | |
| |||
0 commit comments