fix(test): add delay to clickNew

pull/4974/head
Andelf 2022-04-21 13:07:30 +08:00
parent 8f1f95741f
commit 8e74b06103
2 changed files with 2 additions and 2 deletions

View File

@ -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()

View File

@ -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')
},