Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions apps/cockpit/e2e/production-smoke.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) => {
Expand Down Expand Up @@ -113,19 +116,23 @@ 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 });

await page.locator('textarea[name="messageText"]').fill('hello');
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,
});
});
}
Expand Down
Loading