From 1e79fc2a9e7a281a4d14394ef359c5ed97b8d424 Mon Sep 17 00:00:00 2001 From: SarahBellaha Date: Tue, 31 Dec 2024 21:47:52 +0100 Subject: [PATCH] front: update stdcm environment setup to match schema and correct date format Signed-off-by: SarahBellaha --- front/tests/utils/api-setup.ts | 2 +- front/tests/utils/setup-utils.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/front/tests/utils/api-setup.ts b/front/tests/utils/api-setup.ts index 56bc1b41d6a..7bc923eee05 100644 --- a/front/tests/utils/api-setup.ts +++ b/front/tests/utils/api-setup.ts @@ -256,7 +256,7 @@ export async function getStdcmEnvironment(): Promise { // Remove the `id` field to match the StdcmSearchEnvironmentCreateForm schema - const { id, ...stdcmEnvironmentWithoutId } = stdcmEnvironment; + const { id: _id, ...stdcmEnvironmentWithoutId } = stdcmEnvironment; await postApiRequest( '/api/stdcm/search_environment', stdcmEnvironmentWithoutId, diff --git a/front/tests/utils/setup-utils.ts b/front/tests/utils/setup-utils.ts index 691087a235f..de6bbc3af9d 100644 --- a/front/tests/utils/setup-utils.ts +++ b/front/tests/utils/setup-utils.ts @@ -177,8 +177,8 @@ export async function createDataForTests(): Promise { const stdcmEnvironment = { infra_id: smallInfra.id, - search_window_begin: '2024-10-17T00:00:01', - search_window_end: '2024-10-18T23:59:59', + search_window_begin: '2024-10-17T00:00:00Z', + search_window_end: '2024-10-18T23:59:59Z', timetable_id: scenarioTrainSchedule.timetable_id, } as StdcmSearchEnvironment;