mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-10 13:22:14 +00:00
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:
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");
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user