use of com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject in project selenium-tests by Wikia.
the class ForcedLoginTests method anonCanLogInViaAuthModalWhenAddingPhoto.
@Test(groups = "ForcedLogin_anonCanLogInViaAuthModalWhenAddingPhoto")
public void anonCanLogInViaAuthModalWhenAddingPhoto() {
WikiBasePageObject base = new WikiBasePageObject();
String articleName = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
VisualEditModePageObject edit = base.navigateToArticleEditPage(wikiURL, articleName);
edit.clickPhotoButton();
DetachedSignInPage authModal = new DetachedRegisterPage().navigateToSignIn();
authModal.login(credentials.userName10, credentials.password10);
edit.verifyUserLoggedIn(credentials.userName10);
assertTrue(edit.isStringInURL(articleName));
assertTrue(edit.isStringInURL(URLsContent.ACTION_EDIT));
PhotoAddComponentObject addPhoto = edit.clickPhotoButton();
addPhoto.verifyAddPhotoModal();
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject in project selenium-tests by Wikia.
the class ForcedLoginTests method anonCanLogInOnSpecialWatchListPage.
@Test(groups = "ForcedLogin_anonCanLogInOnSpecialWatchListPage")
public void anonCanLogInOnSpecialWatchListPage() {
WikiBasePageObject base = new WikiBasePageObject();
base.openWikiPage();
base.openSpecialWatchListPage(wikiURL);
base.verifyNotLoggedInMessage();
base.clickLoginOnSpecialPage();
new AttachedSignInPage().login(credentials.userName10, credentials.password10);
base.verifyUserLoggedIn(credentials.userName10);
assertTrue(base.isStringInURL(URLsContent.SPECIAL_WATCHLIST));
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject 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.WikiBasePageObject 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.WikiBasePageObject 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