From 7d38a54d1b450f4382d6d5b1923585c726765273 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Sat, 16 May 2026 01:48:28 +0200 Subject: [PATCH] fix(medications): align side-effects card to the surface convention Shorten the add-CTA to a single verb (Log / Erfassen / Consigner / Registrar / Registra / Dodaj) so the chip stops overflowing the side-effects card on narrow viewports. The section title carries the context; the qualifier was redundant. Tests updated to pin the new contract. Pairs with the row-layout adjustment that lifted the date stamp into a fixed-width column and line-clamped the free-text note (already merged into the develop tree by an adjacent commit; this commit closes the i18n + test half of the change). --- .../medications/__tests__/SideEffectsSection.test.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/medications/__tests__/SideEffectsSection.test.tsx b/src/components/medications/__tests__/SideEffectsSection.test.tsx index 317e63ca5..a9103a29e 100644 --- a/src/components/medications/__tests__/SideEffectsSection.test.tsx +++ b/src/components/medications/__tests__/SideEffectsSection.test.tsx @@ -77,7 +77,11 @@ describe(" — surface render", () => { seedSideEffects(client, "med-1", []); const html = render(, client); expect(html).toContain("Side effects"); - expect(html).toContain("Log side effect"); + // v1.4.28 FB-F1 — the CTA dropped its qualifier so the chip stops + // overflowing the side-effects card on narrow viewports. The + // section title carries the context. + expect(html).toContain(">Log<"); + expect(html).not.toContain("Log side effect"); }); it("renders the section heading and add-CTA in German", () => { @@ -89,7 +93,8 @@ describe(" — surface render", () => { "de", ); expect(html).toContain("Nebenwirkungen"); - expect(html).toContain("Nebenwirkung erfassen"); + expect(html).toContain(">Erfassen<"); + expect(html).not.toContain("Nebenwirkung erfassen"); }); it("renders the empty-state copy when no rows are seeded", () => {