mirror of
https://github.com/penpot/penpot.git
synced 2025-12-11 22:14:05 +01:00
🐛 Fix move scrollbar create a selection rectangle
This commit is contained in:
committed by
Alejandro Alonso
parent
09a671cffa
commit
232cfea709
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user