From 18702e1c8bcad31ebe4c51f60d0ebadbffaa600c Mon Sep 17 00:00:00 2001 From: Pyry Koivisto Date: Thu, 28 Dec 2023 14:26:03 +0200 Subject: [PATCH 1/3] OTR:VKT(Frontend): Fix shared version --- frontend/packages/otr/package.json | 2 +- frontend/packages/vkt/package.json | 2 +- frontend/yarn.lock | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/frontend/packages/otr/package.json b/frontend/packages/otr/package.json index 4a3bbd39d..3bebfc82c 100644 --- a/frontend/packages/otr/package.json +++ b/frontend/packages/otr/package.json @@ -25,6 +25,6 @@ "otr:tslint": "yarn g:tsc --pretty --noEmit" }, "dependencies": { - "shared": "npm:@opetushallitus/kieli-ja-kaantajatutkinnot.shared@1.10.1" + "shared": "npm:@opetushallitus/kieli-ja-kaantajatutkinnot.shared@1.10.2" } } diff --git a/frontend/packages/vkt/package.json b/frontend/packages/vkt/package.json index 3ed7244fb..33b69f8c5 100644 --- a/frontend/packages/vkt/package.json +++ b/frontend/packages/vkt/package.json @@ -26,6 +26,6 @@ }, "dependencies": { "reduxjs-toolkit-persist": "^7.2.1", - "shared": "npm:@opetushallitus/kieli-ja-kaantajatutkinnot.shared@1.10.1" + "shared": "npm:@opetushallitus/kieli-ja-kaantajatutkinnot.shared@1.10.2" } } diff --git a/frontend/yarn.lock b/frontend/yarn.lock index 924bafb25..d2df9e5ca 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -2520,7 +2520,7 @@ __metadata: version: 0.0.0-use.local resolution: "@opetushallitus/kieli-ja-kaantajatutkinnot.akr@workspace:packages/akr" dependencies: - shared: "npm:@opetushallitus/kieli-ja-kaantajatutkinnot.shared@1.10.1" + shared: "npm:@opetushallitus/kieli-ja-kaantajatutkinnot.shared@1.10.2" languageName: unknown linkType: soft @@ -2528,7 +2528,7 @@ __metadata: version: 0.0.0-use.local resolution: "@opetushallitus/kieli-ja-kaantajatutkinnot.otr@workspace:packages/otr" dependencies: - shared: "npm:@opetushallitus/kieli-ja-kaantajatutkinnot.shared@1.10.1" + shared: "npm:@opetushallitus/kieli-ja-kaantajatutkinnot.shared@1.10.2" languageName: unknown linkType: soft @@ -2620,7 +2620,7 @@ __metadata: languageName: unknown linkType: soft -"@opetushallitus/kieli-ja-kaantajatutkinnot.shared@workspace:packages/shared, shared@npm:@opetushallitus/kieli-ja-kaantajatutkinnot.shared@1.10.1": +"@opetushallitus/kieli-ja-kaantajatutkinnot.shared@workspace:packages/shared, shared@npm:@opetushallitus/kieli-ja-kaantajatutkinnot.shared@1.10.2": version: 0.0.0-use.local resolution: "@opetushallitus/kieli-ja-kaantajatutkinnot.shared@workspace:packages/shared" languageName: unknown @@ -2631,7 +2631,7 @@ __metadata: resolution: "@opetushallitus/kieli-ja-kaantajatutkinnot.vkt@workspace:packages/vkt" dependencies: reduxjs-toolkit-persist: ^7.2.1 - shared: "npm:@opetushallitus/kieli-ja-kaantajatutkinnot.shared@1.10.1" + shared: "npm:@opetushallitus/kieli-ja-kaantajatutkinnot.shared@1.10.2" languageName: unknown linkType: soft @@ -2640,7 +2640,7 @@ __metadata: resolution: "@opetushallitus/kieli-ja-kaantajatutkinnot.yki@workspace:packages/yki" dependencies: multer: ^1.4.5-lts.1 - shared: "npm:@opetushallitus/kieli-ja-kaantajatutkinnot.shared@1.10.1" + shared: "npm:@opetushallitus/kieli-ja-kaantajatutkinnot.shared@1.10.2" languageName: unknown linkType: soft From c66850c680784bdaa434b782bbba07cee593aaee Mon Sep 17 00:00:00 2001 From: Pyry Koivisto Date: Thu, 28 Dec 2023 12:40:09 +0200 Subject: [PATCH 2/3] YKI(Frontend): Update fixtures and serialization logic [deploy] --- .../rest/examSessions/allExamSessions.json | 22 +++++++++---------- .../dev/rest/examSessions/examSessions.json | 12 +++++----- .../yki/dev/rest/registration/prices.json | 14 ++++++------ .../rest/registration/registrationInit.json | 2 +- .../registrationInitEmailAuth.json | 2 +- .../yki/src/interfaces/examSessions.ts | 2 -- .../yki/src/tests/msw/fixtures/examSession.ts | 20 ++++++++--------- .../packages/yki/src/utils/serialization.ts | 1 - 8 files changed, 36 insertions(+), 39 deletions(-) diff --git a/frontend/packages/yki/dev/rest/examSessions/allExamSessions.json b/frontend/packages/yki/dev/rest/examSessions/allExamSessions.json index 0cdbc85bb..11a810d33 100644 --- a/frontend/packages/yki/dev/rest/examSessions/allExamSessions.json +++ b/frontend/packages/yki/dev/rest/examSessions/allExamSessions.json @@ -46,7 +46,7 @@ "zip": "00100" } ], - "exam_fee": "100.00", + "exam_fee": 200, "registration_end_date": "2023-01-03", "open": true, "queue_full": false, @@ -102,7 +102,7 @@ "zip": "00100" } ], - "exam_fee": "100.00", + "exam_fee": 200, "registration_end_date": "2023-01-03", "open": true, "queue_full": false, @@ -158,7 +158,7 @@ "zip": "00100" } ], - "exam_fee": "100.00", + "exam_fee": 200, "registration_end_date": "2039-12-10", "open": true, "queue_full": false, @@ -214,7 +214,7 @@ "zip": "00100" } ], - "exam_fee": "100.00", + "exam_fee": 153, "registration_end_date": "2039-12-14", "open": false, "queue_full": false, @@ -269,7 +269,7 @@ "zip": "00100" } ], - "exam_fee": "123.00", + "exam_fee": 176, "registration_end_date": "2039-02-28", "open": true, "queue_full": false, @@ -324,7 +324,7 @@ "zip": "00100" } ], - "exam_fee": "123.00", + "exam_fee": 153, "registration_end_date": "2039-02-28", "open": true, "queue_full": true, @@ -377,7 +377,7 @@ "zip": "40100" } ], - "exam_fee": "100.00", + "exam_fee": 176, "registration_end_date": "2039-02-28", "open": true, "queue_full": false, @@ -430,7 +430,7 @@ "zip": "40100" } ], - "exam_fee": "160.00", + "exam_fee": 200, "registration_end_date": "2029-02-28", "open": true, "queue_full": false, @@ -482,7 +482,7 @@ "zip": "40100" } ], - "exam_fee": "100.00", + "exam_fee": 153, "registration_end_date": "2039-02-28", "open": true, "queue_full": false, @@ -534,7 +534,7 @@ "zip": "00250" } ], - "exam_fee": "100.00", + "exam_fee": 153, "registration_end_date": "2039-02-28", "open": true, "queue_full": true, @@ -588,7 +588,7 @@ "zip": "00250" } ], - "exam_fee": "123.00", + "exam_fee": 176, "registration_end_date": "2020-12-02", "open": true, "queue_full": true, diff --git a/frontend/packages/yki/dev/rest/examSessions/examSessions.json b/frontend/packages/yki/dev/rest/examSessions/examSessions.json index 0a0282c8b..547f6b8e8 100644 --- a/frontend/packages/yki/dev/rest/examSessions/examSessions.json +++ b/frontend/packages/yki/dev/rest/examSessions/examSessions.json @@ -47,7 +47,7 @@ "organizer_oid": "1.2.3.4", "language_code": "eng", "level_code": "KESKI", - "exam_fee": "100.00", + "exam_fee": 176, "open": true, "queue": 0, "queue_full": false, @@ -103,7 +103,7 @@ "organizer_oid": "1.2.3.4", "language_code": "eng", "level_code": "KESKI", - "exam_fee": "100.00", + "exam_fee": 176, "open": false, "queue": 0, "queue_full": false, @@ -159,7 +159,7 @@ "organizer_oid": "1.2.3.4", "language_code": "fin", "level_code": "PERUS", - "exam_fee": "100.00", + "exam_fee": 153, "open": false, "queue": 1, "queue_full": false, @@ -215,7 +215,7 @@ "organizer_oid": "1.2.3.4", "language_code": "fin", "level_code": "KESKI", - "exam_fee": "100.00", + "exam_fee": 176, "open": false, "queue": 0, "queue_full": false, @@ -272,7 +272,7 @@ "organizer_oid": "1.2.3.4", "language_code": "fin", "level_code": "YLIN", - "exam_fee": "100.00", + "exam_fee": 200, "open": false, "queue": 0, "queue_full": false, @@ -329,7 +329,7 @@ "organizer_oid": "1.2.3.4", "language_code": "eng", "level_code": "KESKI", - "exam_fee": "100.00", + "exam_fee": 176, "open": true, "queue": 0, "queue_full": false, diff --git a/frontend/packages/yki/dev/rest/registration/prices.json b/frontend/packages/yki/dev/rest/registration/prices.json index 5af566a1b..e3ade7065 100644 --- a/frontend/packages/yki/dev/rest/registration/prices.json +++ b/frontend/packages/yki/dev/rest/registration/prices.json @@ -1,13 +1,13 @@ { "exam-prices": { - "PERUS": "120.00", - "KESKI": "140.00", - "YLIN": "180.00" + "PERUS": 153, + "KESKI": 176, + "YLIN": 200 }, "evaluation-prices": { - "READING": "50.00", - "LISTENING": "50.00", - "WRITING": "50.00", - "SPEAKING": "50.00" + "READING": 50, + "LISTENING": 50, + "WRITING": 50, + "SPEAKING": 50 } } \ No newline at end of file diff --git a/frontend/packages/yki/dev/rest/registration/registrationInit.json b/frontend/packages/yki/dev/rest/registration/registrationInit.json index ce2b2773f..9e8a572e4 100644 --- a/frontend/packages/yki/dev/rest/registration/registrationInit.json +++ b/frontend/packages/yki/dev/rest/registration/registrationInit.json @@ -40,7 +40,7 @@ "lang": "en" } ], - "exam_fee": "100.00" + "exam_fee": 153 }, "user": { "last_name": "Parkkonen-Testi", diff --git a/frontend/packages/yki/dev/rest/registration/registrationInitEmailAuth.json b/frontend/packages/yki/dev/rest/registration/registrationInitEmailAuth.json index 58996c2fc..c8c67df78 100644 --- a/frontend/packages/yki/dev/rest/registration/registrationInitEmailAuth.json +++ b/frontend/packages/yki/dev/rest/registration/registrationInitEmailAuth.json @@ -40,7 +40,7 @@ "lang": "en" } ], - "exam_fee": "100.00" + "exam_fee": 176 }, "user": { "email": "test@test.com" diff --git a/frontend/packages/yki/src/interfaces/examSessions.ts b/frontend/packages/yki/src/interfaces/examSessions.ts index 33d154cbe..b70fdf5de 100644 --- a/frontend/packages/yki/src/interfaces/examSessions.ts +++ b/frontend/packages/yki/src/interfaces/examSessions.ts @@ -28,14 +28,12 @@ export interface ExamSessionResponse | 'post_admission_end_date' | 'registration_start_date' | 'registration_end_date' - | 'exam_fee' > { session_date: string; post_admission_start_date?: string; post_admission_end_date?: string; registration_start_date?: string; registration_end_date?: string; - exam_fee?: string; } export interface ExamSessionLocation { diff --git a/frontend/packages/yki/src/tests/msw/fixtures/examSession.ts b/frontend/packages/yki/src/tests/msw/fixtures/examSession.ts index 127fe2109..2496d7ec0 100644 --- a/frontend/packages/yki/src/tests/msw/fixtures/examSession.ts +++ b/frontend/packages/yki/src/tests/msw/fixtures/examSession.ts @@ -46,7 +46,7 @@ export const examSessions = { zip: '00100', }, ], - exam_fee: '100.00', + exam_fee: 200, registration_end_date: '2023-01-03', open: true, queue_full: false, @@ -102,7 +102,7 @@ export const examSessions = { zip: '00100', }, ], - exam_fee: '100.00', + exam_fee: 200, registration_end_date: '2023-01-03', open: true, queue_full: false, @@ -158,7 +158,7 @@ export const examSessions = { zip: '00100', }, ], - exam_fee: '100.00', + exam_fee: 200, registration_end_date: '2039-12-10', open: true, queue_full: false, @@ -214,7 +214,7 @@ export const examSessions = { zip: '00100', }, ], - exam_fee: '100.00', + exam_fee: 153, registration_end_date: '2039-12-14', open: false, queue_full: false, @@ -269,7 +269,7 @@ export const examSessions = { zip: '00100', }, ], - exam_fee: '123.00', + exam_fee: 176, registration_end_date: '2039-02-28', open: true, queue_full: false, @@ -322,7 +322,7 @@ export const examSessions = { zip: '40100', }, ], - exam_fee: '100.00', + exam_fee: 176, registration_end_date: '2039-02-28', open: true, queue_full: false, @@ -375,7 +375,7 @@ export const examSessions = { zip: '40100', }, ], - exam_fee: '160.00', + exam_fee: 200, registration_end_date: '2029-02-28', open: true, queue_full: false, @@ -427,7 +427,7 @@ export const examSessions = { zip: '40100', }, ], - exam_fee: '100.00', + exam_fee: 153, registration_end_date: '2039-02-28', open: true, queue_full: false, @@ -479,7 +479,7 @@ export const examSessions = { zip: '00250', }, ], - exam_fee: '100.00', + exam_fee: 153, registration_end_date: '2039-02-28', open: true, queue_full: true, @@ -533,7 +533,7 @@ export const examSessions = { zip: '00250', }, ], - exam_fee: '123.00', + exam_fee: 176, registration_end_date: '2020-12-02', open: true, queue_full: true, diff --git a/frontend/packages/yki/src/utils/serialization.ts b/frontend/packages/yki/src/utils/serialization.ts index ae2c8ba63..387a4abe1 100644 --- a/frontend/packages/yki/src/utils/serialization.ts +++ b/frontend/packages/yki/src/utils/serialization.ts @@ -66,7 +66,6 @@ export class SerializationUtils { registration_end_date: SerializationUtils.deserializeEndTime( examSessionResponse.registration_end_date ) as Dayjs, - exam_fee: parseInt(examSessionResponse.exam_fee as string), }; } From de72d234b1877d1e3aa623e3f923b4e619d0074f Mon Sep 17 00:00:00 2001 From: Pyry Koivisto Date: Thu, 28 Dec 2023 14:19:06 +0200 Subject: [PATCH 3/3] YKI(Frontend): Fix snapshots [deploy] --- .../PublicExamSessionListing.test.tsx.snap | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/frontend/packages/yki/src/tests/jest/components/registration/examSession/__snapshots__/PublicExamSessionListing.test.tsx.snap b/frontend/packages/yki/src/tests/jest/components/registration/examSession/__snapshots__/PublicExamSessionListing.test.tsx.snap index 0b5fa374b..f7014c9eb 100644 --- a/frontend/packages/yki/src/tests/jest/components/registration/examSession/__snapshots__/PublicExamSessionListing.test.tsx.snap +++ b/frontend/packages/yki/src/tests/jest/components/registration/examSession/__snapshots__/PublicExamSessionListing.test.tsx.snap @@ -251,7 +251,7 @@ Array [ aria-sort={null} className="MuiTableCell-root MuiTableCell-body MuiTableCell-sizeMedium css-1ex1afd-MuiTableCell-root" > - 100 + 200 € - 100 + 200 € - 100 + 200 € - 100 + 153 € - 123 + 176 € - 100 + 176 € - 160 + 200 € - 100 + 153 € - 100 + 153 € - 123 + 176 €