test: Wait for auto-opened template setup modal instead (#31169)
Some checks are pending
CI: Master (Build, Test, Lint) / Build for Github Cache (push) Waiting to run
CI: Master (Build, Test, Lint) / Unit tests (22.22.3) (push) Waiting to run
CI: Master (Build, Test, Lint) / Unit tests (24.15.0) (push) Waiting to run
CI: Master (Build, Test, Lint) / Lint (push) Waiting to run
CI: Master (Build, Test, Lint) / Performance (push) Waiting to run
CI: Master (Build, Test, Lint) / Notify Slack on failure (push) Blocked by required conditions

Co-authored-by: n8n-cat-bot[bot] <n8n-cat-bot[bot]@users.noreply.github.com>
This commit is contained in:
n8n-cat-bot[bot] 2026-05-26 22:34:29 +00:00 committed by GitHub
parent 1eae5ee753
commit 34df23ce22
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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();