Search in sources :

Example 6 with PostDetailsPage

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

the class ZeroErrorStateTests method userOnDesktopSeesProperMessageWhenOpensEmptyPostDetailsPage.

private void userOnDesktopSeesProperMessageWhenOpensEmptyPostDetailsPage() {
    ErrorMessages errorMessage = new PostDetailsPage().openEmptyPost().getErrorMessages();
    Assertion.assertTrue(errorMessage.isErrorMessagePresent());
    Assertion.assertEquals(errorMessage.getErrorMessageText(), MESSAGE_1 + MESSAGE_2);
}
Also used : ErrorMessages(com.wikia.webdriver.elements.mercury.components.discussions.common.ErrorMessages) PostDetailsPage(com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage)

Example 7 with PostDetailsPage

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

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

the class ZeroErrorStateTests method userOnMobileSeesProperMessageWhenOpensEmptyPostDetailsPage.

private void userOnMobileSeesProperMessageWhenOpensEmptyPostDetailsPage() {
    ErrorMessages errorMessage = new PostDetailsPage().openEmptyPost().getErrorMessages();
    Assertion.assertTrue(errorMessage.isErrorMessagePresent());
    Assertion.assertEquals(errorMessage.getErrorMessageText(), MESSAGE_1 + MESSAGE_3);
}
Also used : ErrorMessages(com.wikia.webdriver.elements.mercury.components.discussions.common.ErrorMessages) PostDetailsPage(com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage)

Example 9 with PostDetailsPage

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

the class ReportingPostTests method openPostDetailsPageAndWaitUntilLoaded.

private PostDetailsPage openPostDetailsPageAndWaitUntilLoaded(String postId) {
    final PostDetailsPage post = new PostDetailsPage().open(postId);
    post.waitForPageLoad();
    return post;
}
Also used : PostDetailsPage(com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage)

Example 10 with PostDetailsPage

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

the class ReportingPostTests method anonUserOnMobileCanNotReportPostOnPostDetailsPage.

@Test(groups = "discussions-anonUserMobileReporting")
@Execute(asUser = User.ANONYMOUS)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void anonUserOnMobileCanNotReportPostOnPostDetailsPage() {
    final PostDetailsPage page = openDefaultPostDetailsWaitingUtilLoaded();
    assertFalse(isReportPostOptionAvailableOn(page), NO_REPORT_POST_OPTION_MESSAGE);
}
Also used : PostDetailsPage(com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Aggregations

PostDetailsPage (com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage)55 Execute (com.wikia.webdriver.common.core.annotations.Execute)35 InBrowser (com.wikia.webdriver.common.core.annotations.InBrowser)35 Test (org.testng.annotations.Test)35 PostEntity (com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity)29 ReplyCreator (com.wikia.webdriver.elements.mercury.components.discussions.common.ReplyCreator)5 Reply (com.wikia.webdriver.elements.mercury.components.discussions.common.Reply)3 ErrorMessages (com.wikia.webdriver.elements.mercury.components.discussions.common.ErrorMessages)2 Post (com.wikia.webdriver.elements.mercury.components.discussions.common.Post)1 Replies (com.wikia.webdriver.elements.mercury.components.discussions.common.Replies)1 PageWithPosts (com.wikia.webdriver.elements.mercury.pages.discussions.PageWithPosts)1