mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 21:10:59 +00:00
test: register the auto-take job and field in the existing guards
This commit is contained in:
1 parent
67a55def44
commit
4386ac820e
4 files changed
+14
-1
No files matched your search
@@ -276,6 +276,11 @@ const PINNED_AFFORDANCES: Record<
|
||||
"src/components/medications/sections/intake-tracking-section.tsx": {
|
||||
"toast.success": 1,
|
||||
},
|
||||
// v1.42.2 — the auto-mark-taken switch confirms the flip, like its
|
||||
// intake-tracking sibling.
|
||||
"src/components/medications/sections/auto-mark-taken-section.tsx": {
|
||||
"toast.success": 1,
|
||||
},
|
||||
"src/components/medications/sections/inventory-section.tsx": {
|
||||
"toast.success": 1,
|
||||
},
|
||||
|
||||
@@ -438,7 +438,12 @@ describe("POST /api/medications/intake", () => {
|
||||
// v1.7.0 sync — the skip toggle bumps syncVersion.
|
||||
expect(prisma.medicationIntakeEvent.update).toHaveBeenCalledWith({
|
||||
where: { id: "e1" },
|
||||
data: { takenAt: null, skipped: true, syncVersion: { increment: 1 } },
|
||||
data: {
|
||||
takenAt: null,
|
||||
skipped: true,
|
||||
autoRecorded: false,
|
||||
syncVersion: { increment: 1 },
|
||||
},
|
||||
});
|
||||
// v1.16.10 — a row toggled out of taken refunds its consumption
|
||||
// stamp (no-op for a never-consumed row) and never consumes.
|
||||
|
||||
@@ -129,6 +129,8 @@ export const JOB_FACT_ALLOWLIST: ReadonlySet<string> = new Set([
|
||||
"in_window",
|
||||
"insufficient",
|
||||
"intake_auto_skip_count",
|
||||
"intake_auto_take_medications",
|
||||
"intake_auto_take_recorded",
|
||||
"intakes_pruned",
|
||||
"inventory_expired_count",
|
||||
"inventory_items_migrated",
|
||||
|
||||
@@ -101,6 +101,7 @@ describe("medications — documented shapes match the handlers", () => {
|
||||
takenAt: "2026-07-19T08:05:00.000Z",
|
||||
skipped: false,
|
||||
autoMissed: false,
|
||||
autoRecorded: false,
|
||||
attributionSource: "AUTO",
|
||||
source: "APPLE_HEALTH",
|
||||
idempotencyKey: null,
|
||||
|
||||
Reference in new issue
Block a user