Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

test: add test case for 404 search

JimmFly3b8c4db8fb9e
diff --git a/tests/quick-search.spec.ts b/tests/quick-search.spec.ts
index 4526a7e447..999057c8b0 100644
--- a/tests/quick-search.spec.ts
+++ b/tests/quick-search.spec.ts
@@ -94,3 +94,15 @@ test.describe('Search and select', () => {
await assertTitleTexts(page, 'test123456', true);
});
});
+test.describe('Disable search on 404 page', () => {
+ test('Navigate to the 404 page and try to open quick search', async ({
+ page,
+ }) => {
+ await page.goto('http://localhost:8080/404');
+ const notFoundTip = page.locator('[data-testid=notFound]');
+ await expect(notFoundTip).toBeVisible();
+ await openQuickSearchByShortcut(page);
+ const quickSearch = page.locator('[data-testid=quickSearch]');
+ await expect(quickSearch).toBeVisible({ visible: false });
+ });
+});