Search in sources :

Example 1 with ResetPasswordPage

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());
}
Also used : NavigationBar(com.wikia.webdriver.pageobjectsfactory.componentobject.global_navitagtion.NavigationBar) ResetPasswordPage(com.wikia.webdriver.pageobjectsfactory.pageobject.auth.ResetPasswordPage) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) DetachedSignInPage(com.wikia.webdriver.pageobjectsfactory.pageobject.auth.signin.DetachedSignInPage)

Example 2 with ResetPasswordPage

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());
}
Also used : AttachedSignInPage(com.wikia.webdriver.pageobjectsfactory.pageobject.auth.signin.AttachedSignInPage) ResetPasswordPage(com.wikia.webdriver.pageobjectsfactory.pageobject.auth.ResetPasswordPage) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) Test(org.testng.annotations.Test)

Example 3 with ResetPasswordPage

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());
}
Also used : AttachedSignInPage(com.wikia.webdriver.pageobjectsfactory.pageobject.auth.signin.AttachedSignInPage) ResetPasswordPage(com.wikia.webdriver.pageobjectsfactory.pageobject.auth.ResetPasswordPage) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) Test(org.testng.annotations.Test)

Aggregations

WikiBasePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject)3 ResetPasswordPage (com.wikia.webdriver.pageobjectsfactory.pageobject.auth.ResetPasswordPage)3 AttachedSignInPage (com.wikia.webdriver.pageobjectsfactory.pageobject.auth.signin.AttachedSignInPage)2 Test (org.testng.annotations.Test)2 NavigationBar (com.wikia.webdriver.pageobjectsfactory.componentobject.global_navitagtion.NavigationBar)1 DetachedSignInPage (com.wikia.webdriver.pageobjectsfactory.pageobject.auth.signin.DetachedSignInPage)1