From 79ba07e6c7a87aaea02f0ac81a4615d88f6fc3b2 Mon Sep 17 00:00:00 2001 From: Clara Ni Date: Mon, 21 Oct 2024 17:39:38 +0200 Subject: [PATCH] front: small improvements on scenario page Signed-off-by: Clara Ni --- .../operationalStudies/views/SimulationResults.tsx | 6 +++--- .../operationalStudies/_simulationresults.scss | 13 ++++++++++++- front/tests/011-op-times-and-stops-tab.spec.ts | 2 +- front/tests/012-op-simulation-settings-tab.spec.ts | 8 ++++---- front/tests/pages/op-output-table-page-model.ts | 2 +- 5 files changed, 21 insertions(+), 10 deletions(-) diff --git a/front/src/applications/operationalStudies/views/SimulationResults.tsx b/front/src/applications/operationalStudies/views/SimulationResults.tsx index 61f7ef18d93..1cf08985604 100644 --- a/front/src/applications/operationalStudies/views/SimulationResults.tsx +++ b/front/src/applications/operationalStudies/views/SimulationResults.tsx @@ -169,7 +169,7 @@ const SimulationResults = ({ {/* TRAIN : SPACE SPEED CHART */} {selectedTrainRollingStock && trainSimulation && pathProperties && selectedTrainSchedule && ( -
+
+
+
{ await opTimetablePage.clickOnScenarioCollapseButton(); await opTimetablePage.verifyTimeStopsDataSheetVisibility(); // Scroll and extract data from output table - await scrollContainer(page, '.osrd-simulation-container .time-stops-datasheet .dsg-container'); + await scrollContainer(page, '.time-stop-outputs .time-stops-datasheet .dsg-container'); await opOutputTablePage.getOutputTableData(outputExpectedCellData, selectedLanguage); }); diff --git a/front/tests/012-op-simulation-settings-tab.spec.ts b/front/tests/012-op-simulation-settings-tab.spec.ts index 14762ce5e1e..5561557ec6a 100644 --- a/front/tests/012-op-simulation-settings-tab.spec.ts +++ b/front/tests/012-op-simulation-settings-tab.spec.ts @@ -169,7 +169,7 @@ test.describe('Simulation Settings Tab Verification', () => { await opTimetablePage.verifyTimeStopsDataSheetVisibility(); await opTimetablePage.getTrainArrivalTime('11:52'); await opTimetablePage.clickOnScenarioCollapseButton(); - await scrollContainer(page, '.osrd-simulation-container .time-stops-datasheet .dsg-container'); + await scrollContainer(page, '.time-stop-outputs .time-stops-datasheet .dsg-container'); await opOutputTablePage.getOutputTableData( expectedCellDataElectricalProfileON, selectedLanguage @@ -230,7 +230,7 @@ test.describe('Simulation Settings Tab Verification', () => { await opTimetablePage.verifyTimeStopsDataSheetVisibility(); await opTimetablePage.getTrainArrivalTime('12:02'); await opTimetablePage.clickOnScenarioCollapseButton(); - await scrollContainer(page, '.osrd-simulation-container .time-stops-datasheet .dsg-container'); + await scrollContainer(page, '.time-stop-outputs .time-stops-datasheet .dsg-container'); await opOutputTablePage.getOutputTableData(expectedCellDataCodeCompoON, selectedLanguage); await opTimetablePage.clickOnTimetableCollapseButton(); // Remove the composition code option and verify the changes @@ -294,7 +294,7 @@ test.describe('Simulation Settings Tab Verification', () => { await opTimetablePage.verifyTimeStopsDataSheetVisibility(); await opTimetablePage.getTrainArrivalTime('11:54'); await opTimetablePage.clickOnScenarioCollapseButton(); - await scrollContainer(page, '.osrd-simulation-container .time-stops-datasheet .dsg-container'); + await scrollContainer(page, '.time-stop-outputs .time-stops-datasheet .dsg-container'); await opOutputTablePage.getOutputTableData(expectedCellDataLinearMargin, selectedLanguage); await opTimetablePage.clickOnTimetableCollapseButton(); // Modify the margin to 'Mareco' and verify the changes @@ -359,7 +359,7 @@ test.describe('Simulation Settings Tab Verification', () => { await opTimetablePage.verifyTimeStopsDataSheetVisibility(); await opTimetablePage.getTrainArrivalTime('12:05'); await opTimetablePage.clickOnScenarioCollapseButton(); - await scrollContainer(page, '.osrd-simulation-container .time-stops-datasheet .dsg-container'); + await scrollContainer(page, '.time-stop-outputs .time-stops-datasheet .dsg-container'); await opOutputTablePage.getOutputTableData(expectedCellDataForAllSettings, selectedLanguage); }); }); diff --git a/front/tests/pages/op-output-table-page-model.ts b/front/tests/pages/op-output-table-page-model.ts index 7b37727329e..e6a2d8b6a57 100644 --- a/front/tests/pages/op-output-table-page-model.ts +++ b/front/tests/pages/op-output-table-page-model.ts @@ -16,7 +16,7 @@ class OperationalStudiesOutputTablePage { this.columnHeaders = page.locator( '[class="dsg-cell dsg-cell-header"] .dsg-cell-header-container' ); - this.tableRows = page.locator('.osrd-simulation-container .time-stops-datasheet .dsg-row'); + this.tableRows = page.locator('.time-stop-outputs .time-stops-datasheet .dsg-row'); } // Retrieve the cell value based on the locator type