Search in sources :

Example 6 with SearchResultsPage

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

the class SearchMobileWikiTests method mercury_search_searchInputDoesNotCoverNavigation.

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

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

the class SearchMobileWikiTests method mercury_search_focusOnTryAnotherSearchWhenNoResults.

@Execute(onWikia = MercuryWikis.MERCURY_AUTOMATION_TESTING)
@InBrowser(emulator = Emulator.GOOGLE_NEXUS_5)
@Test(groups = { "mercury_search_focusOnTryAnotherSearchWhenNoResults", "Mercury_Search_002" })
public void mercury_search_focusOnTryAnotherSearchWhenNoResults() {
    SearchResultsPage searchResults = new SearchResultsPage().openForQuery(SEARCH_PHRASE_NO_RESULTS).clickTryAnotherSearch();
    Assertion.assertTrue(searchResults.getSearch().isInputFieldFocused());
    Assertion.assertTrue(searchResults.getSearch().getSearchPhrase().isEmpty());
}
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 8 with SearchResultsPage

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

the class SearchMobileWikiTests method mercury_search_emptySearchPhrase.

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

Example 9 with SearchResultsPage

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

the class SearchMobileWikiTests method mercury_search_noSuggestionsOnSearchResultsPage.

@Execute(onWikia = MercuryWikis.MERCURY_AUTOMATION_TESTING)
@InBrowser(emulator = Emulator.GOOGLE_NEXUS_5)
@Test(groups = { "mercury_search_noSuggestionsOnSearchResultsPage", "Mercury_Search_002" })
public void mercury_search_noSuggestionsOnSearchResultsPage() {
    SearchResultsPage searchResults = new SearchResultsPage().openForQuery(SEARCH_PHRASE_NO_RESULTS);
    Assertion.assertFalse(searchResults.getSearch().areSearchSuggestionsDisplayed());
}
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 10 with SearchResultsPage

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

the class SearchMobileWikiTests method mercury_search_defaultResultsNumberOnSearchResultsPage.

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