Skip to content

Commit a29b2ef

Browse files
committed
Ensure WebDriverWait verifies specific text in headers
1 parent 03da425 commit a29b2ef

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

uaa/src/test/java/org/cloudfoundry/identity/uaa/integration/feature/HomeIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ void profilePage() {
9090
webDriver.get(baseUrl + "/profile");
9191
}
9292
WebDriverWait wait = webDriver.createWebDriverWait();
93-
wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("h1")));
93+
wait.until(ExpectedConditions.textToBePresentInElementLocated(By.cssSelector("h1"), "Account Settings"));
9494
assertThat(webDriver.findElement(By.cssSelector("h1")).getText()).contains("Account Settings");
9595
}
9696

uaa/src/test/java/org/cloudfoundry/identity/uaa/integration/feature/LoginIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ void passcodeRedirect() {
255255
attemptLogin(testAccounts.getUserName(), testAccounts.getPassword());
256256

257257
WebDriverWait wait = webDriver.createWebDriverWait();
258-
wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("h1")));
258+
wait.until(ExpectedConditions.textToBePresentInElementLocated(By.cssSelector("h1"), "Temporary Authentication Code"));
259259
assertThat(webDriver.findElement(By.cssSelector("h1")).getText()).contains("Temporary Authentication Code");
260260

261261
wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("passcode")));

0 commit comments

Comments
 (0)