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);
}
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);
}
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);
}
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;
}
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);
}
Aggregations