From 5a512f983a97290180ae4542cb6238347484b052 Mon Sep 17 00:00:00 2001 From: Tim Shamilov Date: Wed, 11 Nov 2026 02:08:12 -0500 Subject: [PATCH 1/3] test(web): accept remaining timeout budget in diagnostics --- packages/web/tests/integration/check-actions.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/web/tests/integration/check-actions.test.ts b/packages/web/tests/integration/check-actions.test.ts index 385bd4884c..6439b66c6a 100644 --- a/packages/web/tests/integration/check-actions.test.ts +++ b/packages/web/tests/integration/check-actions.test.ts @@ -461,7 +461,7 @@ describe('a tap on a locator that never appears', () => { const error = await perform({ kind: 'locator', locator: page.locator('#missing') }, { kind: 'tap' }); expect(Date.now() - started).toBeLessThan(3500); expect(error).toMatchObject({ code: 'NOT_ACTIONABLE', retryable: false }); - expect(error?.message).toMatch(/^tap did not become actionable in time: .*Timeout 2000ms exceeded/); + expect(error?.message).toMatch(/^tap did not become actionable in time: .*Timeout \d+ms exceeded/); expect(error?.message).toContain("waiting for locator('#missing')"); }); }); From 70d7f9b702d2ebb6b27436d02046b82c049ec716 Mon Sep 17 00:00:00 2001 From: Tim Shamilov Date: Wed, 11 Nov 2026 02:15:21 -0500 Subject: [PATCH 2/3] test(web): retain timeout bounds in the diagnostic assertion --- packages/web/tests/integration/check-actions.test.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/web/tests/integration/check-actions.test.ts b/packages/web/tests/integration/check-actions.test.ts index 6439b66c6a..8b7d827b82 100644 --- a/packages/web/tests/integration/check-actions.test.ts +++ b/packages/web/tests/integration/check-actions.test.ts @@ -461,7 +461,11 @@ describe('a tap on a locator that never appears', () => { const error = await perform({ kind: 'locator', locator: page.locator('#missing') }, { kind: 'tap' }); expect(Date.now() - started).toBeLessThan(3500); expect(error).toMatchObject({ code: 'NOT_ACTIONABLE', retryable: false }); - expect(error?.message).toMatch(/^tap did not become actionable in time: .*Timeout \d+ms exceeded/); + const remainingMs = Number( + error?.message.match(/^tap did not become actionable in time: .*Timeout (\d+)ms exceeded/)?.[1], + ); + expect(remainingMs).toBeGreaterThan(0); + expect(remainingMs).toBeLessThanOrEqual(2000); expect(error?.message).toContain("waiting for locator('#missing')"); }); }); From 82076ff06ae6927ccc29ebbea321ee513ee40310 Mon Sep 17 00:00:00 2001 From: Tim Shamilov Date: Wed, 11 Nov 2026 10:53:58 -0500 Subject: [PATCH 3/3] test(web): reject prematurely shortened tap timeout budgets Require a remaining timeout above 1500 ms and no greater than 2000 ms, and check the diagnostic prefix before parsing. This preserves tolerance for deadline drift while catching a tap that receives only half its budget. --- packages/web/tests/integration/check-actions.test.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/web/tests/integration/check-actions.test.ts b/packages/web/tests/integration/check-actions.test.ts index 8b7d827b82..f792defbdc 100644 --- a/packages/web/tests/integration/check-actions.test.ts +++ b/packages/web/tests/integration/check-actions.test.ts @@ -461,10 +461,9 @@ describe('a tap on a locator that never appears', () => { const error = await perform({ kind: 'locator', locator: page.locator('#missing') }, { kind: 'tap' }); expect(Date.now() - started).toBeLessThan(3500); expect(error).toMatchObject({ code: 'NOT_ACTIONABLE', retryable: false }); - const remainingMs = Number( - error?.message.match(/^tap did not become actionable in time: .*Timeout (\d+)ms exceeded/)?.[1], - ); - expect(remainingMs).toBeGreaterThan(0); + expect(error?.message).toMatch(/^tap did not become actionable in time: .*Timeout \d+ms exceeded/); + const remainingMs = Number(error?.message.match(/Timeout (\d+)ms exceeded/)?.[1]); + expect(remainingMs).toBeGreaterThan(1500); expect(remainingMs).toBeLessThanOrEqual(2000); expect(error?.message).toContain("waiting for locator('#missing')"); });