mirror of
https://github.com/logseq/logseq.git
synced 2026-04-24 14:14:55 +00:00
test(e2e): refine test for template expansion
This commit is contained in:
@@ -141,8 +141,8 @@ test('template', async ({ page, block }) => {
|
||||
|
||||
await block.waitForBlocks(5)
|
||||
|
||||
// NOTE: use delay to type slower, to trigger auto-completion UI.
|
||||
await block.clickNext()
|
||||
// See-also: #9354
|
||||
await block.enterNext()
|
||||
await block.mustType('/template')
|
||||
|
||||
await page.click('[title="Insert a created template here"]')
|
||||
@@ -154,6 +154,19 @@ test('template', async ({ page, block }) => {
|
||||
await popupMenuItem.click()
|
||||
|
||||
await block.waitForBlocks(9)
|
||||
|
||||
|
||||
await block.clickNext()
|
||||
await block.mustType('/template')
|
||||
|
||||
await page.click('[title="Insert a created template here"]')
|
||||
// type to search template name
|
||||
await page.keyboard.type(randomTemplate.substring(0, 3), { delay: 100 })
|
||||
|
||||
await popupMenuItem.waitFor({ timeout: 2000 }) // wait for template search
|
||||
await popupMenuItem.click()
|
||||
|
||||
await block.waitForBlocks(13) // 9 + 4
|
||||
})
|
||||
|
||||
test('auto completion square brackets', async ({ page, block }) => {
|
||||
|
||||
@@ -27,7 +27,7 @@ const consoleLogWatcher = (msg: ConsoleMessage) => {
|
||||
const text = msg.text()
|
||||
logs += text + '\n'
|
||||
|
||||
expect(text, logs).not.toMatch(/^(Failed to|Uncaught)/)
|
||||
expect(text, logs).not.toMatch(/^(Failed to|Uncaught|Assert failed)/)
|
||||
|
||||
// youtube video
|
||||
// Error with Permissions-Policy header: Origin trial controlled feature not enabled: 'ch-ua-reduced'.
|
||||
|
||||
Reference in New Issue
Block a user