🐛 Fix adding/removing identical text fills

This commit is contained in:
Belén Albeza
2025-10-14 14:58:47 +02:00
parent 85591bd579
commit 840c1f59bc
4 changed files with 170 additions and 5 deletions

View File

@@ -251,3 +251,40 @@ test("BUG 11177 - Font size input not showing 'mixed' when needed", async ({
await expect(fontSizeInput).toHaveValue("");
await expect(fontSizeInput).toHaveAttribute("placeholder", "Mixed");
});
test("BUG 12287 Fix identical text fills not being added/removed", async ({
page,
}) => {
const workspace = new WorkspacePage(page);
await workspace.setupEmptyFile();
await workspace.mockRPC(/get\-file\?/, "design/get-file-12287.json");
await workspace.goToWorkspace({
fileId: "4bdef584-e28a-8155-8006-f3f8a71b382e",
pageId: "4bdef584-e28a-8155-8006-f3f8a71b382f",
});
await workspace.clickLeafLayer("Lorem ipsum");
const addFillButton = workspace.page.getByRole("button", {
name: "Add fill",
});
await addFillButton.click();
await addFillButton.click();
await addFillButton.click();
await addFillButton.click();
await expect(
workspace.page.getByRole("button", { name: "#B1B2B5" }),
).toHaveCount(4);
await workspace.page
.getByRole("button", { name: "Remove color" })
.first()
.click();
await expect(
workspace.page.getByRole("button", { name: "#B1B2B5" }),
).toHaveCount(3);
});