test(e2e): allow background browser titles to settle

This commit is contained in:
Merge Sim
2026-09-08 13:13:03 -07:00
parent 4f0e3806a9
commit 7574fa7149
+2 -1
View File
@@ -285,7 +285,8 @@ async function waitForTabIdByExactTitle(
const tab = tabs.find((candidate) => candidate.textContent?.trim() === exactTitle)
return tab?.getAttribute('data-tab-id') ?? null
}, title)
await expect.poll(resolveTabId, { timeout: 10_000 }).not.toBeNull()
// Background tabs may commit their document title after the guest load settles.
await expect.poll(resolveTabId, { timeout: 30_000 }).not.toBeNull()
return (await resolveTabId()) as string
}