mirror of
https://github.com/penpot/penpot.git
synced 2025-05-15 00:36:37 +02:00
✨ Add playwright tests for cut-copy-paste variants
This commit is contained in:
parent
785b61be2f
commit
dcf1a593f7
4 changed files with 486 additions and 0 deletions
|
@ -70,6 +70,7 @@ export class WorkspacePage extends BaseWebSocketPage {
|
|||
);
|
||||
this.toolbarOptions = page.getByTestId("toolbar-options");
|
||||
this.rectShapeButton = page.getByRole("button", { name: "Rectangle (R)" });
|
||||
this.ellipseShapeButton = page.getByRole("button", { name: "Ellipse (E)" });
|
||||
this.moveButton = page.getByRole("button", { name: "Move (V)" });
|
||||
this.boardButton = page.getByRole("button", { name: "Board (B)" });
|
||||
this.toggleToolbarButton = page.getByRole("button", {
|
||||
|
@ -198,6 +199,13 @@ export class WorkspacePage extends BaseWebSocketPage {
|
|||
await this.page.mouse.up();
|
||||
}
|
||||
|
||||
async clickAt(x, y) {
|
||||
await this.page.waitForTimeout(100);
|
||||
await this.viewport.hover({ position: { x, y } });
|
||||
await this.page.mouse.down();
|
||||
await this.page.mouse.up();
|
||||
}
|
||||
|
||||
async panOnViewportAt(x, y, width, height) {
|
||||
await this.page.waitForTimeout(100);
|
||||
await this.viewport.hover({ position: { x, y } });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue