-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
front: add speed space chart e2e test
Signed-off-by: maymanaf <[email protected]>
- Loading branch information
Showing
27 changed files
with
195 additions
and
2 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
Binary file added
BIN
+73.7 KB
...op-simulation-settings-tab.spec.ts-snapshots/AllSettings-SSC-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+106 KB
...-op-simulation-settings-tab.spec.ts-snapshots/AllSettings-SSC-firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+59 KB
...-simulation-settings-tab.spec.ts-snapshots/CodeCompo-SSC-OFF-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+88.8 KB
...p-simulation-settings-tab.spec.ts-snapshots/CodeCompo-SSC-OFF-firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+62 KB
...p-simulation-settings-tab.spec.ts-snapshots/CodeCompo-SSC-ON-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+93.4 KB
...op-simulation-settings-tab.spec.ts-snapshots/CodeCompo-SSC-ON-firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+58.9 KB
...ion-settings-tab.spec.ts-snapshots/ElectricalProfile-SSC-OFF-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+88.8 KB
...tion-settings-tab.spec.ts-snapshots/ElectricalProfile-SSC-OFF-firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+58.8 KB
...tion-settings-tab.spec.ts-snapshots/ElectricalProfile-SSC-ON-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+88.9 KB
...ation-settings-tab.spec.ts-snapshots/ElectricalProfile-SSC-ON-firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+72.1 KB
...p-simulation-settings-tab.spec.ts-snapshots/LinearMargin-SSC-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+103 KB
...op-simulation-settings-tab.spec.ts-snapshots/LinearMargin-SSC-firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+65.1 KB
...p-simulation-settings-tab.spec.ts-snapshots/MarecoMargin-SSC-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+94.2 KB
...op-simulation-settings-tab.spec.ts-snapshots/MarecoMargin-SSC-firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+104 KB
...ings-tab.spec.ts-snapshots/SpeedSpaceChart-AllSettingsEnabled-firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+86.3 KB
....spec.ts-snapshots/SpeedSpaceChart-ElectricalProfileActivated-firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+85.6 KB
...b.spec.ts-snapshots/SpeedSpaceChart-ElectricalProfileDisabled-firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+100 KB
...n-settings-tab.spec.ts-snapshots/SpeedSpaceChart-LinearMargin-firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+91 KB
...n-settings-tab.spec.ts-snapshots/SpeedSpaceChart-MarecoMargin-firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+89.9 KB
...-tab.spec.ts-snapshots/SpeedSpaceChart-SpeedLimitTagActivated-firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+85.6 KB
...s-tab.spec.ts-snapshots/SpeedSpaceChart-SpeedLimitTagDisabled-firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,53 @@ | ||
import { expect, type Locator, type Page } from '@playwright/test'; | ||
|
||
class OpSimulationResultPage { | ||
readonly page: Page; | ||
|
||
private readonly speedSpaceChartSettingsButton: Locator; | ||
|
||
private readonly sscCloseEllipsis: Locator; | ||
|
||
private readonly sscCheckmarks: Locator; | ||
|
||
readonly speedSpaceChartCloseSettingsButton: Locator; | ||
|
||
constructor(page: Page) { | ||
this.page = page; | ||
this.speedSpaceChartSettingsButton = page.locator('.interaction-button.elipsis-button'); | ||
this.speedSpaceChartCloseSettingsButton = page.locator('#close-settings-panel'); | ||
this.speedSpaceChartCheckboxItems = page.locator('#settings-panel .selection .checkmark'); | ||
this.speedSpaceChartTabindexElement = page.locator( | ||
'#container-SpeedSpaceChart > div[tabindex="0"]' | ||
); | ||
} | ||
|
||
private async openSettingsPanel(): Promise<void> { | ||
await this.sscEllipsisButton.click(); | ||
} | ||
|
||
private async closeSettingsPanel(): Promise<void> { | ||
await this.sscCloseEllipsis.click(); | ||
} | ||
|
||
// Toggles the checkbox at a specific index if it is not already checked. | ||
private async toggleCheckboxIfUnchecked(index: number): Promise<void> { | ||
const checkbox = this.sscCheckboxes.nth(index); | ||
const isChecked = await checkbox.isChecked(); | ||
|
||
if (!isChecked) { | ||
await this.sscCheckmarks.nth(index).click(); | ||
} | ||
await expect(checkbox).toBeChecked(); | ||
} | ||
|
||
// Ensures all checkboxes in the settings panel are checked. | ||
async checkAllSscCheckboxes(): Promise<void> { | ||
await this.openSettingsPanel(); | ||
|
||
const checkboxes = await this.speedSpaceChartCheckboxItems.all(); | ||
await Promise.all(checkboxes.map((checkbox) => checkbox.setChecked(true, { force: true }))); | ||
await this.closeSettingsPanel(); | ||
} | ||
} | ||
|
||
export default OpSimulationResultPage; |
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