Search in sources :

Example 1 with SearchResultsPage

use of com.wikia.webdriver.elements.mercury.pages.SearchResultsPage 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 2 with SearchResultsPage

use of com.wikia.webdriver.elements.mercury.pages.SearchResultsPage 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 3 with SearchResultsPage

use of com.wikia.webdriver.elements.mercury.pages.SearchResultsPage 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 4 with SearchResultsPage

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

the class SearchMobileWikiTests method mercury_search_searchResultsPageHasNoSearchIconInTopBar.

@Execute(onWikia = MercuryWikis.MERCURY_AUTOMATION_TESTING)
@InBrowser(emulator = Emulator.GOOGLE_NEXUS_5)
@Test(groups = { "mercury_search_searchResultsPageHasNoSearchIconInTopBar", "Mercury_Search_001" })
public void mercury_search_searchResultsPageHasNoSearchIconInTopBar() {
    SearchResultsPage resultsPage = new SearchResultsPage().openForQuery(SEARCH_PHRASE);
    Assertion.assertFalse(resultsPage.getTopBar().isSearchIconClickable());
}
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 5 with SearchResultsPage

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

the class SearchMobileWikiTests method mercury_search_loadMoreResultsOnSearchResultsPageNotVisible.

@Execute(onWikia = MercuryWikis.MERCURY_AUTOMATION_TESTING)
@InBrowser(emulator = Emulator.GOOGLE_NEXUS_5)
@Test(groups = { "mercury_search_loadMoreResultsOnSearchResultsPageNotVisible", "Mercury_Search_002" })
public void mercury_search_loadMoreResultsOnSearchResultsPageNotVisible() {
    SearchResultsPage resultsPage = new SearchResultsPage().openForQuery(SINGLE_RESULT_SEARCH_PHRASE);
    Assertion.assertTrue(resultsPage.getResultCardsNumber() < SEARCH_RESULTS_NUMBER_FIRST_BATCH);
    Assertion.assertFalse(resultsPage.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)

Aggregations

Execute (com.wikia.webdriver.common.core.annotations.Execute)12 InBrowser (com.wikia.webdriver.common.core.annotations.InBrowser)12 SearchResultsPage (com.wikia.webdriver.elements.mercury.pages.SearchResultsPage)12 Test (org.testng.annotations.Test)12 ArticlePage (com.wikia.webdriver.elements.mercury.pages.ArticlePage)1 GuidelinesPage (com.wikia.webdriver.elements.mercury.pages.discussions.GuidelinesPage)1