Skip to content

Commit a87784f

Browse files
committed
test(site): isolate visual baselines from canvas
1 parent 8e2a4d6 commit a87784f

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

docs/visual-acceptance.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ The baseline covers:
1010
- focused navbar states, including the scrolled blur layer;
1111
- focused glass surfaces in normal and hover states;
1212
- CSS guards for active `backdrop-filter` and translucent glass backgrounds;
13+
- stable page baselines with the non-deterministic WebGL canvas hidden;
1314
- real scroll/anchor positions rather than isolated components.
1415

1516
There is also a non-baseline animation smoke test. It runs with reduced motion

tests/acceptance/design-baseline.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,11 @@ async function waitForScrolledNavbarEffect(page: Page) {
4747
}
4848

4949
async function waitForVisualReady(page: Page) {
50+
await page.addStyleTag({
51+
content: 'canvas { visibility: hidden !important; }',
52+
});
5053
await page.evaluate(() => document.fonts.ready);
51-
await page.locator('canvas').first().waitFor({ state: 'attached', timeout: 3_000 }).catch(() => undefined);
52-
await page.waitForTimeout(500);
54+
await page.waitForTimeout(300);
5355
}
5456

5557
const states = [

0 commit comments

Comments
 (0)