From 418b38e8de96b8373d7bedd92311febdf56f8ea4 Mon Sep 17 00:00:00 2001 From: yoyoyohamapi <8338436+yoyoyohamapi@users.noreply.github.com> Date: Tue, 3 Jun 2025 05:00:21 +0000 Subject: [PATCH] test(core): support fast embedding progress (#12685) ## Summary by CodeRabbit - **Tests** - Improved test stability by handling potential errors during embedding progress checks in end-to-end tests. --- .../e2e/utils/chat-panel-utils.ts | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tests/affine-cloud-copilot/e2e/utils/chat-panel-utils.ts b/tests/affine-cloud-copilot/e2e/utils/chat-panel-utils.ts index 346c029021..9e453dea9c 100644 --- a/tests/affine-cloud-copilot/e2e/utils/chat-panel-utils.ts +++ b/tests/affine-cloud-copilot/e2e/utils/chat-panel-utils.ts @@ -294,12 +294,16 @@ export class ChatPanelUtils { } public static async waitForEmbeddingProgress(page: Page) { - await page.getByTestId('chat-panel-embedding-progress').waitFor({ - state: 'visible', - }); - await page.getByTestId('chat-panel-embedding-progress').waitFor({ - state: 'hidden', - }); + try { + await page.getByTestId('chat-panel-embedding-progress').waitFor({ + state: 'visible', + }); + await page.getByTestId('chat-panel-embedding-progress').waitFor({ + state: 'hidden', + }); + } catch { + // do nothing + } } public static async enableNetworkSearch(page: Page) {