From 3323eb688bf66bbce2540cf53c5bdbcd8de1edc8 Mon Sep 17 00:00:00 2001 From: Matsu Date: Fri, 17 Jul 2026 14:18:00 +0300 Subject: [PATCH] test: Fix flaky Instance AI remediation guard skill narration assertion (no-changelog) (#34442) Co-authored-by: Claude Opus 4.8 (1M context) --- .../instance-ai/instance-ai-remediation-guard.spec.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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));