Search in sources :

Example 1 with Reply

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

the class UpvotingTests method firstReplyUpvoteButtonClickAddsAnUpvoteAndSecondClickRemovesTheUpvote.

private void firstReplyUpvoteButtonClickAddsAnUpvoteAndSecondClickRemovesTheUpvote() {
    Reply reply = new PostDetailsPage().openDefaultPost().getReply();
    int replyIndex = 0;
    reply.isReplyUpvoteButtonVisible(replyIndex);
    String firstVoteCount = reply.getReplyVoteCount(replyIndex);
    reply.clickReplyUpvoteButton(replyIndex);
    reply.waitForReplyVoteCountToChange(replyIndex, firstVoteCount);
    String secondVoteCount = reply.getReplyVoteCount(replyIndex);
    Assertion.assertNotEquals(firstVoteCount, secondVoteCount);
    reply.clickReplyUpvoteButton(replyIndex);
    reply.waitForReplyVoteCountToChange(replyIndex, secondVoteCount);
    String thirdVoteCount = reply.getReplyVoteCount(replyIndex);
    Assertion.assertEquals(firstVoteCount, thirdVoteCount);
}
Also used : PostDetailsPage(com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage) Reply(com.wikia.webdriver.elements.mercury.components.discussions.common.Reply)

Example 2 with Reply

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

the class LayoutTests method postDetailsListLoads.

/**
   * TESTING METHODS SECTION
   */
private void postDetailsListLoads() {
    Reply reply = new PostDetailsPage().openDefaultPost().getReply();
    Assertion.assertFalse(reply.isPostDetailsListEmpty());
}
Also used : PostDetailsPage(com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage) Reply(com.wikia.webdriver.elements.mercury.components.discussions.common.Reply)

Example 3 with Reply

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

the class UpvotingTests method firstReplyUpvoteButtonClickDoesntAddAnUpvote.

private void firstReplyUpvoteButtonClickDoesntAddAnUpvote() {
    Reply reply = new PostDetailsPage().openDefaultPost().getReply();
    int replyIndex = 0;
    reply.isReplyUpvoteButtonVisible(replyIndex);
    String firstVoteCount = reply.getReplyVoteCount(replyIndex);
    reply.clickReplyUpvoteButton(replyIndex);
    reply.waitForVoteCountChangeTimeLagToPass();
    String secondVoteCount = reply.getReplyVoteCount(replyIndex);
    Assertion.assertEquals(firstVoteCount, secondVoteCount);
}
Also used : PostDetailsPage(com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage) Reply(com.wikia.webdriver.elements.mercury.components.discussions.common.Reply)

Aggregations

Reply (com.wikia.webdriver.elements.mercury.components.discussions.common.Reply)3 PostDetailsPage (com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage)3