test: wait for initial session indexing before refreshing results

This commit is contained in:
Jinwoo-H
2026-09-14 14:05:48 -04:00
parent d0f2348cb7
commit a59cd2385a
+11 -7
View File
@@ -57,14 +57,18 @@ test('panel consent enables real local transcript search; clearing restores hist
await expect(input).toHaveValue('')
await input.fill('nebulariver')
await orcaPage.getByRole('button', { name: 'Enable', exact: true }).click()
await expect(orcaPage.locator('mark').filter({ hasText: 'nebulariver' })).toBeVisible({
timeout: 30_000
})
expect(
await orcaPage.evaluate(
async () => (await window.api.aiVault.searchStatus('local')).filesIndexed
// Indexed searches are snapshots; enabling starts indexing independently of the panel.
await expect
.poll(
() =>
orcaPage.evaluate(
async () => (await window.api.aiVault.searchStatus('local')).filesIndexed
),
{ timeout: 30_000 }
)
).toBeGreaterThan(0)
.toBeGreaterThan(0)
await orcaPage.getByRole('button', { name: 'Refresh Session History', exact: true }).click()
await expect(orcaPage.locator('mark').filter({ hasText: 'nebulariver' })).toBeVisible()
await expect(orcaPage.getByText('Synthetic panel transcript', { exact: true })).toBeVisible()
await screenshot('results.png')
await orcaPage.getByTitle('Drag to resume in a new tab', { exact: true }).click()