Skip to content

Commit

Permalink
front: small improvements on scenario page
Browse files Browse the repository at this point in the history
Signed-off-by: Clara Ni <clara.ni@outlook.fr>
  • Loading branch information
clarani committed Oct 28, 2024
1 parent 5af0b69 commit 79ba07e
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ const SimulationResults = ({

{/* TRAIN : SPACE SPEED CHART */}
{selectedTrainRollingStock && trainSimulation && pathProperties && selectedTrainSchedule && (
<div className="osrd-simulation-container d-flex mb-2 speedspacechart-container">
<div className="osrd-simulation-container speedspacechart-container">
<div
className="chart-container"
style={{
Expand Down Expand Up @@ -211,7 +211,7 @@ const SimulationResults = ({
pathProperties &&
operationalPoints &&
infraId && (
<div className="osrd-simulation-container mb-2">
<div className="time-stop-outputs">
<TimesStopsOutput
simulatedTrain={trainSimulation}
pathProperties={pathProperties}
Expand All @@ -230,7 +230,7 @@ const SimulationResults = ({
selectedTrainRollingStock &&
operationalPoints &&
infraId && (
<div className="osrd-simulation-container mb-2 bg-white">
<div className="driver-train-schedule">
<DriverTrainSchedule
train={selectedTrainSchedule}
simulatedTrain={trainSimulation}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
border-radius: 4px;
width: 100%;
background: var(--secondary);
z-index: 2;
z-index: 10;
top: 0;
left: 0;
padding: 0.5rem;
Expand Down Expand Up @@ -58,6 +58,17 @@
0 2px 4px rgba(0, 0, 0, 0.22);
}

.time-stop-outputs {
margin: 0 30px 27px 38px;
}

.driver-train-schedule {
background-color: white;
padding: 1rem;
border-radius: 4px;
margin-inline: 38px 30px;
}

/* MAP */
.train-speed-label {
text-shadow: 0 0 3px #fff;
Expand Down
2 changes: 1 addition & 1 deletion front/tests/011-op-times-and-stops-tab.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ test.describe('Times and Stops Tab Verification', () => {
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);
});

Expand Down
8 changes: 4 additions & 4 deletions front/tests/012-op-simulation-settings-tab.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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);
});
});
2 changes: 1 addition & 1 deletion front/tests/pages/op-output-table-page-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 79ba07e

Please sign in to comment.