Просмотр исходного кода

test(web): wait for seeded search inventory

creatixchu 1 месяц назад
Родитель
Сommit
cc88018cd4
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      apps/web/tests/navigation-panes.e2e.ts

+ 3 - 0
apps/web/tests/navigation-panes.e2e.ts

@@ -98,6 +98,9 @@ describe('web e2e: navigation & panes over a rich seeded session', () => {
 
   it.skipIf(MODE === 'record')('finds an unopened seeded session by message content and opens it', async () => {
     onTestFailed(() => saveFailureShot(page, 'web-e2e-navigation-search'))
+    // The search input mounts before the asynchronous session inventory.
+    // Wait for the seeded row so hydration cannot overwrite the query.
+    await page.getByText('1 session', { exact: true }).waitFor({ timeout: 30_000 })
     const search = page.getByPlaceholder('Search name, keywords', { exact: false })
     // The cold row has not been opened, so only the persisted log can satisfy
     // this query. First search lazily reconciles the SQLite content index.