Add playwright tests for cut-copy-paste variants

This commit is contained in:
Pablo Alba 2025-04-10 14:17:09 +02:00 committed by Pablo Alba
parent 785b61be2f
commit dcf1a593f7
4 changed files with 486 additions and 0 deletions

View file

@ -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 } });