From 4272a5b389079fea40ce0cec1dba561082072824 Mon Sep 17 00:00:00 2001 From: Matt Jaquiery Date: Mon, 13 May 2024 16:21:40 +0100 Subject: [PATCH 1/2] test: fix actions --- src/test/Mapping.test.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/test/Mapping.test.tsx b/src/test/Mapping.test.tsx index 1ca256a..a695b73 100644 --- a/src/test/Mapping.test.tsx +++ b/src/test/Mapping.test.tsx @@ -81,6 +81,8 @@ it('renders', async () => { return make_axios_response(access_levels_response, {config}) if (/teams$/.test(url)) return make_paged_axios_response([team_data], {config}) + if (url.endsWith('png')) + return make_axios_response({}, {config}) } console.error(`Unexpected axios request`, config) throw new Error(`Unexpected axios request to ${config.url ?? "unspecified URL"}`) From 61539468ac3880a0efdbb73684e4bcd113128fcb Mon Sep 17 00:00:00 2001 From: Matt Jaquiery Date: Mon, 13 May 2024 16:50:48 +0100 Subject: [PATCH 2/2] test: update ResourceCard to handle extra queries --- src/test/ResourceCard.test.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/test/ResourceCard.test.tsx b/src/test/ResourceCard.test.tsx index 5563ff9..356137d 100644 --- a/src/test/ResourceCard.test.tsx +++ b/src/test/ResourceCard.test.tsx @@ -196,6 +196,8 @@ const do_render = async () => { return make_paged_axios_response([api_data.cell_family, api_data.cell_family_2], {config}) if (/teams$/.test(url)) return make_paged_axios_response([api_data.team], {config}) + if (url.endsWith('applicable_mappings')) + return make_axios_response([], {config}) // handle cell_models etc let key = /cell_(\w+)$/.exec(url)?.[1] key = key?.replace(/ies$/, "y")