From 34df23ce2278790bec7c01e0934c5a3622397fe3 Mon Sep 17 00:00:00 2001 From: "n8n-cat-bot[bot]" <283985454+n8n-cat-bot[bot]@users.noreply.github.com> Date: Tue, 26 May 2026 22:34:29 +0000 Subject: [PATCH] test: Wait for auto-opened template setup modal instead (#31169) Co-authored-by: n8n-cat-bot[bot] --- .../regression/ADO-4462-template-setup-experiment.spec.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/testing/playwright/tests/e2e/regression/ADO-4462-template-setup-experiment.spec.ts b/packages/testing/playwright/tests/e2e/regression/ADO-4462-template-setup-experiment.spec.ts index 29435154821..0aa5925f1dc 100644 --- a/packages/testing/playwright/tests/e2e/regression/ADO-4462-template-setup-experiment.spec.ts +++ b/packages/testing/playwright/tests/e2e/regression/ADO-4462-template-setup-experiment.spec.ts @@ -82,10 +82,10 @@ test.describe( await expect(n8n.page).toHaveURL(/\/workflow\/.+\?templateId=.+&new=true/); await expect(n8n.canvas.getCanvasNodes()).toHaveCount(3); - await expect(n8n.templateCredentialSetup.getCanvasSetupButton()).toBeVisible(); - - // Open modal via button click - await n8n.templateCredentialSetup.getCanvasSetupButton().click(); + // In the variant experiment, the setup modal auto-opens on mount of + // SetupWorkflowCredentialsButton when arriving on the template import route. + // Wait for the auto-opened modal rather than clicking the button — the + // click races with the auto-open and can be intercepted by the modal. await expect(n8n.templateCredentialSetup.getCanvasCredentialModal()).toBeVisible(); const modalSteps = n8n.templateCredentialSetup.getSetupCredentialModalSteps();