use of com.wikia.webdriver.pageobjectsfactory.pageobject.auth.ResetPasswordPage in project selenium-tests by Wikia.
the class ForgottenPasswordTests method executeResetPasswordFlow.
private void executeResetPasswordFlow(User user) {
EmailUtils.deleteAllEmails(credentials.email, credentials.emailPassword);
WikiBasePageObject base = new WikiBasePageObject();
base.openWikiPage(wikiURL);
DetachedSignInPage loginModal = new DetachedSignInPage(new NavigationBar(driver).clickOnSignIn());
loginModal.clickForgotPasswordLink().requestLinkForUsername(user.getUserName());
String resetLink = base.getPasswordResetLink(credentials.email, credentials.emailPassword);
ResetPasswordPage resetPass = new ResetPasswordPage(resetLink);
resetPass.setNewPassword(user.getPassword());
assertTrue(resetPass.newPasswordSetSuccessfully());
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.auth.ResetPasswordPage in project selenium-tests by Wikia.
the class ForgottenPasswordTests method anonCanRemindPasswordOnUserLoginSpecialPageUsingLowerCaseUserName.
@Test
public void anonCanRemindPasswordOnUserLoginSpecialPageUsingLowerCaseUserName() {
String username = User.FORGOTTEN_PASSWORD.getUserName();
String lowercaseUsername = Character.toLowerCase(username.charAt(0)) + username.substring(1);
EmailUtils.deleteAllEmails(credentials.email, credentials.emailPassword);
WikiBasePageObject base = new WikiBasePageObject();
AttachedSignInPage signIn = new AttachedSignInPage().open();
signIn.clickForgotPasswordLink().requestLinkForUsername(lowercaseUsername);
String resetLink = base.getPasswordResetLink(credentials.email, credentials.emailPassword);
ResetPasswordPage resetPass = new ResetPasswordPage(resetLink);
resetPass.setNewPassword(User.FORGOTTEN_PASSWORD.getPassword());
assertTrue(resetPass.newPasswordSetSuccessfully());
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.auth.ResetPasswordPage in project selenium-tests by Wikia.
the class ForgottenPasswordTests method anonCanRemindPasswordOnUserLoginSpecialPage.
@Test
public void anonCanRemindPasswordOnUserLoginSpecialPage() {
EmailUtils.deleteAllEmails(credentials.email, credentials.emailPassword);
WikiBasePageObject base = new WikiBasePageObject();
AttachedSignInPage signIn = new AttachedSignInPage().open();
signIn.clickForgotPasswordLink().requestLinkForUsername(User.FORGOTTEN_PASSWORD.getUserName());
String resetLink = base.getPasswordResetLink(credentials.email, credentials.emailPassword);
ResetPasswordPage resetPass = new ResetPasswordPage(resetLink);
resetPass.setNewPassword(User.FORGOTTEN_PASSWORD.getPassword());
assertTrue(resetPass.newPasswordSetSuccessfully());
}
Aggregations