Search in sources :

Example 1 with Loading

use of com.wikia.webdriver.elements.mercury.components.Loading in project selenium-tests by Wikia.

the class SortingTests method userCanSwitchBetweenLatestAndTrendingInDropdown.

/**
   * TESTING METHODS SECTION
   */
private void userCanSwitchBetweenLatestAndTrendingInDropdown() {
    PostsListPage page = new PostsListPage().open();
    FiltersPopOver filtersPopOver = page.getFiltersPopOver();
    DiscussionsHeader discussionsHeader = page.getDiscussionsHeader();
    discussionsHeader.clickSortButtonOnMobile();
    Assertion.assertTrue(filtersPopOver.isSortListVisibleMobile());
    filtersPopOver.clickLatestLinkOnMobile();
    filtersPopOver.clickApplyButton();
    new Loading(driver).handleAsyncPageReload();
    discussionsHeader.clickSortButtonOnMobile();
    filtersPopOver.clickTrendingOptionInSortMenu();
    filtersPopOver.clickApplyButton();
    new Loading(driver).handleAsyncPageReload();
}
Also used : Loading(com.wikia.webdriver.elements.mercury.components.Loading) FiltersPopOver(com.wikia.webdriver.elements.mercury.components.discussions.mobile.FiltersPopOver) PostsListPage(com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage) DiscussionsHeader(com.wikia.webdriver.elements.mercury.components.discussions.mobile.DiscussionsHeader)

Example 2 with Loading

use of com.wikia.webdriver.elements.mercury.components.Loading in project selenium-tests by Wikia.

the class MainPageTests method init.

private void init() {
    this.navigate = new Navigate();
    this.curatedMainPage = new CuratedMainPagePageObject();
    this.curatedContent = new CuratedContentPageObject();
    this.loading = new Loading(driver);
}
Also used : CuratedContentPageObject(com.wikia.webdriver.elements.mercury.old.curatedcontent.CuratedContentPageObject) CuratedMainPagePageObject(com.wikia.webdriver.elements.mercury.old.curatedcontent.CuratedMainPagePageObject) Loading(com.wikia.webdriver.elements.mercury.components.Loading) Navigate(com.wikia.webdriver.elements.common.Navigate)

Example 3 with Loading

use of com.wikia.webdriver.elements.mercury.components.Loading in project selenium-tests by Wikia.

the class ArticlePageTests method init.

private void init() {
    this.topBar = new TopBar(driver);
    this.navigation = new Navigation(driver);
    this.navigate = new Navigate();
    this.loading = new Loading(driver);
}
Also used : Navigation(com.wikia.webdriver.elements.mercury.components.Navigation) Loading(com.wikia.webdriver.elements.mercury.components.Loading) TopBar(com.wikia.webdriver.elements.mercury.components.TopBar) Navigate(com.wikia.webdriver.elements.common.Navigate)

Example 4 with Loading

use of com.wikia.webdriver.elements.mercury.components.Loading in project selenium-tests by Wikia.

the class SearchResultsPage method clickSearchResult.

public String clickSearchResult(int index) {
    Loading loading = new Loading(driver);
    String clickedLink;
    PageObjectLogging.logInfo("Select search result no.: " + index);
    WebElement searchResult = driver.findElements(By.cssSelector(SEARCH_RESULT_SELECTOR)).get(index);
    wait.forElementClickable(searchResult);
    clickedLink = searchResult.getAttribute("href");
    searchResult.click();
    loading.handleAsyncPageReload();
    return clickedLink;
}
Also used : Loading(com.wikia.webdriver.elements.mercury.components.Loading) WebElement(org.openqa.selenium.WebElement)

Example 5 with Loading

use of com.wikia.webdriver.elements.mercury.components.Loading in project selenium-tests by Wikia.

the class LayoutTests method userCanViewMorePosts.

private void userCanViewMorePosts() {
    Post post = new PostsListPage().open().getPost();
    int startingListLength = post.getPostsListLength();
    post.clickLoadMore();
    new Loading(driver).handleAsyncPageReload();
    Assertion.assertTrue(startingListLength < post.getPostsListLength());
}
Also used : Loading(com.wikia.webdriver.elements.mercury.components.Loading) Post(com.wikia.webdriver.elements.mercury.components.discussions.common.Post) PostsListPage(com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage)

Aggregations

Loading (com.wikia.webdriver.elements.mercury.components.Loading)10 Navigate (com.wikia.webdriver.elements.common.Navigate)4 PostsListPage (com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage)3 CuratedContentPageObject (com.wikia.webdriver.elements.mercury.old.curatedcontent.CuratedContentPageObject)2 WebElement (org.openqa.selenium.WebElement)2 SkinHelper (com.wikia.webdriver.common.skin.SkinHelper)1 Navigation (com.wikia.webdriver.elements.mercury.components.Navigation)1 TopBar (com.wikia.webdriver.elements.mercury.components.TopBar)1 Post (com.wikia.webdriver.elements.mercury.components.discussions.common.Post)1 SortingFiltersOnDesktop (com.wikia.webdriver.elements.mercury.components.discussions.desktop.SortingFiltersOnDesktop)1 DiscussionsHeader (com.wikia.webdriver.elements.mercury.components.discussions.mobile.DiscussionsHeader)1 FiltersPopOver (com.wikia.webdriver.elements.mercury.components.discussions.mobile.FiltersPopOver)1 ArticlePageObject (com.wikia.webdriver.elements.mercury.old.ArticlePageObject)1 TableOfContentPageObject (com.wikia.webdriver.elements.mercury.old.TableOfContentPageObject)1 CuratedMainPagePageObject (com.wikia.webdriver.elements.mercury.old.curatedcontent.CuratedMainPagePageObject)1