fix: e2e tests

pull/10438/head
Tienson Qin 2023-10-17 17:38:13 +08:00
parent 7ea80938d3
commit d04d26bd54
2 changed files with 5 additions and 3 deletions

View File

@ -271,6 +271,7 @@ test('Select codeblock language', async ({ page }) => {
// Select Clojure from the dropdown menu
await repeatKeyPress(page, 'ArrowDown', 6)
await page.press('textarea >> nth=0', 'Enter', { delay: 10 })
await page.waitForTimeout(100)
// expect the codeblock to be visible
expect(await page.waitForSelector('.CodeMirror', { state: 'visible' }))

View File

@ -88,9 +88,10 @@ async function alias_test(block: Block, page: Page, page_name: string, search_kw
// alias_test_content_3 sequentially, to validate the target page state
await page.type('textarea >> nth=0', 'alias:: [[' + alias_name, { delay: 10 })
await page.keyboard.press('Enter', { delay: 200 }) // Enter for finishing selection
await page.keyboard.press('Enter', { delay: 200 }) // double Enter for exit property editing
await page.keyboard.press('Enter', { delay: 200 }) // double Enter for exit property editing
await page.waitForTimeout(200)
await page.keyboard.press('Enter', { delay: 200 })
await page.keyboard.press('Escape')
await page.waitForTimeout(100)
await block.clickNext()
await block.activeEditing(1)
await page.type('textarea >> nth=0', alias_test_content_1)
await lastBlock(page)