diff --git a/apps/cockpit/e2e/production-smoke.spec.ts b/apps/cockpit/e2e/production-smoke.spec.ts index a5013d7e9..d74ec9f63 100644 --- a/apps/cockpit/e2e/production-smoke.spec.ts +++ b/apps/cockpit/e2e/production-smoke.spec.ts @@ -65,6 +65,9 @@ const RENDER_CAPABILITIES = [ 'render/computed-functions', ] as const; +const SEND_RECEIVE_TIMEOUT_MS = 30_000; +const A2UI_SEND_RECEIVE_TIMEOUT_MS = 90_000; + test.describe('Production: Angular chat example apps load', () => { for (const cap of CHAT_CAPABILITIES) { test(`${cap} loads at examples URL`, async ({ page }) => { @@ -113,6 +116,10 @@ test.describe('Production: send/receive smoke', () => { for (const cap of ['langgraph/streaming', 'deep-agents/planning', 'chat/a2ui'] as const) { test(`${cap} sends and receives a message`, async ({ page }) => { + const responseTimeout = + cap === 'chat/a2ui' ? A2UI_SEND_RECEIVE_TIMEOUT_MS : SEND_RECEIVE_TIMEOUT_MS; + + test.setTimeout(responseTimeout + 15_000); await page.goto(`${EXAMPLES_URL}/${cap}/`, { timeout: 15_000 }); await expect(page.locator('chat')).toBeVisible({ timeout: 10_000 }); @@ -120,12 +127,12 @@ test.describe('Production: send/receive smoke', () => { await page.getByRole('button', { name: /send message/i }).click(); if (cap === 'chat/a2ui') { - await expect(page.locator('a2ui-surface')).toBeAttached({ timeout: 30_000 }); + await expect(page.locator('a2ui-surface')).toBeAttached({ timeout: responseTimeout }); return; } await expect(page.locator('chat-message[data-role="assistant"]').last()).toBeVisible({ - timeout: 30_000, + timeout: responseTimeout, }); }); }