Skip to content

Commit

Permalink
front: update stdcm environment setup to match schema and correct dat…
Browse files Browse the repository at this point in the history
…e format

Signed-off-by: SarahBellaha <[email protected]>
  • Loading branch information
SarahBellaha committed Jan 2, 2025
1 parent d53b3da commit 1e79fc2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion front/tests/utils/api-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ export async function getStdcmEnvironment(): Promise<StdcmSearchEnvironment | nu
*/
export async function setStdcmEnvironment(stdcmEnvironment: StdcmSearchEnvironment): Promise<void> {
// 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,
Expand Down
4 changes: 2 additions & 2 deletions front/tests/utils/setup-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ export async function createDataForTests(): Promise<void> {

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;

Expand Down

0 comments on commit 1e79fc2

Please sign in to comment.