test(web): allow the provider key save to settle before checking the editor closed

The Save in the provider editor writes settings and the credential on the Host
before the editor closes; the 1-second expect.poll default timed out on a loaded
CI runner. Wait up to 10 seconds, as other web e2e cases do for Host round trips.
This commit is contained in:
imccyu committed 2026-11-19 01:28:20 +08:00
1 parent 6544a7171e
commit f92b5de6c7
1 file changed
+2 -2
@@ -94,7 +94,7 @@ it.skipIf(webSnapshotMode() === 'record').each(['deepseek-official', 'google', '
await edit.click()
await key.press('Delete')
await dialog.getByRole('button', { name: '保存', exact: true }).click()
await expect.poll(() => key.count()).toBe(0)
await expect.poll(() => key.count(), { timeout: 10_000 }).toBe(0)
await generate()
expect(calls).toHaveLength(2)
expect(calls[0]?.key).toBe(messages || google ? 'fixture-saved-key' : 'Bearer fixture-saved-key')
@@ -155,7 +155,7 @@ it.each([{ name: 'Chromium', engine: chromium }, { name: 'WebKit', engine: webki
await expect.poll(() => key.inputValue()).toBe('')
await key.fill('fixture-new-key')
await dialog.getByRole('button', { name: '保存', exact: true }).click()
await expect.poll(() => key.count()).toBe(0)
await expect.poll(() => key.count(), { timeout: 10_000 }).toBe(0)
await edit.click()
expect(await key.getAttribute('placeholder')).toBe('•'.repeat('fixture-new-key'.length))
expect(await key.inputValue()).toBe('')