mirror of
https://github.com/penpot/penpot.git
synced 2025-12-12 06:24:17 +01:00
♻️ Refactor right sidebar state management
Also removing duplicated refs and improve efficiency of several other refs used on sidebar.
This commit is contained in:
@@ -182,12 +182,17 @@ test("Gradient stops limit", async ({ page }) => {
|
||||
const workspacePage = new WorkspacePage(page);
|
||||
await workspacePage.mockConfigFlags(["enable-frontend-binary-fills"]);
|
||||
await workspacePage.setupEmptyFile(page);
|
||||
|
||||
await workspacePage.mockRPC(
|
||||
"get-file-fragment?file-id=*&fragment-id=*",
|
||||
"workspace/get-file-fragment-gradient-limits.json",
|
||||
);
|
||||
|
||||
await workspacePage.goToWorkspace();
|
||||
await workspacePage.goToWorkspace({
|
||||
fileId: "c7ce0794-0992-8105-8004-38f280443849",
|
||||
pageId: "66697432-c33d-8055-8006-2c62cc084cad"
|
||||
});
|
||||
|
||||
await workspacePage.clickLeafLayer("Rectangle");
|
||||
|
||||
const swatch = workspacePage.page.getByRole("button", {
|
||||
|
||||
@@ -15,7 +15,10 @@ test("BUG 11552 - Apply styles to the current caret", async ({ page }) => {
|
||||
"text-editor/update-file-11552.json",
|
||||
);
|
||||
|
||||
await workspace.goToWorkspace();
|
||||
await workspace.goToWorkspace({
|
||||
fileId: "238a17e0-75ff-8075-8006-934586ea2230",
|
||||
pageId: "238a17e0-75ff-8075-8006-934586ea2231",
|
||||
});
|
||||
await workspace.clickLeafLayer("Lorem ipsum");
|
||||
await workspace.clickLeafLayer("Lorem ipsum");
|
||||
|
||||
|
||||
@@ -20,7 +20,10 @@ const setupEmptyTokensFile = async (page) => {
|
||||
"workspace/update-file-create-rect.json",
|
||||
);
|
||||
|
||||
await workspacePage.goToWorkspace();
|
||||
await workspacePage.goToWorkspace({
|
||||
fileId: "c7ce0794-0992-8105-8004-38f280443849",
|
||||
pageId: "66697432-c33d-8055-8006-2c62cc084cad",
|
||||
});
|
||||
|
||||
const tokensTabButton = page.getByRole("tab", { name: "Tokens" });
|
||||
await tokensTabButton.click();
|
||||
@@ -60,8 +63,8 @@ const setupTokensFile = async (page, options = {}) => {
|
||||
);
|
||||
|
||||
await workspacePage.goToWorkspace({
|
||||
fileId: "51e13852-1a8e-8037-8005-9e9413a1f1f6",
|
||||
pageId: "51e13852-1a8e-8037-8005-9e9413a1f1f7",
|
||||
fileId: "c7ce0794-0992-8105-8004-38f280443849",
|
||||
pageId: "66697432-c33d-8055-8006-2c62cc084cad",
|
||||
});
|
||||
|
||||
const tokensTabButton = page.getByRole("tab", { name: "Tokens" });
|
||||
|
||||
Reference in New Issue
Block a user