chore: prohibit unnecessary await (#4586)

This commit is contained in:
Alex Yang
2023-10-12 00:04:58 -05:00
committed by GitHub
parent 5ebd82dc04
commit d05897b724
19 changed files with 104 additions and 104 deletions

View File

@@ -10,7 +10,7 @@ import { expect, type Page } from '@playwright/test';
const openQuickSearchByShortcut = async (page: Page) => {
await withCtrlOrMeta(page, () => page.keyboard.press('k', { delay: 50 }));
await page.waitForTimeout(500);
await page.waitForTimeout(1000);
};
const keyboardDownAndSelect = async (page: Page, label: string) => {
@@ -151,6 +151,7 @@ test('Create a new page and search this page', async ({ page }) => {
await page.waitForTimeout(300);
await assertTitle(page, 'test123456');
});
test('Navigate to the 404 page and try to open quick search', async ({
page,
}) => {
@@ -249,7 +250,6 @@ test('assert the recent browse pages are on the recent list', async ({
await page.waitForTimeout(200);
await openQuickSearchByShortcut(page);
await page.waitForTimeout(200);
{
// check does all 3 pages exists on recent page list
const quickSearchItems = page.locator(