Search in sources :

Example 76 with InBrowser

use of com.wikia.webdriver.common.core.annotations.InBrowser in project selenium-tests by Wikia.

the class SearchMobileWikiTests method mercury_search_userIsRedirectedToSearchResultsPage.

@Execute(onWikia = MercuryWikis.MERCURY_AUTOMATION_TESTING)
@InBrowser(emulator = Emulator.GOOGLE_NEXUS_5)
@Test(groups = { "mercury_search_userIsRedirectedToSearchResultsPage", "Mercury_Search_001" })
public void mercury_search_userIsRedirectedToSearchResultsPage() {
    SearchResultsPage searchResults = new ArticlePage().open(MercurySubpages.MAIN_PAGE).getTopBar().openSearch().typeInSearch(SEARCH_PHRASE).clickEnterAndNavigateToSearchResults(Skin.MOBILE_WIKI);
    Assertion.assertTrue(searchResults.isSearchResultsPageOpen());
}
Also used : SearchResultsPage(com.wikia.webdriver.elements.mercury.pages.SearchResultsPage) 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 77 with InBrowser

use of com.wikia.webdriver.common.core.annotations.InBrowser in project selenium-tests by Wikia.

the class SearchMercuryTests method mercury_search_userIsRedirectedToSearchResultsPage.

@Execute(onWikia = MercuryWikis.MERCURY_AUTOMATION_TESTING)
@InBrowser(emulator = Emulator.GOOGLE_NEXUS_5)
@Test(groups = { "mercury_search_userIsRedirectedToSearchResultsPage", "Mercury_Search_001" })
public void mercury_search_userIsRedirectedToSearchResultsPage() {
    SearchResultsPage searchResults = new GuidelinesPage().open().getTopBar().openSearch().typeInSearch(SEARCH_PHRASE).clickEnterAndNavigateToSearchResults(Skin.MERCURY);
    Assertion.assertTrue(searchResults.isSearchResultsPageOpen());
}
Also used : SearchResultsPage(com.wikia.webdriver.elements.mercury.pages.SearchResultsPage) 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 78 with InBrowser

use of com.wikia.webdriver.common.core.annotations.InBrowser 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 79 with InBrowser

use of com.wikia.webdriver.common.core.annotations.InBrowser in project selenium-tests by Wikia.

the class SearchMobileWikiTests method mercury_search_searchNoResultsPageDisplayed.

@Execute(onWikia = MercuryWikis.MERCURY_AUTOMATION_TESTING)
@InBrowser(emulator = Emulator.GOOGLE_NEXUS_5)
@Test(groups = { "mercury_search_searchNoResultsPageDisplayed", "Mercury_Search_002" })
public void mercury_search_searchNoResultsPageDisplayed() {
    SearchResultsPage searchResults = new SearchResultsPage().openForQuery(SEARCH_PHRASE_NO_RESULTS);
    Assertion.assertTrue(searchResults.isNoResultsPagePresent());
    Assertion.assertFalse(searchResults.isLoadMoreButtonVisible());
}
Also used : SearchResultsPage(com.wikia.webdriver.elements.mercury.pages.SearchResultsPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Example 80 with InBrowser

use of com.wikia.webdriver.common.core.annotations.InBrowser in project selenium-tests by Wikia.

the class TestAdsNoAdsForSony method adsNoAdsForSonyMobile.

@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
@Test(dataProviderClass = AdsDataProvider.class, dataProvider = "noAdsForSony", groups = "AdsNoAdsForSonyMobile")
public void adsNoAdsForSonyMobile(String wikiName, String path) {
    String testedPage = urlBuilder.getUrlForPath(wikiName, path);
    SonySideViewObject sonyPage = new SonySideViewObject(driver);
    AdsBaseObject wikiPage = sonyPage.goToDestinationPage(testedPage);
    wikiPage.verifyNoAdsOnMobilePage();
}
Also used : AdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject) SonySideViewObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.SonySideViewObject) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Aggregations

InBrowser (com.wikia.webdriver.common.core.annotations.InBrowser)184 Test (org.testng.annotations.Test)180 Execute (com.wikia.webdriver.common.core.annotations.Execute)146 PostEntity (com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity)50 PostDetailsPage (com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage)35 PostsListPage (com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage)26 GuidelinesPage (com.wikia.webdriver.elements.mercury.pages.discussions.GuidelinesPage)17 AdsBaseObject (com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject)15 NetworkTrafficDump (com.wikia.webdriver.common.core.annotations.NetworkTrafficDump)13 MoreOptionsPopOver (com.wikia.webdriver.elements.mercury.components.discussions.common.MoreOptionsPopOver)12 SearchResultsPage (com.wikia.webdriver.elements.mercury.pages.SearchResultsPage)12 LightboxComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.lightbox.LightboxComponentObject)12 VideoFanTakeover (com.wikia.webdriver.pageobjectsfactory.componentobject.ad.VideoFanTakeover)11 CategoriesFieldset (com.wikia.webdriver.elements.mercury.components.discussions.common.category.CategoriesFieldset)10 UserPostsPage (com.wikia.webdriver.elements.mercury.pages.discussions.UserPostsPage)10 AdsFandomObject (com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsFandomObject)9 RelatedIssue (com.wikia.webdriver.common.core.annotations.RelatedIssue)7 CategoryPill (com.wikia.webdriver.elements.mercury.components.discussions.common.category.CategoryPill)7 PostActionsRow (com.wikia.webdriver.elements.mercury.components.discussions.common.PostActionsRow)6 ReplyCreator (com.wikia.webdriver.elements.mercury.components.discussions.common.ReplyCreator)5