test(dashboard): organ-graph clears the renderer pref for a deterministic default

Graph persists its renderer choice ('field'|'classic') in localStorage. In a
full-suite run a prior test could leave 'classic', so this test — which asserts
the WebGPU Field is the active/default renderer — intermittently failed. Clear
the pref via addInitScript before navigating so it deterministically gets the
field-mode default. Passes now even when ordered right after the graph-using
birth-ritual suite.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Sam Valladares 2026-07-12 07:28:00 +07:00
parent 5a8d7bc1b7
commit 0b16709fbe

View file

@ -68,6 +68,18 @@ test.describe('/graph organ — real-data WebGPU memory field', () => {
}) => {
const capture = captureErrors(page);
// Graph persists its renderer choice in localStorage, and a prior test in
// the shared context may have left 'classic'. This test asserts the WebGPU
// FIELD is the active/default renderer, so clear the pref before navigating
// to get the deterministic default (field where WebGPU exists).
await page.addInitScript(() => {
try {
localStorage.removeItem('vestige-graph-renderer');
} catch {
/* ignore */
}
});
// ── 1. REACHABLE ──────────────────────────────────────────────────────
const canvas = await gotoRoute(page, GRAPH);
await expect(canvas).toBeAttached();