diff --git a/apps/web/tests/cordis-tool-round.e2e.ts b/apps/web/tests/cordis-tool-round.e2e.ts index 1aa99383ba..66d1a3b132 100644 --- a/apps/web/tests/cordis-tool-round.e2e.ts +++ b/apps/web/tests/cordis-tool-round.e2e.ts @@ -108,12 +108,16 @@ describe('web e2e: Cordis tools use their owned cards', () => { // NOT the plugin running. Until a person answers, the browser half has not // been fetched, evaluated, or mounted anywhere on this page. expect(await page.locator('[data-snapshot-probe]').count()).toBe(0) + const sessionId = await runTurnSettled + // Approving from idle makes the run-outcome steer a distinct continuation + // turn, matching the recorded replay and keeping turn grouping deterministic. const approvalTurnSettled = scaffold.whenTurnSettled() await approve.click() await expect.poll(() => page.locator('[data-snapshot-probe]').count(), { timeout: 30_000 }).toBe(1) await approvalTurnSettled - - const sessionId = await runTurnSettled + await expect.poll(() => page.getByText('The Cordis Plugin is running.', { exact: true }).count(), { timeout: 15_000 }) + .toBeGreaterThanOrEqual(1) + await expect.poll(() => input.isEnabled(), { timeout: 15_000 }).toBe(true) const stopTurnSettled = scaffold.whenTurnSettled() await input.fill(STOP_PROMPT) await input.press('Enter')