Skip to content

Commit

Permalink
VKT(Frontend): Fix msw test setup [deploy]
Browse files Browse the repository at this point in the history
  • Loading branch information
pkoivisto committed Sep 25, 2024
1 parent 73e3e0b commit 54c4029
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frontend/packages/vkt/src/tests/msw/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) => {
Expand All @@ -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(
Expand Down

0 comments on commit 54c4029

Please sign in to comment.