Fix dnd e2e tests (#5762)

This commit is contained in:
Andelf
2022-06-20 13:04:26 +08:00
committed by GitHub
parent 7c4d7cd61a
commit 0f30893636
2 changed files with 8 additions and 8 deletions

View File

@@ -223,5 +223,5 @@ test('invalid page props #3944', async ({ page, block }) => {
await block.mustFill('public:: true\nsize:: 65535')
await page.press('textarea >> nth=0', 'Enter')
// Force rendering property block
await block.clickNext()
await block.enterNext()
})

View File

@@ -33,21 +33,21 @@ test('drop to left center', async ({ page }) => {
})
test('drop to upper left', async ({ page }) => {
test('drop to upper left', async ({ page, block }) => {
await createRandomPage(page)
await page.fill('textarea >> nth=0', 'block a')
await enterNextBlock(page)
await block.mustFill('block a')
await block.enterNext()
await page.fill('textarea >> nth=0', 'block b')
await page.press('textarea >> nth=0', 'Escape')
await block.mustFill('block b')
await block.escapeEditing()
const bullet = page.locator('span.bullet-container >> nth=-1')
const where = page.locator('.ls-block >> nth=0')
await bullet.dragTo(where, {
targetPosition: {
x: 30,
y: 5
x: 0,
y: 0
}
})