Skip to content

Commit

Permalink
front: deactivate marker check for e2e tests
Browse files Browse the repository at this point in the history
Signed-off-by: maymanaf <med.aymen.naf@gmail.com>
  • Loading branch information
Maymanaf committed Dec 13, 2024
1 parent a114e33 commit c669033
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 36 deletions.
14 changes: 8 additions & 6 deletions front/tests/006-stdcm.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,17 @@ test.describe('Verify train schedule elements and filters', () => {
await stdcmPage.fillDestinationDetailsLight();
await stdcmPage.fillAndVerifyViaDetails(1, 'mid_west');
// Verify input map markers in Chromium
if (browserName === 'chromium') {
await stdcmPage.mapMarkerVisibility();
}
// TODO: Uncomment this part when osm server is up again
// if (browserName === 'chromium') {
// await stdcmPage.mapMarkerVisibility();
// }
// Launch simulation and verify output data matches expected results
await stdcmPage.launchSimulation();
// Verify map results markers in Chromium
if (browserName === 'chromium') {
await stdcmPage.mapMarkerResultVisibility();
}
// TODO: Uncomment this part when osm server is up again
// if (browserName === 'chromium') {
// await stdcmPage.mapMarkerResultVisibility();
// }
await stdcmPage.verifyTableData('./tests/assets/stdcm/stdcmWithoutAllVia.json');
await stdcmPage.clickOnAllViaButton();
await stdcmPage.verifyTableData('./tests/assets/stdcm/stdcmWithAllVia.json');
Expand Down
62 changes: 32 additions & 30 deletions front/tests/010-op-route-tab.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ test.describe('Route Tab Verification', () => {
);

/** *************** Test 1 **************** */
test('Select a route for operational study', async ({ page, browserName }) => {
test('Select a route for operational study', async ({ page }) => {
const operationalStudiesPage = new OperationalStudiesPage(page);
const routePage = new RoutePage(page);

Expand All @@ -67,17 +67,18 @@ test.describe('Route Tab Verification', () => {

// Perform pathfinding by station trigrams and verify map markers in Chromium
await routePage.performPathfindingByTrigram('WS', 'NES', 'MES');
if (browserName === 'chromium') {
const expectedMapMarkersValues = ['West_station', 'North_East_station', 'Mid_East_station'];
await routePage.verifyMapMarkers(...expectedMapMarkersValues);
}
// TODO: Uncomment this part when osm server is up again
// if (browserName === 'chromium') {
// const expectedMapMarkersValues = ['West_station', 'North_East_station', 'Mid_East_station'];
// await routePage.verifyMapMarkers(...expectedMapMarkersValues);
// }

// Verify that tab warnings are absent
await operationalStudiesPage.verifyTabWarningAbsence();
});

/** *************** Test 2 **************** */
test('Adding waypoints to a route for operational study', async ({ page, browserName }) => {
test('Adding waypoints to a route for operational study', async ({ page }) => {
const operationalStudiesPage = new OperationalStudiesPage(page);
const routePage = new RoutePage(page);

Expand All @@ -92,50 +93,51 @@ test.describe('Route Tab Verification', () => {
await routePage.addNewWaypoints(2, ['Mid_West_station', 'Mid_East_station'], expectedViaValues);

// Verify map markers in Chromium
if (browserName === 'chromium') {
const expectedMapMarkersValues = [
'West_station',
'Mid_West_station',
'Mid_East_station',
'North_East_station',
];
await routePage.verifyMapMarkers(...expectedMapMarkersValues);
}
// TODO: Uncomment this part when osm server is up again
// if (browserName === 'chromium') {
// const expectedMapMarkersValues = [
// 'West_station',
// 'Mid_West_station',
// 'Mid_East_station',
// 'North_East_station',
// ];
// await routePage.verifyMapMarkers(...expectedMapMarkersValues);
// }

// Verify that tab warnings are absent
await operationalStudiesPage.verifyTabWarningAbsence();
});

/** *************** Test 3 **************** */
test('Reversing and deleting waypoints in a route for operational study', async ({
page,
browserName,
}) => {
test('Reversing and deleting waypoints in a route for operational study', async ({ page }) => {
const routePage = new RoutePage(page);

// Perform pathfinding by station trigrams and verify map markers in Chromium
await routePage.performPathfindingByTrigram('WS', 'SES', 'MWS');
const expectedMapMarkersValues = ['West_station', 'South_East_station', 'Mid_West_station'];
if (browserName === 'chromium') {
await routePage.verifyMapMarkers(...expectedMapMarkersValues);
}
// TODO: Uncomment this part when osm server is up again
// const expectedMapMarkersValues = ['West_station', 'South_East_station', 'Mid_West_station'];
// if (browserName === 'chromium') {
// await routePage.verifyMapMarkers(...expectedMapMarkersValues);
// }

// Reverse the itinerary and verify the map markers
await routePage.clickOnReverseItinerary();
if (browserName === 'chromium') {
const reversedMapMarkersValues = [...expectedMapMarkersValues].reverse();
await routePage.verifyMapMarkers(...reversedMapMarkersValues);
}
// TODO: Uncomment this part when osm server is up again
// if (browserName === 'chromium') {
// const reversedMapMarkersValues = [...expectedMapMarkersValues].reverse();
// await routePage.verifyMapMarkers(...reversedMapMarkersValues);
// }

// Delete operational points and verify no selected route
await routePage.clickOnDeleteOPButtons(OSRDLanguage);
await routePage.verifyNoSelectedRoute(OSRDLanguage);

// Perform pathfinding again and verify map markers in Chromium
await routePage.performPathfindingByTrigram('WS', 'SES', 'MWS');
if (browserName === 'chromium') {
await routePage.verifyMapMarkers(...expectedMapMarkersValues);
}
// TODO: Uncomment this part when osm server is up again
// if (browserName === 'chromium') {
// await routePage.verifyMapMarkers(...expectedMapMarkersValues);
// }

// Delete the itinerary and verify no selected route
await routePage.clickDeleteItineraryButton();
Expand Down

0 comments on commit c669033

Please sign in to comment.