Browse Source

fix(test): refine check state

Andelf 1 year ago
parent
commit
22da19126f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      e2e-tests/hotkey.spec.ts

+ 1 - 1
e2e-tests/hotkey.spec.ts

@@ -7,7 +7,7 @@ test('open search dialog', async ({ page }) => {
   await closeSearchBox(page)
   await closeSearchBox(page)
   await page.keyboard.press(modKey + '+k')
   await page.keyboard.press(modKey + '+k')
 
 
-  await page.waitForSelector('[placeholder="What are you looking for?"]')
+  await page.waitForSelector('[placeholder="What are you looking for?"]', { state: 'visible' })
   await page.keyboard.press('Escape')
   await page.keyboard.press('Escape')
   await page.waitForSelector('[placeholder="What are you looking for?"]', { state: 'hidden' })
   await page.waitForSelector('[placeholder="What are you looking for?"]', { state: 'hidden' })
 })
 })