Search in sources :

Example 1 with IntraWikiSearchPageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.search.intrawikisearch.IntraWikiSearchPageObject in project selenium-tests by Wikia.

the class BasicActions method pagination.

@Test(groups = { "IntraWikiSearch_002", "Search", "Search3" })
@RelatedIssue(issueID = "MAIN-5044", comment = "make sure there is a pagination, " + "built of 6 or 11 elements depending or what " + "pagination link you enter")
public void pagination() {
    IntraWikiSearchPageObject search = new IntraWikiSearchPageObject(driver);
    search.openWikiPage(testedWiki);
    search.searchFor(SearchContent.SEARCH_PAGINATION_RESULTS);
    String firstResult = search.getTitleInnerText();
    search.verifyPagination();
    search.clickNextPaginator();
    search.verifyFirstArticleNameNotTheSame(firstResult);
    search.verifyPagination();
    search.clickPrevPaginator();
    search.verifyFirstArticleNameTheSame(firstResult);
    search.verifyPagination();
    search.verifyLastResultPage();
}
Also used : IntraWikiSearchPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.search.intrawikisearch.IntraWikiSearchPageObject) Test(org.testng.annotations.Test) RelatedIssue(com.wikia.webdriver.common.core.annotations.RelatedIssue)

Example 2 with IntraWikiSearchPageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.search.intrawikisearch.IntraWikiSearchPageObject in project selenium-tests by Wikia.

the class BasicActions method userSearch.

@Test(groups = { "userSearch", "Search", "Search2" })
@Execute(asUser = User.USER)
public void userSearch() {
    WikiBasePageObject base = new WikiBasePageObject();
    base.openWikiPage(testedWiki);
    NavigationBar navigation = new NavigationBar(driver);
    IntraWikiSearchPageObject search = navigation.searchFor(SearchContent.SEARCH_PHRASE_RESULTS);
    search.verifyFirstArticleNameTheSame(SearchContent.SEARCH_PHRASE_RESULTS);
}
Also used : NavigationBar(com.wikia.webdriver.pageobjectsfactory.componentobject.global_navitagtion.NavigationBar) IntraWikiSearchPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.search.intrawikisearch.IntraWikiSearchPageObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 3 with IntraWikiSearchPageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.search.intrawikisearch.IntraWikiSearchPageObject in project selenium-tests by Wikia.

the class BasicActions method noResults.

@Test(groups = { "IntraWikiSearch_004", "Search", "Search1" })
public void noResults() {
    IntraWikiSearchPageObject search = new IntraWikiSearchPageObject(driver);
    search.openWikiPage(testedWiki);
    search.searchFor(SearchContent.SEARCH_PHRASE_NO_RESULTS_2);
    search.verifyNoResults();
}
Also used : IntraWikiSearchPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.search.intrawikisearch.IntraWikiSearchPageObject) Test(org.testng.annotations.Test)

Example 4 with IntraWikiSearchPageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.search.intrawikisearch.IntraWikiSearchPageObject in project selenium-tests by Wikia.

the class BasicActions method sortingVideos.

@Test(groups = { "IntraWikiSearch_006", "Search", "Search3" })
@RelatedIssue(issueID = "MAIN-7142", comment = "Product code defect. No need to test manually")
public void sortingVideos() {
    IntraWikiSearchPageObject search = new IntraWikiSearchPageObject(driver);
    search.openWikiPage(testedWiki);
    search.searchFor(SearchContent.SEARCH_PHRASE_RESULTS);
    search.selectPhotosVideos();
    search.selectVideosOnly();
    search.verifyTitlesNotEmpty();
    search.sortBy(sortOptions.DURATION);
    List<String> titles1 = search.getTitles();
    search.sortBy(sortOptions.RELEVANCY);
    List<String> titles2 = search.getTitles();
    search.sortBy(sortOptions.PUBLISH_DATE);
    List<String> titles3 = search.getTitles();
    search.compareTitleListsNotEquals(titles1, titles2);
    search.compareTitleListsNotEquals(titles1, titles3);
    search.compareTitleListsNotEquals(titles2, titles3);
}
Also used : IntraWikiSearchPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.search.intrawikisearch.IntraWikiSearchPageObject) Test(org.testng.annotations.Test) RelatedIssue(com.wikia.webdriver.common.core.annotations.RelatedIssue)

Example 5 with IntraWikiSearchPageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.search.intrawikisearch.IntraWikiSearchPageObject in project selenium-tests by Wikia.

the class BasicActions method noFileExtensionNeed.

@Test(groups = { "IntraWikiSearch_012", "Search", "Search4" })
public void noFileExtensionNeed() {
    IntraWikiSearchPageObject search = new IntraWikiSearchPageObject(driver);
    search.openWikiPage(testedWiki);
    search.searchFor(SearchContent.SEARCH_RESULT_WITH_EXTENSION);
    search.selectPhotosVideos();
    search.verifyFirstResultExtension(SearchContent.SEARCH_RESULT_WITH_EXTENSION);
}
Also used : IntraWikiSearchPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.search.intrawikisearch.IntraWikiSearchPageObject) Test(org.testng.annotations.Test)

Aggregations

IntraWikiSearchPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.search.intrawikisearch.IntraWikiSearchPageObject)18 Test (org.testng.annotations.Test)18 RelatedIssue (com.wikia.webdriver.common.core.annotations.RelatedIssue)7 NavigationBar (com.wikia.webdriver.pageobjectsfactory.componentobject.global_navitagtion.NavigationBar)2 WikiBasePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject)2 Execute (com.wikia.webdriver.common.core.annotations.Execute)1 SearchPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.SearchPageObject)1