From dd76d987f0942dd856bdab06232256171bf3fa6b Mon Sep 17 00:00:00 2001 From: trent Date: Tue, 1 Dec 2026 01:16:49 +0800 Subject: [PATCH] Fix patient history store test for paginated digitization-history URL. --- vigilcare-records-web/src/__tests__/stores/batches.test.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/vigilcare-records-web/src/__tests__/stores/batches.test.ts b/vigilcare-records-web/src/__tests__/stores/batches.test.ts index 4a4574a..01560f1 100644 --- a/vigilcare-records-web/src/__tests__/stores/batches.test.ts +++ b/vigilcare-records-web/src/__tests__/stores/batches.test.ts @@ -411,6 +411,9 @@ describe('useBatchStore', () => { promotedBatches: 2, supersededBatches: 1, pendingBatches: 0, + page: 1, + pageSize: 50, + totalPages: 1, entries: [], } mockedGet.mockResolvedValueOnce({ success: true, statusCode: 200, data: history, error: null }) @@ -419,7 +422,9 @@ describe('useBatchStore', () => { const result = await store.getPatientHistory('p1') expect(result).toEqual(history) - expect(mockedGet).toHaveBeenCalledWith('patients/p1/digitization-history') + expect(mockedGet).toHaveBeenCalledWith( + 'patients/p1/digitization-history?page=1&pageSize=50', + ) }) it('returns null and sets error on failure', async () => {