Search in sources :

Example 16 with PostsListPage

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

the class LayoutTests method postsListLoads.

private void postsListLoads() {
    Post post = new PostsListPage().open().getPost();
    Assertion.assertFalse(post.isPostListEmpty());
}
Also used : Post(com.wikia.webdriver.elements.mercury.components.discussions.common.Post) PostsListPage(com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage)

Example 17 with PostsListPage

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

the class EditingPostTests method userOnMobileCanNotSeeThatPostWasEditedByAdministratorOnPostsListPage.

@Test(groups = USER_MOBILE_TEST_GROUP)
@Execute(asUser = User.USER)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void userOnMobileCanNotSeeThatPostWasEditedByAdministratorOnPostsListPage() {
    final PostEntity.Data data = updatePostAsStaffRemotely(createPostAsUserRemotely());
    final PostEntity post = new PostsListPage().open(data.getId()).getPost().findPostById(data.getId());
    Assertion.assertFalse(post.hasEditedBySection(), SHOULD_NOT_HAVE_EDITED_BY_SECTION_MESSAGE);
}
Also used : PostsListPage(com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage) PostEntity(com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Example 18 with PostsListPage

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

the class NavigatingTests method clickAvatarLoadsUserPage.

private void clickAvatarLoadsUserPage() {
    PostsListPage page = new PostsListPage().open();
    page.getPost().clickUserAvatar();
    Assertion.assertTrue(driver.getCurrentUrl().contains(URLsContent.USER_PROFILE.replace("%userName%", "")));
}
Also used : PostsListPage(com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage)

Example 19 with PostsListPage

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

the class EditingPostTests method userOnDesktopCanNotSeeThatPostWasEditedByAdministratorOnPostsListPage.

@Test(groups = USER_DESKTOP_TEST_GROUP)
@Execute(asUser = User.USER)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void userOnDesktopCanNotSeeThatPostWasEditedByAdministratorOnPostsListPage() {
    final PostEntity.Data data = updatePostAsStaffRemotely(createPostAsUserRemotely());
    final PostEntity post = new PostsListPage().open(data.getId()).getPost().findPostById(data.getId());
    Assertion.assertFalse(post.hasEditedBySection(), SHOULD_NOT_HAVE_EDITED_BY_SECTION_MESSAGE);
}
Also used : PostsListPage(com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage) PostEntity(com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Example 20 with PostsListPage

use of com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage 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

PostsListPage (com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage)46 Execute (com.wikia.webdriver.common.core.annotations.Execute)26 InBrowser (com.wikia.webdriver.common.core.annotations.InBrowser)26 Test (org.testng.annotations.Test)26 CategoryPill (com.wikia.webdriver.elements.mercury.components.discussions.common.category.CategoryPill)11 PostEntity (com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity)10 CategoriesFieldset (com.wikia.webdriver.elements.mercury.components.discussions.common.category.CategoriesFieldset)10 Loading (com.wikia.webdriver.elements.mercury.components.Loading)3 PostsCreatorDesktop (com.wikia.webdriver.elements.mercury.components.discussions.desktop.PostsCreatorDesktop)3 Post (com.wikia.webdriver.elements.mercury.components.discussions.common.Post)2 ErrorMessages (com.wikia.webdriver.elements.mercury.components.discussions.common.ErrorMessages)1 BackButtons (com.wikia.webdriver.elements.mercury.components.discussions.desktop.BackButtons)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 PostsCreatorMobile (com.wikia.webdriver.elements.mercury.components.discussions.mobile.PostsCreatorMobile)1 PageWithPosts (com.wikia.webdriver.elements.mercury.pages.discussions.PageWithPosts)1