feat: stack related date fields and clarify share stock labels (#422)

* feat: stack related date fields and clarify share stock labels

* test: cover stacked date pairs and share labels
This commit is contained in:
Daniel Volz
2026-03-12 21:32:56 +01:00
committed by GitHub
parent 3fda41e501
commit d0837a7281
12 changed files with 238 additions and 63 deletions
@@ -161,6 +161,18 @@ describe("MobileEditModal", () => {
expect(screen.getByText(/form\.genericName/i)).toBeInTheDocument();
});
it("groups medication start and end date fields in one stacked date pair", () => {
render(<MobileEditModal {...defaultProps} />);
const datePairGroup = document.querySelector(".date-pair-group");
expect(datePairGroup).toBeInTheDocument();
const dateFields = Array.from(datePairGroup?.querySelectorAll(".date-pair-field") ?? []);
expect(dateFields).toHaveLength(2);
expect(dateFields[0]).toHaveTextContent("form.medicationStartDate");
expect(dateFields[1]).toHaveTextContent("form.medicationEndDate");
});
it("renders packs input", () => {
render(<MobileEditModal {...defaultProps} />);