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";
44import {
55 resolveEnvironmentIdentificationPillLabel,
66 resolveSidebarStageBackdropVariant,
7 resolveSidebarStageFocusRingOffsetClass,
87 StageBackdropArt,
9 StageBackdropButtonArt,
108} from "./SidebarStageBackdrop";
119
1210describe("SidebarStageBackdrop", () => {
......@@ -24,15 +22,6 @@ describe("SidebarStageBackdrop", () => {
2422 expect(resolveEnvironmentIdentificationPillLabel("Alpha")).toBeNull();
2523 });
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
3625 it.each(["nightly", "dev"] as const)(
3726 "uses unique SVG definition ids when %s artwork is rendered more than once",
3827 (variant) => {
......@@ -48,26 +37,4 @@ describe("SidebarStageBackdrop", () => {
4837 expect(new Set(ids).size).toBe(ids.length);
4938 },
5039 );
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 });
7340});