Search in sources :

Example 16 with ArticlePage

use of com.wikia.webdriver.elements.mercury.pages.ArticlePage in project selenium-tests by Wikia.

the class SearchMercuryTests method mercury_search_navigateUsingSearchSuggestionsOnMobile.

@Execute(onWikia = MercuryWikis.MERCURY_AUTOMATION_TESTING)
@InBrowser(emulator = Emulator.GOOGLE_NEXUS_5)
@Test(groups = { "mercury_search_navigateUsingSearchSuggestionsOnMobile", "Mercury_Search_001" })
public void mercury_search_navigateUsingSearchSuggestionsOnMobile() {
    String clickedSuggestion = new GuidelinesPage().open().getTopBar().openSearch().typeInSearch(SEARCH_PHRASE).clickSearchSuggestion(0, Skin.MERCURY);
    Assertion.assertTrue(new SkinHelper(driver).isSkin(Skin.MOBILE_WIKI));
    Assertion.assertEquals(clickedSuggestion.toLowerCase(), new ArticlePage().getHeader().getPageTitle().toLowerCase());
}
Also used : ArticlePage(com.wikia.webdriver.elements.mercury.pages.ArticlePage) SkinHelper(com.wikia.webdriver.common.skin.SkinHelper) GuidelinesPage(com.wikia.webdriver.elements.mercury.pages.discussions.GuidelinesPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Example 17 with ArticlePage

use of com.wikia.webdriver.elements.mercury.pages.ArticlePage in project selenium-tests by Wikia.

the class SearchMobileWikiTests method mercury_search_navigateUsingSearchSuggestionsOnMobile.

@Execute(onWikia = MercuryWikis.MERCURY_AUTOMATION_TESTING)
@InBrowser(emulator = Emulator.GOOGLE_NEXUS_5)
@Test(groups = { "mercury_search_navigateUsingSearchSuggestionsOnMobile", "Mercury_Search_001" })
public void mercury_search_navigateUsingSearchSuggestionsOnMobile() {
    ArticlePage article = new ArticlePage().open(MercurySubpages.MAIN_PAGE);
    String clickedSuggestion = article.getTopBar().openSearch().typeInSearch(SEARCH_PHRASE).clickSearchSuggestion(0, Skin.MOBILE_WIKI);
    Assertion.assertEquals(clickedSuggestion.toLowerCase(), article.getHeader().getPageTitle().toLowerCase());
}
Also used : ArticlePage(com.wikia.webdriver.elements.mercury.pages.ArticlePage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Example 18 with ArticlePage

use of com.wikia.webdriver.elements.mercury.pages.ArticlePage in project selenium-tests by Wikia.

the class LoginTests method anonCanNotLogInWithInvalidPassword.

@Test(groups = "login-anonCanNotLogInWithInvalidPassword")
public void anonCanNotLogInWithInvalidPassword() {
    ArticlePage article = new ArticlePage();
    SignInPage signIn = article.open(MercurySubpages.MAIN_PAGE).getTopbar().openNavigation().clickOnSignInRegisterButton().navigateToSignIn();
    signIn.login(Configuration.getCredentials().userName10, "someinvalidpassw0rd");
    assertTrue(signIn.getError().contains(EXPECTED_ERROR_MESSAGE));
}
Also used : ArticlePage(com.wikia.webdriver.elements.mercury.pages.ArticlePage) SignInPage(com.wikia.webdriver.pageobjectsfactory.pageobject.auth.signin.SignInPage) Test(org.testng.annotations.Test)

Example 19 with ArticlePage

use of com.wikia.webdriver.elements.mercury.pages.ArticlePage in project selenium-tests by Wikia.

the class LoginTests method anonCanLogInAsRegisteredUser.

@Test(groups = "login-anonCanLogInAsRegisteredUser")
public void anonCanLogInAsRegisteredUser() {
    ArticlePage article = new ArticlePage();
    article.open(MercurySubpages.MAIN_PAGE).getTopbar().openNavigation().clickOnSignInRegisterButton().navigateToSignIn().login(Configuration.getCredentials().userName10, Configuration.getCredentials().password10);
    assertTrue(article.userLoggedInMobile(Configuration.getCredentials().userName10));
}
Also used : ArticlePage(com.wikia.webdriver.elements.mercury.pages.ArticlePage) Test(org.testng.annotations.Test)

Example 20 with ArticlePage

use of com.wikia.webdriver.elements.mercury.pages.ArticlePage in project selenium-tests by Wikia.

the class LoginTests method anonCanNotLogInWithBlankPassword.

@Test(groups = "login-anonCanNotLogInWithBlankPassword")
public void anonCanNotLogInWithBlankPassword() {
    ArticlePage article = new ArticlePage();
    SignInPage signIn = article.open(MercurySubpages.MAIN_PAGE).getTopbar().openNavigation().clickOnSignInRegisterButton().navigateToSignIn();
    signIn.login(Configuration.getCredentials().userName10, "someinvalidpassw0rd");
    assertTrue(signIn.submitButtonNotClickable());
}
Also used : ArticlePage(com.wikia.webdriver.elements.mercury.pages.ArticlePage) SignInPage(com.wikia.webdriver.pageobjectsfactory.pageobject.auth.signin.SignInPage) Test(org.testng.annotations.Test)

Aggregations

ArticlePage (com.wikia.webdriver.elements.mercury.pages.ArticlePage)25 Test (org.testng.annotations.Test)25 Header (com.wikia.webdriver.elements.mercury.components.Header)6 TopBar (com.wikia.webdriver.elements.mercury.components.TopBar)4 SignInPage (com.wikia.webdriver.pageobjectsfactory.pageobject.auth.signin.SignInPage)4 Execute (com.wikia.webdriver.common.core.annotations.Execute)3 InBrowser (com.wikia.webdriver.common.core.annotations.InBrowser)3 EditorHomePageObject (com.wikia.webdriver.elements.mercury.old.curatedcontent.EditorHomePageObject)3 ArticleContent (com.wikia.webdriver.common.core.api.ArticleContent)2 JavascriptActions (com.wikia.webdriver.common.core.elemnt.JavascriptActions)2 CuratedMainPagePageObject (com.wikia.webdriver.elements.mercury.old.curatedcontent.CuratedMainPagePageObject)2 CategoryPage (com.wikia.webdriver.elements.mercury.pages.CategoryPage)2 SkinHelper (com.wikia.webdriver.common.skin.SkinHelper)1 CuratedContentPageObject (com.wikia.webdriver.elements.mercury.old.curatedcontent.CuratedContentPageObject)1 SearchResultsPage (com.wikia.webdriver.elements.mercury.pages.SearchResultsPage)1 GuidelinesPage (com.wikia.webdriver.elements.mercury.pages.discussions.GuidelinesPage)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1