From a7e84cf5530379f8f3129e2ccd28efd36a3001fe Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN Date: Thu, 1 Oct 2026 09:12:13 -0400 Subject: [PATCH] TASK-conversation-console-workflow await completed scroll input before refresh --- docs/TEST_INTEGRITY.md | 2 +- test/fleet/console-view-navigation.test.mjs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/TEST_INTEGRITY.md b/docs/TEST_INTEGRITY.md index 899bc31..a00c692 100644 --- a/docs/TEST_INTEGRITY.md +++ b/docs/TEST_INTEGRITY.md @@ -2620,7 +2620,7 @@ test_integrity_note: determinism_controls: - "The existing isolated sample Console, fixed Playwright clock, and fixed desktop/mobile viewports" - "Manager-wakes routing uses the existing isolated sample Console, a deterministic two-frame first-generation layout-completion marker, and browser fragment history without changing project state" - - "The later-refresh viewport baseline is measured after the browser applies the explicit wheel input at its next animation frame" + - "The later-refresh viewport baseline is measured after the browser's scrollend event confirms the explicit wheel input has settled" - "Newer evidence is introduced through the sample's supported preview/confirm API before an explicit refresh" - "The browser test advances only the isolated sample API; it never submits the priority form or mutates a live project" - "No network, live project mutation, retry, sleep, timeout, golden update, or direct fixture-source change" diff --git a/test/fleet/console-view-navigation.test.mjs b/test/fleet/console-view-navigation.test.mjs index 29b031a..1b10634 100644 --- a/test/fleet/console-view-navigation.test.mjs +++ b/test/fleet/console-view-navigation.test.mjs @@ -141,8 +141,11 @@ test('SCN-console-operational-deeplink-layout-history-and-refresh: Fleet deep li await assertManagerWakes(); await page.locator('.console-rail a[href="#work"]').click(); + const scrollSettled = page.evaluate(() => new Promise((resolve) => { + globalThis.addEventListener('scrollend', resolve, { once: true }); + })); await page.mouse.wheel(0, 180); - await page.evaluate(() => new Promise((resolve) => requestAnimationFrame(resolve))); + await scrollSettled; const beforeRefreshRender = await page.evaluate(() => scrollY); await page.locator('#refresh-console').evaluate((button) => { button.dispatchEvent(new MouseEvent('click', { bubbles: true }));