use of com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage in project selenium-tests by Wikia.
the class ReportingPostTests method anonUserOnDesktopCanNotReportPostOnPostDetailsPage.
@Test(groups = "discussions-anonUserDesktopReporting")
@Execute(asUser = User.ANONYMOUS)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void anonUserOnDesktopCanNotReportPostOnPostDetailsPage() {
final PostDetailsPage page = openDefaultPostDetailsWaitingUtilLoaded();
assertFalse(isReportPostOptionAvailableOn(page), NO_REPORT_POST_OPTION_MESSAGE);
}
use of com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage in project selenium-tests by Wikia.
the class ReportingPostTests method moderatorCanApproveReportedPostOnPostDetailsPage.
private void moderatorCanApproveReportedPostOnPostDetailsPage() {
PostEntity.Data data = createAndReportPostRemotelyAsFirstUser();
reportPostRemotelyAsSecondUser(data);
final PostDetailsPage page = openPostDetailsPageAndWaitUntilLoaded(data.getId());
final PostEntity postEntity = page.getPost().findPostById(data.getId());
assertTrue(isReported(postEntity), REPORTED_INDICATOR_ON_POST_MESSAGE);
assertTrue(clickCancelOnValidatePostModalDialog(page, postEntity), REPORTED_INDICATOR_ON_POST_MESSAGE);
assertFalse(clickApproveOnValidatePostModalDialog(page, postEntity), 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 userCanReportApprovedPostOnPostDetailsPage.
private void userCanReportApprovedPostOnPostDetailsPage() {
final PostEntity.Data data = createAndReportPostRemotelyAsFirstUser();
reportPostRemotelyAsSecondUser(data);
validatePostRemotelyAsDiscussionsModerator(data);
final PostDetailsPage page = openPostDetailsPageAndWaitUntilLoaded(data.getId());
final PostEntity postEntity = page.getPost().findPostById(data.getId());
assertFalse(postEntity.isReported(), REPORTED_INDICATOR_NOT_VISIBLE_FOR_USER_MESSAGE);
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 userOnMobileCanNotSeeDeletedPostOnPostDetailsPage.
@Test(groups = "discussions-loggedInUsersMobileReporting")
@Execute(asUser = User.USER)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void userOnMobileCanNotSeeDeletedPostOnPostDetailsPage() {
final PostEntity.Data data = createAndReportAndDeletePostRemotely();
final PostDetailsPage page = openPostDetailsPageAndWaitUntilLoaded(data.getId());
assertTrue(page.getErrorMessages().isErrorMessagePresent(), NOT_VISIBLE_DELETED_POST_MESSAGE);
}
use of com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage in project selenium-tests by Wikia.
the class ReportingPostTests method moderatorCanDeleteReportedPostOnPostDetailsPage.
private void moderatorCanDeleteReportedPostOnPostDetailsPage() {
final PostEntity.Data data = createAndReportPostRemotelyAsFirstUser();
reportPostRemotelyAsSecondUser(data);
validatePostRemotelyAsDiscussionsModerator(data);
reportPostRemotelyAsThirdUser(data);
final PostDetailsPage page = openPostDetailsPageAndWaitUntilLoaded(data.getId());
final PostEntity postEntity = page.getPost().findPostById(data.getId());
assertTrue(isReported(postEntity), REPORTED_INDICATOR_ON_POST_MESSAGE);
assertTrue(clickCancelOnDeletePostModalDialog(page, postEntity), REPORTED_INDICATOR_ON_POST_MESSAGE);
assertTrue(clickApproveOnDeletePostModalDialog(page, postEntity), DELETED_POST_MESSAGE);
}
Aggregations