🎉 Add test to bug (#8928)

This commit is contained in:
Eva Marco 2026-04-15 09:16:16 +02:00 committed by GitHub
parent c63b9583a2
commit b0caa15516
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 68 additions and 3 deletions

View File

@ -981,3 +981,51 @@ test("Bug: 13960, User select shapes with different opacity and input show mixed
await expect(layerMenuSection
.getByRole('textbox', { name: 'Opacity' })).toHaveAttribute("placeholder", "Mixed");
});
test("BUG: 13930, Token colors are shown on selected colors section", async ({
page,
}) => {
const { workspacePage, tokensSidebar, tokenContextMenuForToken } =
await setupTokensFileRender(page);
await page.getByRole("tab", { name: "Layers" }).click();
await workspacePage.layers
.getByTestId("layer-row")
.filter({ hasText: "Button" })
.click();
await page.getByRole("tab", { name: "Tokens" }).click();
await unfoldTokenType(tokensSidebar, "color");
await tokensSidebar
.getByRole("button", { name: "black" })
.click({ button: "right" });
await tokenContextMenuForToken.getByText("Fill").click();
await page.getByRole("tab", { name: "Layers" }).click();
await workspacePage.layers
.getByTestId("layer-row")
.filter({ hasText: "Rectangle" })
.first()
.click({ modifiers: ["Shift"] });
await expect(
workspacePage.page.getByRole("region", { name: "Color selection section" }),
).toBeVisible();
await workspacePage.page
.getByRole("button", { name: "Resolved value: #7f9cf5" })
.click();
await expect(
workspacePage.page.getByRole("region", { name: "Color selection section" }),
).toBeVisible();
await expect(
workspacePage.page
.getByTestId("colorpicker")
.getByRole("button", { name: "colors.black" }),
).toBeVisible();
});

View File

@ -687,7 +687,7 @@ test.describe("Remapping group of tokens", () => {
await expect(lighterNode).toBeVisible();
// Verify that the applied token reference has been updated in the right sidebar for the selected shape
const fillSection = rightSidebar.getByTestId("fill-section");
const fillSection = rightSidebar.getByRole("region", { name: "Fill section" });
await expect(fillSection).toBeVisible();
const tokenReference = fillSection.getByLabel("lighter.primary", {

View File

@ -192,7 +192,8 @@
(conj prev-colors color))
(st/emit! (dwta/apply-token-on-color-selected color-operations token)))))]
[:div {:class (stl/css :element-set)}
[:section {:class (stl/css :element-set)
:aria-label (tr "workspace.options.selection-color.section")}
[:div {:class (stl/css :element-title)}
[:> title-bar* {:collapsable has-colors?
:collapsed (not open?)

View File

@ -194,7 +194,7 @@
(dom/set-attribute! checkbox "indeterminate" true)
(dom/remove-attribute! checkbox "indeterminate"))))
[:div {:class (stl/css :fill-section) :data-testid "fill-section"}
[:section {:class (stl/css :fill-section) :aria-label (tr "workspace.options.fill.section")}
[:div {:class (stl/css :fill-title)}
[:> title-bar* {:collapsable has-fills?
:collapsed (not open?)

View File

@ -6468,6 +6468,10 @@ msgstr "Export unexpectedly slow"
msgid "workspace.options.fill"
msgstr "Fill"
#: src/app/main/ui/workspace/sidebar/options/menus/fill.cljs
msgid "workspace.options.fill.section"
msgstr "Fill section"
#: src/app/main/ui/workspace/sidebar/options/menus/fill.cljs:208
msgid "workspace.options.fill.add-fill"
msgstr "Add fill"
@ -7083,6 +7087,10 @@ msgstr "More library colors"
msgid "workspace.options.more-token-colors"
msgstr "More color tokens"
#: src/app/main/ui/workspace/sidebar/options/menus/color_selection.cljs
msgid "workspace.options.selection-color.section"
msgstr "Color selection section"
#: src/app/main/ui/workspace/sidebar/options/menus/layer.cljs:229, src/app/main/ui/workspace/sidebar/options/menus/layer.cljs:241
msgid "workspace.options.opacity"
msgstr "Opacity"

View File

@ -6363,6 +6363,10 @@ msgstr "Exportación lenta"
msgid "workspace.options.fill"
msgstr "Relleno"
#: src/app/main/ui/workspace/sidebar/options/menus/fill.cljs
msgid "workspace.options.fill.section"
msgstr "Sección de relleno"
#: src/app/main/ui/workspace/sidebar/options/menus/fill.cljs:208
msgid "workspace.options.fill.add-fill"
msgstr "Añadir relleno"
@ -6978,6 +6982,10 @@ msgstr "Más colores de la biblioteca"
msgid "workspace.options.more-token-colors"
msgstr "Más tokens de color"
#: src/app/main/ui/workspace/sidebar/options/menus/color_selection.cljs
msgid "workspace.options.selection-color.section"
msgstr "Sección de colores seleccionados"
#: src/app/main/ui/workspace/sidebar/options/menus/layer.cljs:229, src/app/main/ui/workspace/sidebar/options/menus/layer.cljs:241
msgid "workspace.options.opacity"
msgstr "Opacidad"