Skip to content
Snippets Groups Projects
Commit a2fb0563 authored by Eduard Moraru's avatar Eduard Moraru
Browse files

XWIKI-11801: ResetPassword feature is broken by password salting

- Using the no wait methods in the page objects to improve the test's speed
parent caffcc99
No related branches found
No related tags found
No related merge requests found
......@@ -56,7 +56,7 @@ public class ResetPasswordCompletePage extends ViewPage
public boolean isResetLinkValid()
{
// If we see the form, the the link is valid.
return !getDriver().findElements(By.cssSelector(".xcontent form")).isEmpty();
return getDriver().hasElementWithoutWaiting(By.cssSelector(".xcontent form"));
}
public String getPassowrd()
......@@ -88,7 +88,7 @@ public ResetPasswordCompletePage clickSave()
public boolean isPasswordSuccessfullyReset()
{
// success = no form and a message that is not error or warning.
return getDriver().findElements(By.cssSelector(".xcontent form")).isEmpty()
return !getDriver().hasElementWithoutWaiting(By.cssSelector(".xcontent form"))
&& messageBox.getAttribute("class").contains("infomessage");
}
......
......@@ -68,7 +68,8 @@ public ResetPasswordPage clickResetPassword()
public boolean isResetPasswordSent()
{
return getDriver().findElements(By.cssSelector(".xcontent form")).isEmpty()
// If there is no form and we see an info box, then the request was sent.
return !getDriver().hasElementWithoutWaiting(By.cssSelector(".xcontent form"))
&& messageBox.getAttribute("class").contains("infomessage");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment