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(