diff --git a/tests/e2e/mount.e2e.ts b/tests/e2e/mount.e2e.ts index 3b04f49c..a89f7029 100644 --- a/tests/e2e/mount.e2e.ts +++ b/tests/e2e/mount.e2e.ts @@ -731,6 +731,18 @@ test('the bottom workbench opens the plugin terminal (#774) without shadowing th // seeded editor tab is open on arrival — clicking unconditionally would // collapse it, and every later query would then measure the slid-off // (translateY(102%)) panel. + // + // It is also HIDDEN while the host right sidebar is open (the plugin's own + // rule: that corner belongs to the host's Split/Fullscreen/Collapse cluster), + // so the sidebar opened above must be collapsed again before the toggle can + // be clicked at all. Waiting for it while the panel is open was a race the + // suite used to win by landing inside the 500 ms re-check window — and lost + // on 2026-10-15 (identical commit, one run green and one red). + await page.locator('[data-sidebar-right-toggle]').first().click() + await expect( + page.locator('[data-sidebar-right-expand]').first(), + 'the right sidebar must be collapsed before the workbench toggle can render', + ).toBeVisible({ timeout: 30_000 }) const bottomExpand = page.locator('[data-dsh-bottom-toggle]:visible').first() await expect(bottomExpand).toBeAttached({ timeout: 60_000 }) if ((await bottomExpand.getAttribute('data-active')) !== 'true') await bottomExpand.click() @@ -782,6 +794,10 @@ test('the bottom workbench opens the plugin terminal (#774) without shadowing th // Shadowing check: the plugin's entry is bottom-only, so the host's own // guide STILL lists exactly one `terminal` capsule — with the plugin's // terminal now open beside it — and never one for `terminal-bottom`. + // The sidebar was collapsed to reach the workbench toggle above, so it is + // re-opened here: this check IS about the host's guide being intact. + await page.locator('[data-sidebar-right-expand]').first().click() + await expect(guide).toBeVisible({ timeout: 30_000 }) await expect( hostTerminalEntry, 'the plugin must not shadow the host terminal', diff --git a/tests/e2e/perf.e2e.ts b/tests/e2e/perf.e2e.ts index c8bbb889..cd39a9c3 100644 --- a/tests/e2e/perf.e2e.ts +++ b/tests/e2e/perf.e2e.ts @@ -450,7 +450,14 @@ test('measure: steady-state recurring work while the visited session is parked', const visited = record.visitedTabs expect( sessionCwdIdle, - `session.cwd must be polled once per session (${visited} visited tabs must not multiply it)`, - ).toBeLessThanOrEqual(visited) + `session.cwd must be polled once per session, not per visited tab (${visited} tabs; ` + + 'the pre-fix code reported one poller per mounted body AND one for the shell)', + // Budget, not an exact count: the window is 15 s against a 5 s cadence, so + // ONE poller already reports 3–4, and whether the host sidebar really ended + // up collapsed decides between one and two pollers (the plugin shell adds + // one while its workbench is on screen). Pre-fix this was 15 for four + // visited tabs — `visited * 2` still separates "one per session" from "one + // per tab" without depending on that visual state. + ).toBeLessThan(visited * 2) }) diff --git a/tests/editor-host.spec.tsx b/tests/editor-host.spec.tsx index 180baf96..1aa24620 100644 --- a/tests/editor-host.spec.tsx +++ b/tests/editor-host.spec.tsx @@ -114,10 +114,17 @@ setupReactAct() * hit the SUITE clock (15s, a real `fs.watch` + 150ms debounce) in a local * run under heap pressure — i.e. the worker, not the wait, ran out of * runway. The suite's own clock is now 30s (`vitest.config.ts`). - * The affected `describe` raises its clock to 35s, so a genuinely missing row + * - 20s → 60s: 2026-10-15, the same two cases in the SAME commit produced a + * green run and a red one. Measured on both: this file takes **609ms** in + * the green CI run (108ms locally) and **50554ms** in the red one, where + * the tree had received its three `fs.trees` answers (all landing before + * the wait even started) and still never rendered a row. That is an ~80x + * stall of the worker, not a slow wait, so the budget buys margin without + * weakening the assertion: a tree that never lists the row still fails. + * The affected `describe` raises its clock to 120s, so a genuinely missing row * still fails on the ASSERTION, never on the test clock. */ -const RENDER_WAIT_MS = 20_000 +const RENDER_WAIT_MS = 60_000 /** * Wait until the tree has rendered the row for `name` — the precondition of @@ -655,7 +662,7 @@ describe('EditorHost (files window)', () => { */ // 35s clock: the tree wait above budgets 20s (and reports for 5s more when it // expires), so the ASSERTION stays the thing that fails, not the test clock. -describe('EditorHost native-tab context-menu actions', { timeout: 35_000 }, () => { +describe('EditorHost native-tab context-menu actions', { timeout: 120_000 }, () => { /** A service whose openTab calls are recorded (surface undefined = native). */ function spyService(store: ReturnType): { service: ReturnType