瀏覽代碼

fix(test): add delay to e2e testing (#5804)

Andelf 3 年之前
父節點
當前提交
6afdfedb51
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      e2e-tests/basic.spec.ts

+ 3 - 2
e2e-tests/basic.spec.ts

@@ -120,7 +120,8 @@ test('template', async ({ page, block }) => {
 
   await createRandomPage(page)
 
-  await block.mustFill('template test\ntemplate:: ' + randomTemplate)
+  await block.mustFill('template test\ntemplate:: ')
+  await page.keyboard.type(randomTemplate, {delay: 100})
   await page.keyboard.press('Enter')
   await block.clickNext()
 
@@ -195,7 +196,7 @@ test('auto completion and auto pair', async ({ page, block }) => {
 
   // {{
   await block.mustType('type {{', { toBe: 'type {{}}' })
-
+  await page.waitForTimeout(100);
   // ((
   await block.clickNext()