From 0b16709fbee2220cd58a9091100698c85a51516f Mon Sep 17 00:00:00 2001 From: Sam Valladares Date: Sun, 12 Jul 2026 07:28:00 +0700 Subject: [PATCH] test(dashboard): organ-graph clears the renderer pref for a deterministic default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- apps/dashboard/e2e/organ-graph.spec.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/apps/dashboard/e2e/organ-graph.spec.ts b/apps/dashboard/e2e/organ-graph.spec.ts index 64d6c6e..e6a44e2 100644 --- a/apps/dashboard/e2e/organ-graph.spec.ts +++ b/apps/dashboard/e2e/organ-graph.spec.ts @@ -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();