فهرست منبع

fix(test): add delay to clickNew

Andelf 3 سال پیش
والد
کامیت
8e74b06103
2فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 1 1
      e2e-tests/basic.spec.ts
  2. 1 1
      e2e-tests/fixtures.ts

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

@@ -240,7 +240,7 @@ test('auto completion and auto pair', async ({ page, block }) => {
   await block.mustType('type [', { toBe: 'type []'})
   await block.mustType('[', { toBe: 'type [[]]'})
 
-  await page.press('textarea >> nth=0', 'Escape') // escape any popup from `[[]]`
+  await block.escapeEditing() // escape any popup from `[[]]`
 
   // ``
   await block.clickNext()

+ 1 - 1
e2e-tests/fixtures.ts

@@ -186,7 +186,7 @@ export const test = base.extend<{ page: Page, block: Block, context: BrowserCont
         });
         let blockCount = await page.locator('.page-blocks-inner .ls-block').count()
         // the next element after all blocks.
-        await page.click('.add-button-link-wrap')
+        await page.click('.add-button-link-wrap', { delay: 50 })
         await page.waitForSelector(`.ls-block >> nth=${blockCount} >> textarea`, { state: 'visible', timeout: 1000 })
         return page.locator('textarea >> nth=0')
       },