test(web): wait for seeded search inventory

This commit is contained in:
creatixchu
2026-07-31 19:30:40 +08:00
parent ff79170944
commit cc88018cd4

View File

@@ -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.