@InBrowser(emulator = Emulator.GOOGLE_NEXUS_5) @Test(groups = "mercury_search_userIsRedirectedToSearchResultsPage") public void mercury_search_userIsRedirectedToSearchResultsPage() { SearchResultsPage searchResults = new ArticlePage() .open(MercurySubpages.MAIN_PAGE) .getTopBar() .openSearch() .typeInSearch(SEARCH_PHRASE) .clickEnterAndNavigateToSearchResults(); Assertion.assertTrue(searchResults.isSearchResultsPageOpen()); }
@InBrowser(emulator = Emulator.GOOGLE_NEXUS_5) @Test(groups = "mercury_search_redirectToNewResultsPageFromNoResults") public void mercury_search_redirectToNewResultsPageFromNoResults() { SearchResultsPage searchResults = new SearchResultsPage() .openForQuery(SEARCH_PHRASE_NO_RESULTS) .clickTryAnotherSearch() .getSearch() .typeInSearch(SEARCH_PHRASE) .clickEnterAndNavigateToSearchResults(); Assertion.assertTrue(searchResults.isSearchResultsPageOpen()); Assertion.assertFalse(searchResults.isNoResultsPagePresent()); Assertion.assertTrue(searchResults.areResultsPresent()); }