diff --git a/packages/testing/playwright/tests/e2e/instance-ai/instance-ai-remediation-guard.spec.ts b/packages/testing/playwright/tests/e2e/instance-ai/instance-ai-remediation-guard.spec.ts index e6dc1b227ef..168b9ad7f99 100644 --- a/packages/testing/playwright/tests/e2e/instance-ai/instance-ai-remediation-guard.spec.ts +++ b/packages/testing/playwright/tests/e2e/instance-ai/instance-ai-remediation-guard.spec.ts @@ -253,10 +253,15 @@ test.describe( 'When the build result reports that setup is required before verification, open the workflow setup card with workflows(action="setup") and stop editing.', ); - await expect(n8n.instanceAi.workflowSetup.getCard()).toBeVisible({ timeout: 540_000 }); + // The skill-opening narration is surfaced transiently in the thinking + // trace while the orchestrator loads the workflow-builder skill, then + // collapses once the build completes. Assert it while the run is still + // in progress — before awaiting the terminal setup card. await expect( n8n.instanceAi.getAssistantMessageText('Opening skill: workflow-builder'), - ).toBeVisible(); + ).toBeVisible({ timeout: 540_000 }); + + await expect(n8n.instanceAi.workflowSetup.getCard()).toBeVisible({ timeout: 540_000 }); await expect(n8n.instanceAi.getAssistantMessageText(TERMINAL_FALLBACK_TEXT)).toHaveCount(0); const events = getLatestRecordingEvents(await getTraceEvents(api, testInfo));