Browse Source

fix: editor e2e tests

Tienson Qin 2 years ago
parent
commit
8e0a70017e
1 changed files with 3 additions and 3 deletions
  1. 3 3
      e2e-tests/util/search-modal.ts

+ 3 - 3
e2e-tests/util/search-modal.ts

@@ -2,9 +2,9 @@ import { Page, Locator, ElementHandle } from '@playwright/test'
 import { randomString } from './basic'
 
 export async function closeSearchBox(page: Page): Promise<void> {
-    await page.keyboard.press("Escape") // escape (potential) search box typing
+    await page.keyboard.press("Escape", { delay: 50 }) // escape (potential) search box typing
     await page.waitForTimeout(500)
-    await page.keyboard.press("Escape") // escape modal
+    await page.keyboard.press("Escape", { delay: 50 }) // escape modal
 }
 
 export async function createRandomPage(page: Page) {
@@ -28,7 +28,7 @@ export async function createPage(page: Page, page_name: string) {// Click #searc
     await page.click('#search-button')
     // Fill [placeholder="What are you looking for?"]
     await page.fill('[placeholder="What are you looking for?"]', page_name)
-    await page.keyboard.press('Enter', { delay: 50 })
+    await page.keyboard.press('Enter', { delay: 100 })
     // wait for textarea of first block
     await page.waitForSelector('textarea >> nth=0', { state: 'visible' })