-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #90 from Gkuzin13/dev
Dev
- Loading branch information
Showing
6 changed files
with
79 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { ZOOM } from '@/constants/panels'; | ||
import { test, expect } from '@playwright/test'; | ||
import { createText } from 'e2e/utils/canvas'; | ||
|
||
test.describe('context menu', async () => { | ||
test('prevents zoom when over a text node', async ({ page }) => { | ||
await page.goto('/'); | ||
|
||
await createText(page, [400, 450], { text: 'hello' }); | ||
|
||
// zoom in/out at text position (400, 450) | ||
await page.keyboard.down('Control'); | ||
await page.mouse.wheel(0, -10); | ||
await page.mouse.wheel(0, -20); | ||
await page.mouse.wheel(0, 30); | ||
await page.mouse.wheel(0, 40); | ||
|
||
await expect(page.getByTitle(ZOOM.reset.name)).toHaveText('100%'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters