test: add test case for 404 search

This commit is contained in:
JimmFly
2023-02-07 13:21:42 +08:00
parent e559ae3490
commit 3b8c4db8fb

View File

@@ -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 });
});
});