Browse Source

fix: e2e test

Konstantinos Kaloutas 2 years ago
parent
commit
fb84f336eb
1 changed files with 2 additions and 8 deletions
  1. 2 8
      e2e-tests/whiteboards.spec.ts

+ 2 - 8
e2e-tests/whiteboards.spec.ts

@@ -134,18 +134,12 @@ test('group the rectangles', async ({ page }) => {
 })
 
 test('delete the group', async ({ page }) => {
-  const canvas = await page.waitForSelector('.logseq-tldraw')
-  const bounds = (await canvas.boundingBox())!
-
-  await page.mouse.move(bounds.x + 20, bounds.y + 20, {steps: 5})
-
-  await page.mouse.down()
-  await page.mouse.up()
+  await page.keyboard.press(modKey + '+a')
 
   await page.keyboard.press('Delete')
 
-  // should also delete the grouped shapes
   await expect(page.locator('.logseq-tldraw .tl-group-container')).toHaveCount(0)
+    // should also delete the grouped shapes
   await expect(page.locator('.logseq-tldraw .tl-box-container')).toHaveCount(0)
 })