test: Fix flaky Instance AI remediation guard skill narration assertion (no-changelog) (#34442)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Matsu 2026-07-17 14:18:00 +03:00 committed by GitHub
parent 40c5b76708
commit 3323eb688b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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