From 54c4029468746d588c129f262c81ee9f821c8ffb Mon Sep 17 00:00:00 2001 From: Pyry Koivisto Date: Wed, 25 Sep 2024 12:12:37 +0300 Subject: [PATCH] VKT(Frontend): Fix msw test setup [deploy] --- frontend/packages/vkt/src/tests/msw/handlers.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/packages/vkt/src/tests/msw/handlers.ts b/frontend/packages/vkt/src/tests/msw/handlers.ts index a04a7d71c..88dec2843 100644 --- a/frontend/packages/vkt/src/tests/msw/handlers.ts +++ b/frontend/packages/vkt/src/tests/msw/handlers.ts @@ -16,6 +16,7 @@ import { publicEnrollmentInitialisationWithFreeEnrollments, } from 'tests/msw/fixtures/publicEnrollmentInitialisation'; import { publicExamEvents11 } from 'tests/msw/fixtures/publicExamEvents11'; +import { AppRoutes } from 'enums/app'; export const handlers = [ http.get(APIEndpoints.ClerkUser, ({ cookies }) => { @@ -37,7 +38,10 @@ export const handlers = [ http.get(APIEndpoints.PublicEducation, ({ request }) => { if ( request.referrer.endsWith( - `/vkt/ilmoittaudu/${examEventIdWithKoskiEducationDetailsFound}/koulutus`, + AppRoutes.PublicEnrollmentEducationDetails.replace( + /:examEventId/, + `${examEventIdWithKoskiEducationDetailsFound}`, + ), ) ) { return new Response(