From 77df0a2ac01fe3383600acc9911a0687b7b13bbd Mon Sep 17 00:00:00 2001 From: Tom Najdek Date: Mon, 25 Nov 2024 17:02:50 +0100 Subject: [PATCH] Fix tests after 53bf19f3 --- test/groups.test.jsx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/groups.test.jsx b/test/groups.test.jsx index 02a2bcd2..6c51c5b0 100644 --- a/test/groups.test.jsx +++ b/test/groups.test.jsx @@ -103,10 +103,23 @@ describe('Group libraries', () => { throw new Error('Unexpected request'); }), http.get('https://api.zotero.org/users/1/items/VR82JUX8/children', async () => { + // This is the parent item, this request is for the children of that item, we return the two attachments return HttpResponse.json(testUserChildren, { headers: { 'Total-Results': '2' }, }); }), + http.get('https://api.zotero.org/users/1/items/MWVZPK6B/children', async () => { + // This is the first attachment, this request is for the annotations for that attachment + return HttpResponse.json([], { + headers: { 'Total-Results': '0' }, + }) + }), + http.get('https://api.zotero.org/users/1/items/VG79HDDM/file', async () => { + // this is the second attachment, this request is for the annotations for that attachment + return HttpResponse.json([], { + headers: { 'Total-Results': '0' }, + }) + }), http.post('https://api.zotero.org/groups/5119976/items/ERER8Z7M/file', async ({request}) => { fileUploadRequests++; expect(await request.text()).toEqual('md5=39bf1f4635fb0a4b2b9de876ed865f89&filename=Kealy et al. - 2002 - Effects of diet restriction on life span and age-r.pdf&filesize=248058&mtime=1673607166000');