From 19c06a2821623c4ae95a5f128546a296d2621e40 Mon Sep 17 00:00:00 2001 From: yoyoyohamapi <8338436+yoyoyohamapi@users.noreply.github.com> Date: Tue, 22 Apr 2025 06:58:26 +0000 Subject: [PATCH] fix(core): falky ai save as block test (#11878) --- .../affine-cloud-copilot/e2e/utils/editor-utils.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/affine-cloud-copilot/e2e/utils/editor-utils.ts b/tests/affine-cloud-copilot/e2e/utils/editor-utils.ts index 87807adac..a8dde1dc3 100644 --- a/tests/affine-cloud-copilot/e2e/utils/editor-utils.ts +++ b/tests/affine-cloud-copilot/e2e/utils/editor-utils.ts @@ -53,6 +53,20 @@ export class EditorUtils { await page.getByTestId('switch-edgeless-mode-button').click(); editor.waitForElementState('hidden'); await page.waitForSelector('edgeless-editor'); + try { + const edgelessNotificationClose = page.getByTestId( + 'notification-close-button' + ); + await edgelessNotificationClose.waitFor({ + state: 'visible', + timeout: 2000, + }); + await edgelessNotificationClose.click(); + // Focus to the edgeless editor + await page.mouse.click(400, 400); + } catch { + // do nothing if the notification close button is not found + } } public static async switchToPageMode(page: Page) {