From bdf214ee7dbd60244f895fc8e8c4593ba89fbc7c Mon Sep 17 00:00:00 2001 From: Sergei Maertens Date: Tue, 7 Jan 2025 23:21:39 +0100 Subject: [PATCH] :clown_face: [open-formulieren/open-forms#4929] Mock retrieving summary of submission from API --- src/api-mocks/submissions.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/api-mocks/submissions.js b/src/api-mocks/submissions.js index 65c5815a0..bc2842d40 100644 --- a/src/api-mocks/submissions.js +++ b/src/api-mocks/submissions.js @@ -92,6 +92,26 @@ export const mockSubmissionCheckLogicPost = () => return HttpResponse.json(responseData, {status: 200}); }); +export const mockSubmissionSummaryGet = () => + http.get(`${BASE_URL}submissions/:uuid/summary`, () => + HttpResponse.json( + [ + { + slug: SUBMISSION_STEP_DETAILS.slug, + name: SUBMISSION_DETAILS.steps[0].name, + data: [ + { + name: SUBMISSION_STEP_DETAILS.formStep.configuration.components[0].label, + value: 'Compnent 1 value', + component: SUBMISSION_STEP_DETAILS.formStep.configuration.components[0], + }, + ], + }, + ], + {status: 200} + ) + ); + /** * Simulate a successful backend processing status without payment. */