use of com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage in project selenium-tests by Wikia.
the class ReportingPostTests method anonUserOnDesktopCanNotSeeReportedPostOnPostDetailsPage.
@Test(groups = "discussions-anonUserDesktopReporting")
@Execute(asUser = User.ANONYMOUS)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void anonUserOnDesktopCanNotSeeReportedPostOnPostDetailsPage() {
final PostEntity.Data data = createAndReportPostRemotelyAsFirstUser();
final PostDetailsPage page = openPostDetailsPageAndWaitUntilLoaded(data.getId());
assertFalse(postHasReportedIndicator(page), NO_REPORTED_INDICATOR_ON_POST_MESSAGE);
}
use of com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage in project selenium-tests by Wikia.
the class ReportingPostTests method userOnDesktopCanReportPostOnPostDetailsPage.
@Test(groups = "discussions-loggedInUsersDesktopReporting")
@Execute(asUser = User.USER)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void userOnDesktopCanReportPostOnPostDetailsPage() {
final PostEntity.Data data = cretePostRemotelyAsFirstUser();
final PostDetailsPage page = openPostDetailsPageAndWaitUntilLoaded(data.getId());
final PostEntity postEntity = page.getPost().findPostById(data.getId());
assertTrue(postCanBeReported(postEntity), CAN_REPORT_POST_MESSAGE);
}
use of com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage in project selenium-tests by Wikia.
the class ReportingPostTests method userOnMobileCanReportPostOnPostDetailsPage.
@Test(groups = "discussions-loggedInUsersMobileReporting")
@Execute(asUser = User.USER)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void userOnMobileCanReportPostOnPostDetailsPage() {
final PostEntity.Data data = cretePostRemotelyAsFirstUser();
final PostDetailsPage page = openPostDetailsPageAndWaitUntilLoaded(data.getId());
final PostEntity postEntity = page.getPost().findPostById(data.getId());
assertTrue(postCanBeReported(postEntity), CAN_REPORT_POST_MESSAGE);
}
use of com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage 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);
}
use of com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage in project selenium-tests by Wikia.
the class UpvotingTests method postDetailsUpvoteButtonClickDoesntAddAnUpvote.
private void postDetailsUpvoteButtonClickDoesntAddAnUpvote() {
Post post = new PostDetailsPage().openDefaultPost().getPost();
post.isUpvoteButtonVisible();
String firstVoteCount = post.getPostDetailsVoteCount();
post.clickPostDetailsUpvoteButton();
post.waitForVoteCountChangeTimeLagToPass();
String secondVoteCount = post.getPostDetailsVoteCount();
Assertion.assertEquals(firstVoteCount, secondVoteCount);
}
Aggregations