mirror of https://github.com/penpot/penpot.git
🔧 Refactor integration test to be cleaner (#8044)
This commit is contained in:
parent
b8efd2518d
commit
5fa4368d70
|
|
@ -2950,36 +2950,23 @@ test.describe("Tokens: Remapping Feature", () => {
|
||||||
|
|
||||||
// Verify the shape still has the shadow applied with the UPDATED color value
|
// Verify the shape still has the shadow applied with the UPDATED color value
|
||||||
// Expand the shadow section to access the color field
|
// Expand the shadow section to access the color field
|
||||||
const shadowSection = workspacePage.rightSidebar.getByText("Drop shadow");
|
const shadowSection = workspacePage.rightSidebar.getByTestId("shadow-section");
|
||||||
await expect(shadowSection).toBeVisible();
|
await expect(shadowSection).toBeVisible();
|
||||||
|
|
||||||
// Click to expand the shadow options (the menu button)
|
// Click to expand the shadow options (the menu button)
|
||||||
const shadowMenuButton = workspacePage.rightSidebar
|
const shadowMenuButton = shadowSection
|
||||||
.getByRole("button", { name: "options" })
|
.getByRole("button", { name: "options" })
|
||||||
.first();
|
.first();
|
||||||
await shadowMenuButton.click();
|
await shadowMenuButton.click();
|
||||||
|
|
||||||
// Wait for the advanced options to appear
|
// Wait for the advanced options to appear
|
||||||
await page.waitForTimeout(500);
|
await page.waitForTimeout(500);
|
||||||
|
|
||||||
// // Verify the color value has updated from #000000 to #FF0000
|
// Verify the color value has updated from #000000 to #FF0000
|
||||||
// // Find the color input - it should be a textbox with a 6-character hex value
|
const colorInput = shadowSection.getByRole("textbox", { name: "Color" });
|
||||||
// // We look for all textboxes and find the one with a hex color pattern
|
expect(colorInput).not.toBeNull();
|
||||||
// const allInputs = await workspacePage.rightSidebar
|
const colorValue = await colorInput.inputValue();
|
||||||
// .locator('input[type="text"]')
|
expect(colorValue.toUpperCase()).toBe("FF0000");
|
||||||
// .all();
|
|
||||||
|
|
||||||
// let colorInput = null;
|
|
||||||
// for (const input of allInputs) {
|
|
||||||
// const value = await input.inputValue().catch(() => '');
|
|
||||||
// if (/^[A-Fa-f0-9]{6}$/.test(value)) {
|
|
||||||
// colorInput = input;
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// expect(colorInput).not.toBeNull();
|
|
||||||
// const colorValue = await colorInput.inputValue();
|
|
||||||
// expect(colorValue.toUpperCase()).toBe("FF0000");
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -127,7 +127,8 @@
|
||||||
(-> shadow
|
(-> shadow
|
||||||
(assoc attr value)
|
(assoc attr value)
|
||||||
(ctss/check-shadow))))))))))]
|
(ctss/check-shadow))))))))))]
|
||||||
[:div {:class (stl/css :shadow-section)}
|
[:div {:data-testid "shadow-section"
|
||||||
|
:class (stl/css :shadow-section)}
|
||||||
[:div {:class (stl/css :shadow-title)}
|
[:div {:class (stl/css :shadow-title)}
|
||||||
[:> title-bar* {:collapsable has-shadows?
|
[:> title-bar* {:collapsable has-shadows?
|
||||||
:collapsed (not show-content?)
|
:collapsed (not show-content?)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue