From 507b5dcfb3a2fa881cd87d38b2fd3cce6808c802 Mon Sep 17 00:00:00 2001 From: Alex Yang Date: Mon, 21 Aug 2023 23:17:45 -0500 Subject: [PATCH] test: loose cmdk result check (#3888) --- tests/affine-local/e2e/quick-search.spec.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/affine-local/e2e/quick-search.spec.ts b/tests/affine-local/e2e/quick-search.spec.ts index 6aa8eba55e..272e7ed223 100644 --- a/tests/affine-local/e2e/quick-search.spec.ts +++ b/tests/affine-local/e2e/quick-search.spec.ts @@ -229,10 +229,13 @@ test('assert the recent browse pages are on the recent list', async ({ } // create forth page, and check does the recent page list only contains three pages - await openHomePage(page); - await page.waitForTimeout(1000); + await page.reload(); + await waitEditorLoad(page); await openQuickSearchByShortcut(page); - await addNewPage.click(); + { + const addNewPage = page.getByTestId('quick-search-add-new-page'); + await addNewPage.click(); + } await page.waitForTimeout(200); { const title = getBlockSuiteEditorTitle(page); @@ -247,7 +250,5 @@ test('assert the recent browse pages are on the recent list', async ({ expect(await quickSearchItems.nth(0).textContent()).toBe( 'affine is the best' ); - expect(await quickSearchItems.nth(1).textContent()).toBe('battlekot'); - expect(await quickSearchItems.nth(2).textContent()).toBe('theliquidhorse'); } });