|
@@ -23,11 +23,13 @@ async function setUpBlocks(page, block) {
|
|
|
|
|
|
test('backspace at the beginning of a refed block #9406', async ({ page, block }) => {
|
|
|
await setUpBlocks(page, block)
|
|
|
+ await page.waitForTimeout(100)
|
|
|
await editNthBlock(page, 1)
|
|
|
+ await page.waitForTimeout(100)
|
|
|
await moveCursorToBeginning(page)
|
|
|
- await page.keyboard.press('Backspace')
|
|
|
+ await page.keyboard.press('Backspace', { delay: 100 })
|
|
|
await expect(page.locator('textarea >> nth=0')).toHaveText("ab")
|
|
|
- await expect(await block.selectionStart()).toEqual(1)
|
|
|
+ await expect(await block.selectionStart()).toEqual(1)
|
|
|
await expect(page.locator('.block-ref >> text="ab"')).toHaveCount(1);
|
|
|
})
|
|
|
|
|
@@ -68,9 +70,9 @@ test('delete and undo #9406', async ({ page, block }) => {
|
|
|
await page.keyboard.press('ArrowDown', { delay: 20 })
|
|
|
await page.keyboard.up('Shift')
|
|
|
await block.waitForSelectedBlocks(2)
|
|
|
- await page.keyboard.press('Backspace')
|
|
|
+ await page.keyboard.press('Backspace', { delay: 100 })
|
|
|
await expect(page.locator('.ls-block')).toHaveCount(1)
|
|
|
- await page.keyboard.press(modKey + '+z')
|
|
|
+ await page.keyboard.press(modKey + '+z', { delay: 100 })
|
|
|
await page.waitForTimeout(100)
|
|
|
await expect(page.locator('.ls-block')).toHaveCount(3)
|
|
|
await expect(page.locator('.block-ref >> text="b"')).toHaveCount(1);
|