From 521ee21fce8d3842b95d14c4e3ef60b8cf8e4e7d Mon Sep 17 00:00:00 2001 From: Kpa-clawbot <259247574+Kpa-clawbot@users.noreply.github.com> Date: Thu, 26 Mar 2026 12:09:14 -0700 Subject: [PATCH] fix(test): move browser.close() after all E2E tests complete browser.close() on line 274 was firing before tests 14-16 executed, causing them to crash with 'Target page, context or browser has been closed'. Moved to after test 16, just before the summary block. Fixes 3 of 4 E2E failures (remaining 2 are data-dependent map tests). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- test-e2e-playwright.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test-e2e-playwright.js b/test-e2e-playwright.js index dd1df7aa..2983e8f8 100644 --- a/test-e2e-playwright.js +++ b/test-e2e-playwright.js @@ -271,8 +271,6 @@ async function run() { }); }); - await browser.close(); - // Test 14: Live heatmap opacity stored in localStorage await test('Live heatmap opacity persists in localStorage', async () => { // Verify localStorage key works (no page load needed — reuse current page) @@ -315,6 +313,8 @@ async function run() { await page.setViewportSize({ width: 1280, height: 720 }); }); + await browser.close(); + // Summary const passed = results.filter(r => r.pass).length; const failed = results.filter(r => !r.pass).length;