🐛 Fix "Mixed" not showing up for layout padding inputs (#5741)

* 🐛 Fix layout padding inputs not showing 'mixed' text

*  Add integration test
This commit is contained in:
Belén Albeza 2025-02-03 09:51:26 +01:00 committed by GitHub
parent e486bb4bec
commit fe5de94db4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 484 additions and 10 deletions

View file

@ -172,3 +172,36 @@ test("BUG 9061 - Group blur visibility toggle icon not updating", async ({
await blurButton.click();
await expect(blurIcon).toHaveAttribute("href", "#icon-hide");
});
test("BUG 9543 - Layout padding inputs not showing 'mixed' when needed", async ({
page,
}) => {
const workspace = new WorkspacePage(page);
await workspace.setupEmptyFile();
await workspace.mockRPC(/get\-file\?/, "design/get-file-9543.json");
await workspace.mockRPC(
"get-file-fragment?file-id=*&fragment-id=*",
"design/get-file-fragment-9543.json",
);
await workspace.mockRPC("update-file?id=*", "design/update-file-9543.json");
await workspace.goToWorkspace({
fileId: "525a5d8b-028e-80e7-8005-aa6cad42f27d",
pageId: "525a5d8b-028e-80e7-8005-aa6cad42f27e",
});
await workspace.clickLeafLayer("Board");
let toggle = workspace.page.getByRole("button", {
name: "Show 4 sided padding options",
});
await toggle.click();
await workspace.page.getByLabel("Top padding").fill("10");
await toggle.click();
await expect(workspace.page.getByLabel("Vertical padding")).toHaveValue("");
await expect(workspace.page.getByLabel("Vertical padding")).toHaveAttribute(
"placeholder",
"Mixed",
);
});