authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-09-05 08:43:24-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-09-05 08:43:24-07:00
loga324cabc04019be14e8b66ec983fabf510ae2b2e
treeaaf15ad4a8307f2380d56a4a997daf984cdf1c2f
parent29c3a54a4e64cbfcb42a6545e9c66482e3549522
signature Signed by PGP key B5690EEEBB952194

test(web): drop sidebar artwork styling snapshots (#10152)


1 files changed, 0 insertions(+), 33 deletions(-)

apps/web/src/components/SidebarStageBackdrop.test.tsx-33
...@@ -4,9 +4,7 @@ import { renderToStaticMarkup } from "react-dom/server";...@@ -4,9 +4,7 @@ import { renderToStaticMarkup } from "react-dom/server";
4import {4import {
5 resolveEnvironmentIdentificationPillLabel,5 resolveEnvironmentIdentificationPillLabel,
6 resolveSidebarStageBackdropVariant,6 resolveSidebarStageBackdropVariant,
7 resolveSidebarStageFocusRingOffsetClass,
8 StageBackdropArt,7 StageBackdropArt,
9 StageBackdropButtonArt,
10} from "./SidebarStageBackdrop";8} from "./SidebarStageBackdrop";
119
12describe("SidebarStageBackdrop", () => {10describe("SidebarStageBackdrop", () => {
...@@ -24,15 +22,6 @@ describe("SidebarStageBackdrop", () => {...@@ -24,15 +22,6 @@ describe("SidebarStageBackdrop", () => {
24 expect(resolveEnvironmentIdentificationPillLabel("Alpha")).toBeNull();22 expect(resolveEnvironmentIdentificationPillLabel("Alpha")).toBeNull();
25 });23 });
2624
27 it("matches the focus-ring offset to each artwork palette", () => {
28 expect(resolveSidebarStageFocusRingOffsetClass("nightly")).toBe(
29 "focus-visible:ring-offset-(--stage-night-bottom)",
30 );
31 expect(resolveSidebarStageFocusRingOffsetClass("dev")).toBe(
32 "focus-visible:ring-offset-(--stage-art-bottom)",
33 );
34 });
35
36 it.each(["nightly", "dev"] as const)(25 it.each(["nightly", "dev"] as const)(
37 "uses unique SVG definition ids when %s artwork is rendered more than once",26 "uses unique SVG definition ids when %s artwork is rendered more than once",
38 (variant) => {27 (variant) => {
...@@ -48,26 +37,4 @@ describe("SidebarStageBackdrop", () => {...@@ -48,26 +37,4 @@ describe("SidebarStageBackdrop", () => {
48 expect(new Set(ids).size).toBe(ids.length);37 expect(new Set(ids).size).toBe(ids.length);
49 },38 },
50 );39 );
51
52 it("paints each artwork variant with theme-owned color tokens", () => {
53 const nightlyMarkup = renderToStaticMarkup(<StageBackdropArt variant="nightly" />);
54 const devMarkup = renderToStaticMarkup(<StageBackdropArt variant="dev" />);
55
56 expect(nightlyMarkup).toContain("var(--stage-night-bottom)");
57 expect(nightlyMarkup).toContain("var(--stage-night-line)");
58 expect(devMarkup).toContain("var(--stage-art-bottom)");
59 expect(devMarkup).toContain("var(--stage-art-line)");
60 expect(nightlyMarkup).not.toMatch(/#[0-9a-f]{3,8}/i);
61 expect(devMarkup).not.toMatch(/#[0-9a-f]{3,8}/i);
62 });
63
64 it.each([
65 ["nightly", "96 0 8192 96"],
66 ["dev", "64 0 8192 96"],
67 ] as const)("uses the compact %s crop inside the send button", (variant, viewBox) => {
68 const markup = renderToStaticMarkup(<StageBackdropButtonArt variant={variant} />);
69
70 expect(markup).toContain(`viewBox="${viewBox}"`);
71 expect(markup).toContain(`stage-${variant === "dev" ? "blueprint" : "nightly"}`);
72 });
73});40});