mirror of
https://github.com/penpot/penpot.git
synced 2025-12-11 22:14:05 +01:00
🐛 Fix adding/removing identical text fills
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user