mirror of
https://github.com/penpot/penpot.git
synced 2025-05-10 00:26:37 +02:00
🐛 Fix move scrollbar create a selection rectangle
This commit is contained in:
parent
09a671cffa
commit
232cfea709
7 changed files with 46 additions and 6 deletions
|
@ -51,6 +51,8 @@ export class WorkspacePage extends BaseWebSocketPage {
|
|||
this.palette = page.getByTestId("palette");
|
||||
this.sidebar = page.getByTestId("left-sidebar");
|
||||
this.librariesModal = page.getByTestId("libraries-modal");
|
||||
this.selectionRect = page.getByTestId("workspace-selection-rect");
|
||||
this.horizontalScrollbar = page.getByTestId("horizontal-scrollbar");
|
||||
}
|
||||
|
||||
async goToWorkspace({ fileId = WorkspacePage.anyFileId, pageId = WorkspacePage.anyPageId } = {}) {
|
||||
|
@ -102,6 +104,14 @@ export class WorkspacePage extends BaseWebSocketPage {
|
|||
await this.page.mouse.up();
|
||||
}
|
||||
|
||||
async panOnViewportAt(x, y, width, height) {
|
||||
await this.page.waitForTimeout(100);
|
||||
await this.viewport.hover({ position: { x, y } });
|
||||
await this.page.mouse.down({ button: "middle" });
|
||||
await this.viewport.hover({ position: { x: x + width, y: y + height } });
|
||||
await this.page.mouse.up({ button: "middle" });
|
||||
}
|
||||
|
||||
async togglePages() {
|
||||
const pagesToggle = this.page.getByText("Pages");
|
||||
await pagesToggle.click();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue