From dbd86148ba3c31830110c9216516db6dcdf029ce Mon Sep 17 00:00:00 2001 From: maymanaf Date: Thu, 10 Oct 2024 09:28:18 +0200 Subject: [PATCH] front: refacto old e2e tests Signed-off-by: maymanaf --- .../components/BreadCrumbs.tsx | 2 +- .../operationalStudies/views/Project.tsx | 1 + .../BootstrapSNCF/CardSNCF/CardSNCF.tsx | 4 +- front/src/common/BootstrapSNCF/ChipsSNCF.tsx | 7 +- front/src/common/BootstrapSNCF/NavBarSNCF.tsx | 2 +- .../InfraSelectorModalBodyStandard.tsx | 2 +- .../components/AddOrEditScenarioModal.tsx | 2 +- .../scenario/components/ScenarioCardEmpty.tsx | 2 +- front/tests/001-home-page.spec.ts | 68 ++- front/tests/002-project-management.spec.ts | 172 +++----- front/tests/003-study-management.spec.ts | 219 +++++----- front/tests/004-scenario-management.spec.ts | 106 +++-- front/tests/005-operational-studies.spec.ts | 102 +++-- front/tests/006-stdcm-page.spec.ts | 55 --- front/tests/007-op-rollingstock-tab.spec.ts | 101 ++--- front/tests/008-train-schedule.spec.ts | 100 ++--- front/tests/009-rollingstock-editor.spec.ts | 209 ++++----- front/tests/010-op-route-tab.spec.ts | 162 +++---- .../tests/011-op-times-and-stops-tab.spec.ts | 251 +++++------ .../012-op-simulation-settings-tab.spec.ts | 135 +++--- front/tests/pages/base-page.ts | 43 -- front/tests/pages/common-page-model.ts | 44 +- front/tests/pages/home-page-model.ts | 106 ++--- front/tests/pages/map-model.ts | 101 ----- .../tests/pages/op-output-table-page-model.ts | 13 +- front/tests/pages/op-route-page-model.ts | 327 ++++++++++++++ front/tests/pages/op-timetable-page-model.ts | 6 - .../pages/operational-studies-page-model.ts | 412 ++++-------------- front/tests/pages/project-page-model.ts | 274 ++++++------ .../pages/rollingstock-editor-page-model.ts | 126 +++--- .../tests/pages/rollingstock-selector-page.ts | 108 ++--- front/tests/pages/scenario-page-model.ts | 404 ++++++----------- front/tests/pages/simulation-conf-page.ts | 60 --- front/tests/pages/stdcm-page-model.ts | 54 --- front/tests/pages/study-page-model.ts | 306 ++++++++----- front/tests/playwright-fixture.ts | 15 + front/tests/utils/api-setup.ts | 79 +++- front/tests/utils/dataNormalizer.ts | 4 + front/tests/utils/index.ts | 71 ++- 39 files changed, 1950 insertions(+), 2305 deletions(-) delete mode 100644 front/tests/006-stdcm-page.spec.ts delete mode 100644 front/tests/pages/base-page.ts delete mode 100644 front/tests/pages/map-model.ts create mode 100644 front/tests/pages/op-route-page-model.ts delete mode 100644 front/tests/pages/simulation-conf-page.ts delete mode 100644 front/tests/pages/stdcm-page-model.ts create mode 100644 front/tests/playwright-fixture.ts diff --git a/front/src/applications/operationalStudies/components/BreadCrumbs.tsx b/front/src/applications/operationalStudies/components/BreadCrumbs.tsx index d8f8da23436..4afd1b9fa9f 100644 --- a/front/src/applications/operationalStudies/components/BreadCrumbs.tsx +++ b/front/src/applications/operationalStudies/components/BreadCrumbs.tsx @@ -31,7 +31,7 @@ export default function BreadCrumbs({ project, study, scenario }: Props) { {project && study && ( <> -
+
{project.name}
diff --git a/front/src/applications/operationalStudies/views/Project.tsx b/front/src/applications/operationalStudies/views/Project.tsx index 1c9f4953479..09dafdf43ba 100644 --- a/front/src/applications/operationalStudies/views/Project.tsx +++ b/front/src/applications/operationalStudies/views/Project.tsx @@ -222,6 +222,7 @@ export default function Project() {
{project.name}