From 7d59b97f5797c9d66f842743997b56037c4f9165 Mon Sep 17 00:00:00 2001 From: gcharang <21151592+gcharang@users.noreply.github.com> Date: Mon, 27 Jul 2026 12:33:20 +0400 Subject: [PATCH] test(web): follow current recent chats semantics --- apps/web/tests/e2e/live-stack.spec.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/web/tests/e2e/live-stack.spec.ts b/apps/web/tests/e2e/live-stack.spec.ts index 78a9eaf..d3d79bf 100644 --- a/apps/web/tests/e2e/live-stack.spec.ts +++ b/apps/web/tests/e2e/live-stack.spec.ts @@ -20,6 +20,7 @@ test('verifies the authorized live stack through the operator console', async ({ await writeFile(fixturePath, textPdf(`Evidence phrase: ${uniquePhrase}.`)) await page.goto('/connect') + await waitForHydration(page) const connectButton = page.getByRole('button', { name: 'Connect' }) await expect(connectButton).toBeEnabled() await page.getByLabel('API key').fill(liveKey) @@ -57,7 +58,11 @@ test('verifies the authorized live stack through the operator console', async ({ await expect(page.locator('dt', { hasText: 'Pages' }).locator('xpath=following-sibling::dd[1]')).toContainText('1') await page.goto('/chat') - await expect(page.getByRole('complementary', { name: 'Recent chats' })).toContainText(uniquePhrase) + await waitForHydration(page) + const recentChats = page + .getByRole('navigation', { name: 'Side navigation' }) + .getByRole('group', { name: 'Recent chats' }) + await expect(recentChats).toContainText(uniquePhrase) await page.goto('/settings') await waitForHydration(page) @@ -76,7 +81,7 @@ test('verifies the authorized live stack through the operator console', async ({ }) async function waitForHydration(page: import('@playwright/test').Page) { - await expect(page.locator('html')).toHaveAttribute('data-hydrated', 'true') + await expect(page.locator('html')).toHaveAttribute('data-hydrated', 'true', { timeout: 15_000 }) } function textPdf(text: string): Buffer {