test(targets): update coach CTA assertion to the icon-only shape

The targets-page Coach CTA collapsed to an icon-only affordance in
1b0e81ae; the old assertion still expected the text-bearing
`w-full sm:w-auto` wrapper. Pin the new shape: data-slot,
aria-label, and the size-10 icon button.
This commit is contained in:
Marc-André Bombeck committed 2026-05-16 02:08:08 +02:00
1 parent 75773ca07a
commit 5570971f3d
1 file changed
+4 -5
@@ -123,11 +123,10 @@ describe("/targets page — mobile-first responsive grid", () => {
expect(html).toMatch(/lg:gap-6/);
});
it("renders the Coach CTA full-width on mobile when AI is enabled", () => {
it("renders the Coach CTA as an icon-only affordance on every target card", () => {
const html = render();
// The TargetCoachButton wraps the Sparkles + "Ask Coach" label;
// its container element should carry the mobile full-width class.
expect(html).toContain("w-full");
expect(html).toContain("sm:w-auto");
expect(html).toContain('data-slot="target-coach-cta"');
expect(html).toContain('aria-label="Ask Coach"');
expect(html).toContain("size-10");
});
});