-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
front: add rolling stock selectos e2e test for operational studies
- Loading branch information
Showing
7 changed files
with
190 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { expect, type Locator, type Page } from '@playwright/test'; | ||
|
||
export default class PlaywrightOperationalStudiesPage { | ||
readonly getAddScenarioTrainBtn: Locator; | ||
|
||
readonly getRollingStockTab: Locator; | ||
|
||
readonly getRollingStockSelector: Locator; | ||
|
||
readonly getEmptyRollingStockSelector: Locator; | ||
|
||
readonly getRouteTab: Locator; | ||
|
||
constructor(readonly page: Page) { | ||
this.page = page; | ||
this.getAddScenarioTrainBtn = page.getByTestId('scenarios-add-train-schedule-button'); | ||
this.getRollingStockTab = page.getByTestId('tab-rollingstock'); | ||
this.getRouteTab = page.getByTestId('tab-pathfinding'); | ||
this.getEmptyRollingStockSelector = page.getByTestId('rollingstock-selector-empty'); | ||
this.getRollingStockSelector = page.getByTestId('rollingstock-selector'); | ||
} | ||
|
||
async clickOnAddScenarioTrainBtn() { | ||
await this.getAddScenarioTrainBtn.click(); | ||
} | ||
|
||
// Verify that the tabs RS and Route have warnings | ||
async getTabWarningPresence() { | ||
await expect(this.getRollingStockTab).toHaveClass(/warning/); | ||
await expect(this.getRouteTab).toHaveClass(/warning/); | ||
} | ||
|
||
// Click on Choose a rolling stock | ||
async openEmptyRollingStockSelector() { | ||
await this.getEmptyRollingStockSelector.click(); | ||
} | ||
|
||
// Click on the selected rolling stock | ||
async openRollingStockSelector() { | ||
await this.getRollingStockSelector.click(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters