Search in sources :

Example 46 with WikiBasePageObject

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();
}
Also used : DetachedRegisterPage(com.wikia.webdriver.pageobjectsfactory.pageobject.auth.register.DetachedRegisterPage) VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) DetachedSignInPage(com.wikia.webdriver.pageobjectsfactory.pageobject.auth.signin.DetachedSignInPage) PhotoAddComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoAddComponentObject) Test(org.testng.annotations.Test)

Example 47 with WikiBasePageObject

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

Example 48 with WikiBasePageObject

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());
}
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 49 with WikiBasePageObject

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());
}
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 50 with WikiBasePageObject

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());
}
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)174 Test (org.testng.annotations.Test)162 Execute (com.wikia.webdriver.common.core.annotations.Execute)72 ArticlePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject)39 InteractiveMapsPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.special.interactivemaps.InteractiveMapsPageObject)38 InteractiveMapPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.special.interactivemaps.InteractiveMapPageObject)30 SourceEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject)24 DontRun (com.wikia.webdriver.common.core.annotations.DontRun)23 VisualEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject)21 BlogPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.blog.BlogPageObject)17 RelatedIssue (com.wikia.webdriver.common.core.annotations.RelatedIssue)14 MiniEditorComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject)13 CreateAMapComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.CreateAMapComponentObject)12 MessageWall (com.wikia.webdriver.pageobjectsfactory.pageobject.messagewall.MessageWall)12 NavigationBar (com.wikia.webdriver.pageobjectsfactory.componentobject.global_navitagtion.NavigationBar)11 AddPinComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.AddPinComponentObject)11 CreatePinTypesComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.CreatePinTypesComponentObject)10 UserProfilePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.UserProfilePageObject)10 SpecialCreatePage (com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialCreatePage)10 DetachedSignInPage (com.wikia.webdriver.pageobjectsfactory.pageobject.auth.signin.DetachedSignInPage)9