use of com.wikia.webdriver.elements.mercury.pages.SearchResultsPage in project selenium-tests by Wikia.
the class SearchMobileWikiTests method mercury_search_redirectToNewResultsPageFromNoResults.
@Execute(onWikia = MercuryWikis.MERCURY_AUTOMATION_TESTING)
@InBrowser(emulator = Emulator.GOOGLE_NEXUS_5)
@Test(groups = { "mercury_search_redirectToNewResultsPageFromNoResults", "Mercury_Search_002" })
public void mercury_search_redirectToNewResultsPageFromNoResults() {
SearchResultsPage searchResults = new SearchResultsPage().openForQuery(SEARCH_PHRASE_NO_RESULTS).clickTryAnotherSearch().getSearch().typeInSearch(SEARCH_PHRASE).clickEnterAndNavigateToSearchResults(Skin.MOBILE_WIKI);
Assertion.assertTrue(searchResults.isSearchResultsPageOpen());
Assertion.assertFalse(searchResults.isNoResultsPagePresent());
Assertion.assertTrue(searchResults.areResultsPresent());
}
use of com.wikia.webdriver.elements.mercury.pages.SearchResultsPage in project selenium-tests by Wikia.
the class SearchMobileWikiTests method mercury_search_loadingMoreResultsOnSearchResultsPage.
@Execute(onWikia = MercuryWikis.MERCURY_AUTOMATION_TESTING)
@InBrowser(emulator = Emulator.GOOGLE_NEXUS_5)
@Test(groups = { "mercury_search_loadingMoreResultsOnSearchResultsPage" })
public void mercury_search_loadingMoreResultsOnSearchResultsPage() {
SearchResultsPage resultsPage = new SearchResultsPage().openForQuery(MULTIPLE_RESULTS_SEARCH_PHRASE);
int defaultCardNumber = resultsPage.getResultCardsNumber();
Assertion.assertTrue(resultsPage.isLoadMoreButtonVisible());
Assertion.assertEquals(defaultCardNumber, SEARCH_RESULTS_NUMBER_FIRST_BATCH);
resultsPage.clickLoadMoreButton();
int moreResultsLoaded = resultsPage.getResultCardsNumber() - defaultCardNumber;
Assertion.assertEquals(moreResultsLoaded, SEARCH_RESULTS_NUMBER_NEXT_BATCH);
Assertion.assertTrue(resultsPage.isLoadMoreButtonVisible());
}
Aggregations