diff --git a/src/components/insights/__tests__/layout-coach-fab.test.tsx b/src/components/insights/__tests__/layout-coach-fab.test.tsx index 02183430a..767dca039 100644 --- a/src/components/insights/__tests__/layout-coach-fab.test.tsx +++ b/src/components/insights/__tests__/layout-coach-fab.test.tsx @@ -71,7 +71,7 @@ describe("", () => { expect(html).not.toContain("lg:bottom-6"); }); - it("paints a white glyph + offset focus ring on the gradient", () => { + it("paints the on-accent glyph + offset focus ring on the gradient", () => { mockPathname = "/"; const html = render( @@ -79,10 +79,11 @@ describe("", () => { , ); // The glyph is decorative (aria-hidden) and the button carries its own - // accessible name, so the text-contrast rule does not gate it; the - // white glyph reads as a clean mark on the gradient. The button still - // sets text-background for any non-glyph text it might hold. - expect(html).toContain("text-white"); + // accessible name, so the text-contrast rule does not gate it; the glyph + // shares the button's own on-accent token (text-background) rather than a + // harsh pure white, so it reads as a softer mark on the gradient. + expect(html).not.toContain("text-white"); + expect(html).toMatch(/lucide-sparkles[^"]*text-background/); // The offset ring draws a visible halo around the gradient circle and // provides the non-text UI-component contrast against the page. expect(html).toContain("focus-visible:ring-offset-2"); diff --git a/src/components/insights/layout-coach-fab.tsx b/src/components/insights/layout-coach-fab.tsx index 7eb903ad5..e59d77802 100644 --- a/src/components/insights/layout-coach-fab.tsx +++ b/src/components/insights/layout-coach-fab.tsx @@ -238,7 +238,7 @@ export function LayoutCoachFab() { "[body:has([data-testid=onboarding-tour])_&]:invisible", )} > -