Search in sources :

Example 1 with Post

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

the class UpvotingTests method postListUpvoteButtonClickDoesntAddAnUpvote.

private void postListUpvoteButtonClickDoesntAddAnUpvote() {
    Post post = findPosts();
    int replyIndex = 0;
    post.isUpvoteButtonVisible(replyIndex);
    String firstVoteCount = post.getVoteCount(replyIndex);
    post.clickUpvoteButton(replyIndex);
    post.waitForVoteCountChangeTimeLagToPass();
    String secondVoteCount = post.getVoteCount(replyIndex);
    Assertion.assertEquals(firstVoteCount, secondVoteCount);
}
Also used : Post(com.wikia.webdriver.elements.mercury.components.discussions.common.Post)

Example 2 with Post

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

the class UpvotingTests method postListUpvoteButtonClickAddsAnUpvoteAndSecondClickRemovesTheUpvote.

/**
   * TESTING METHODS SECTION
   */
private void postListUpvoteButtonClickAddsAnUpvoteAndSecondClickRemovesTheUpvote() {
    Post post = findPosts();
    int postIndex = 0;
    post.isUpvoteButtonVisible(postIndex);
    String firstVoteCount = post.getVoteCount(postIndex);
    post.clickUpvoteButton(postIndex);
    post.waitForVoteCountToChange(postIndex, firstVoteCount);
    String secondVoteCount = post.getVoteCount(postIndex);
    Assertion.assertNotEquals(firstVoteCount, secondVoteCount);
    post.clickUpvoteButton(postIndex);
    post.waitForVoteCountToChange(postIndex, secondVoteCount);
    String thirdVoteCount = post.getVoteCount(postIndex);
    Assertion.assertEquals(firstVoteCount, thirdVoteCount);
}
Also used : Post(com.wikia.webdriver.elements.mercury.components.discussions.common.Post)

Example 3 with Post

use of com.wikia.webdriver.elements.mercury.components.discussions.common.Post 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 4 with Post

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

the class DeleteAllPostsByUserTests method cancelAndReturnFirst.

private PostEntity cancelAndReturnFirst() {
    String postId = setUp().getId();
    getDeleteAllButton(userWithPosts.getUserId()).click().cancelAndWait();
    return new Post().findPostById(postId);
}
Also used : Post(com.wikia.webdriver.elements.mercury.components.discussions.common.Post)

Example 5 with Post

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

the class DeleteAllPostsByUserTests method deleteAllAndReturnFirst.

private PostEntity deleteAllAndReturnFirst() {
    String postId = setUp().getId();
    getDeleteAllButton(userWithPosts.getUserId()).click().confirmAndWait();
    return new Post().findPostById(postId);
}
Also used : Post(com.wikia.webdriver.elements.mercury.components.discussions.common.Post)

Aggregations

Post (com.wikia.webdriver.elements.mercury.components.discussions.common.Post)7 PostsListPage (com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage)2 Loading (com.wikia.webdriver.elements.mercury.components.Loading)1 PostDetailsPage (com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage)1