mirror of
https://github.com/penpot/penpot.git
synced 2025-06-03 15:51:40 +02:00
🐛 Fix problem when changing colorpicker alpha (#5770)
This commit is contained in:
parent
0b90722d5a
commit
cdfc0fd988
3 changed files with 34 additions and 1 deletions
|
@ -181,3 +181,34 @@ test("Bug 9900 - Color picker has no inputs for HSV values", async ({
|
|||
await workspacePage.page.getByLabel("S", { exact: true }).isVisible();
|
||||
await workspacePage.page.getByLabel("V", { exact: true }).isVisible();
|
||||
});
|
||||
|
||||
test("Bug 10089 - Cannot change alpha", async ({ page }) => {
|
||||
const workspacePage = new WorkspacePage(page);
|
||||
await workspacePage.setupEmptyFile();
|
||||
await workspacePage.mockRPC(
|
||||
/get\-file\?/,
|
||||
"workspace/get-file-not-empty.json",
|
||||
);
|
||||
await workspacePage.mockRPC(
|
||||
"update-file?id=*",
|
||||
"workspace/update-file-create-rect.json",
|
||||
);
|
||||
|
||||
await workspacePage.goToWorkspace({
|
||||
fileId: "6191cd35-bb1f-81f7-8004-7cc63d087374",
|
||||
pageId: "6191cd35-bb1f-81f7-8004-7cc63d087375",
|
||||
});
|
||||
await workspacePage.clickLeafLayer("Rectangle");
|
||||
|
||||
const swatch = workspacePage.page.getByRole("button", { name: "#B1B2B5" });
|
||||
const swatchBox = await swatch.boundingBox();
|
||||
await swatch.click();
|
||||
|
||||
const alpha = workspacePage.page.getByLabel("A", { exact: true });
|
||||
await expect(alpha).toHaveValue("100");
|
||||
|
||||
const alphaSlider = workspacePage.page.getByTestId("slider-opacity");
|
||||
await alphaSlider.click();
|
||||
|
||||
await expect(alpha).toHaveValue("50");
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue