From 98e27342ae79214a6e4b0512596197a427ad79f2 Mon Sep 17 00:00:00 2001 From: Rhys Sullivan <39114868+RhysSullivan@users.noreply.github.com> Date: Fri, 28 Aug 2026 06:17:32 -0700 Subject: [PATCH] Wait for OAuth connect actionability instead of reading the first paint --- e2e/cloud/connection-modal-oauth-abandon.test.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/e2e/cloud/connection-modal-oauth-abandon.test.ts b/e2e/cloud/connection-modal-oauth-abandon.test.ts index 8e816ced65..124ba45e96 100644 --- a/e2e/cloud/connection-modal-oauth-abandon.test.ts +++ b/e2e/cloud/connection-modal-oauth-abandon.test.ts @@ -102,8 +102,12 @@ scenario( await visit(page, `/integrations/${integration}`); await addConnection.click(); // The registered app is auto-selected, so the OAuth connect button is - // present and enabled. + // present and enabled. Auto-selection resolves asynchronously after + // the modal opens, so the button legitimately renders disabled for a + // beat first — wait for actionability (trial click waits for + // enabled + stable) rather than reading that transient first paint. await connectWithOAuth.waitFor({ state: "visible", timeout: 15_000 }); + await connectWithOAuth.click({ trial: true, timeout: 15_000 }); expect( await connectWithOAuth.isDisabled(), "the auto-selected app makes Connect with OAuth actionable",