mirror of
https://github.com/penpot/penpot.git
synced 2025-06-03 00:21:40 +02:00
🐛 Toolbar keeps toggling on and off on spacebar press
This commit is contained in:
parent
058a72b817
commit
740a872231
6 changed files with 34 additions and 3 deletions
|
@ -43,7 +43,9 @@ export class WorkspacePage extends BaseWebSocketPage {
|
|||
this.presentUserListItems = page.getByTestId("active-users-list").getByAltText("Princesa Leia");
|
||||
this.viewport = page.getByTestId("viewport");
|
||||
this.rootShape = page.locator(`[id="shape-00000000-0000-0000-0000-000000000000"]`);
|
||||
this.toolbarOptions = page.getByTestId("toolbar-options");
|
||||
this.rectShapeButton = page.getByRole("button", { name: "Rectangle (R)" });
|
||||
this.toggleToolbarButton = page.getByRole("button", { name: "Toggle toolbar" });
|
||||
this.colorpicker = page.getByTestId("colorpicker");
|
||||
this.layers = page.getByTestId("layer-tree");
|
||||
this.palette = page.getByTestId("palette");
|
||||
|
@ -121,6 +123,10 @@ export class WorkspacePage extends BaseWebSocketPage {
|
|||
);
|
||||
}
|
||||
|
||||
async expectHiddenToolbarOptions() {
|
||||
await expect(this.toolbarOptions).toHaveCSS("opacity", "0");
|
||||
}
|
||||
|
||||
async clickAssets(clickOptions = {}) {
|
||||
await this.sidebar.getByText("Assets").click(clickOptions);
|
||||
}
|
||||
|
|
|
@ -53,3 +53,14 @@ test("User makes a group", async ({ page }) => {
|
|||
await workspacePage.page.keyboard.press("ControlOrMeta+g");
|
||||
await workspacePage.expectSelectedLayer("Group");
|
||||
});
|
||||
|
||||
test("Bug 7654 - Toolbar keeps toggling on and off on spacebar press", async ({ page }) => {
|
||||
const workspacePage = new WorkspacePage(page);
|
||||
await workspacePage.setupEmptyFile();
|
||||
await workspacePage.goToWorkspace();
|
||||
|
||||
await workspacePage.toggleToolbarButton.click();
|
||||
await workspacePage.page.keyboard.press("Backspace");
|
||||
await workspacePage.page.keyboard.press("Enter");
|
||||
await workspacePage.expectHiddenToolbarOptions();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue