lifecycle fix for raceboard and test fail case adjustment

This commit is contained in:
Kai Boernert committed 2017-02-17 16:30:19 +01:00
1 parent 18966b8bbb
commit 88eeceefea
5 files changed
+17 -5

No files matched your search

@@ -61,7 +61,9 @@ public class MasterDataImportPO extends PageArea {
}
void waitForAlertAndDispose(WebDriver driver) throws InterruptedException {
while (true) {
int i = 0;
while (i < DEFAULT_WAIT_TIMEOUT_SECONDS) {
i++;
try {
Alert alert = driver.switchTo().alert();
alert.dismiss();
@@ -71,5 +73,8 @@ public class MasterDataImportPO extends PageArea {
continue;
}
}
if (i >= DEFAULT_WAIT_TIMEOUT_SECONDS) {
throw new NoAlertPresentException();
}
}
}
@@ -34,7 +34,9 @@ public class MapSettingsPO extends PageArea {
}
void waitForAlertAndDispose(WebDriver driver) throws InterruptedException {
while (true) {
int i = 0;
while (i < DEFAULT_WAIT_TIMEOUT_SECONDS) {
i++;
try {
Alert alert = driver.switchTo().alert();
alert.dismiss();
@@ -44,6 +46,9 @@ public class MapSettingsPO extends PageArea {
continue;
}
}
if (i >= DEFAULT_WAIT_TIMEOUT_SECONDS) {
throw new NoAlertPresentException();
}
}
public boolean isWindChartSelected() {
@@ -68,7 +68,7 @@ public class SettingsTest extends AbstractSeleniumTest {
tracTracEvents.setTrackSettings(true, false, false);
tracTracEvents.startTrackingForRace(this.trackableRace);
TrackedRacesListPO trackedRacesList = tracTracEvents.getTrackedRacesList();
trackedRacesList.waitForTrackedRace(this.trackedRace, Status.FINISHED); // with the TracAPI, REPLAY races
trackedRacesList.waitForTrackedRace(this.trackedRace, Status.FINISHED, 600); // with the TracAPI, REPLAY races
// status FINISHED when done loading
LeaderboardConfigurationPanelPO leaderboard = adminConsole.goToLeaderboardConfiguration();