From 5b56e9d511b7bf7245cf75733ebf93f6fc7bd32a Mon Sep 17 00:00:00 2001 From: dsh-ci-bot Date: Thu, 19 Nov 2026 03:32:46 +0800 Subject: [PATCH] test(web): wait for the save to reload before reopening the editor The editor closes before the save's reload lands, and an Edit press while the settings snapshot is loading is dropped. Wait for the saved notice, which that reload publishes, before asserting the row's key field is gone and reopening the card. --- apps/web/tests/deepseek-messages-settings.e2e.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/web/tests/deepseek-messages-settings.e2e.ts b/apps/web/tests/deepseek-messages-settings.e2e.ts index 80d0b8d533..3957b28a75 100644 --- a/apps/web/tests/deepseek-messages-settings.e2e.ts +++ b/apps/web/tests/deepseek-messages-settings.e2e.ts @@ -161,6 +161,11 @@ 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() + // The editor closes before the save's reload lands, and an Edit press + // while the settings snapshot is loading is dropped. The saved notice is + // published by that reload's completion, so waiting for it also makes the + // reopen below deterministic. + await dialog.getByText('已保存 DeepSeek (deepseek-official)。', { exact: true }).waitFor() await expect.poll(() => key.count(), { timeout: 10_000 }).toBe(0) await edit.click() expect(await key.getAttribute('placeholder')).toBe('•'.repeat('fixture-new-key'.length))