From b25d71c16e5b481b00ba33a6a480190ec3b7189b Mon Sep 17 00:00:00 2001 From: Brian Love Date: Mon, 13 Apr 2026 07:52:03 -0700 Subject: [PATCH] fix(cockpit): align production smoke checks with chat demos --- apps/cockpit/e2e/production-smoke.spec.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/apps/cockpit/e2e/production-smoke.spec.ts b/apps/cockpit/e2e/production-smoke.spec.ts index 5204099cd..4653b43dc 100644 --- a/apps/cockpit/e2e/production-smoke.spec.ts +++ b/apps/cockpit/e2e/production-smoke.spec.ts @@ -53,12 +53,27 @@ const RENDER_CAPABILITIES = [ 'render/computed-functions', ] as const; +const CHAT_PRIMITIVE_CAPABILITIES = new Set([ + 'chat/messages', + 'chat/input', + 'chat/debug', +]); + +const A2UI_CAPABILITIES = new Set([ + 'chat/a2ui', +]); + test.describe('Production: Angular example apps load', () => { for (const cap of CAPABILITIES) { test(`${cap} loads at examples URL`, async ({ page }) => { const url = `${EXAMPLES_URL}/${cap}/`; const res = await page.goto(url, { timeout: 15000 }); expect(res?.status()).toBe(200); + if (CHAT_PRIMITIVE_CAPABILITIES.has(cap)) { + await expect(page.getByRole('search', { name: 'Message input' })).toBeVisible({ timeout: 10000 }); + return; + } + await expect(page.locator('chat')).toBeVisible({ timeout: 10000 }); }); } @@ -93,6 +108,11 @@ test.describe('Production: send/receive smoke', () => { await expect(page.locator('chat')).toBeVisible({ timeout: 10000 }); await page.fill('textarea[name="messageText"]', 'hello'); await page.click('button[type="submit"]'); + if (A2UI_CAPABILITIES.has(cap)) { + await expect(page.getByRole('heading', { name: 'Contact Us' })).toBeVisible({ timeout: 30000 }); + return; + } + await expect(page.locator('.chat-md').first()).toBeVisible({ timeout: 30000 }); }); }