From 5570971f3dae903a3297b29a5dc80abd9c0e2f21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Sat, 16 May 2026 02:08:08 +0200 Subject: [PATCH] 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. --- src/app/__tests__/targets-responsive.test.tsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/app/__tests__/targets-responsive.test.tsx b/src/app/__tests__/targets-responsive.test.tsx index 2268b43f7..5495485e5 100644 --- a/src/app/__tests__/targets-responsive.test.tsx +++ b/src/app/__tests__/targets-responsive.test.tsx @@ -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"); }); });