bug 4942: mark updating of local server settings to allow selenium test

to await changes
This commit is contained in:
Thomas Wiese committed 2019-06-24 10:04:24 +02:00
1 parent bb950c84dd
commit 0d4dded4cc
3 files changed
+28 -20

No files matched your search

@@ -47,13 +47,6 @@ public class ClosedRegattaTest extends AbstractSeleniumTest {
unregisteredCtx = createAnonymousApiContext(getContextRoot(), SERVER_CONTEXT);
final AdminConsolePage adminConsole = goToPage(getWebDriver(), getContextRoot());
adminConsole.goToLocalServerPanel().setSelfServiceServer(true);
try {
// FIXME: workaround for self service property not being set when the test method is called. Proper waiting
// should be implemented...
Thread.sleep(500);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
}
@Test
@@ -19,7 +19,18 @@ public class LocalServerPO extends PageArea {
public void setSelfServiceServer(boolean selfService) {
if (selfService != isSelfServiceServerCheckbox.isSelected()) {
isSelfServiceServerCheckbox.click();
awaitServerConfigurationUpdated();
}
}
private void awaitServerConfigurationUpdated() {
while (isServerConfigurationUpdating()) {
}
}
public boolean isServerConfigurationUpdating() {
final String updating = isSelfServiceServerCheckbox.getAttribute("updating");
return "true".equals(updating);
}
}