use of com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity in project selenium-tests by Wikia.
the class ReportingPostTests method moderatorCanNotSeeApprovedPostOnReportedPostsPage.
private void moderatorCanNotSeeApprovedPostOnReportedPostsPage() {
final PostEntity.Data data = createAndReportPostRemotelyAsFirstUser();
reportPostRemotelyAsSecondUser(data);
validatePostRemotelyAsDiscussionsModerator(data);
final ReportedPostsAndRepliesPage page = new ReportedPostsAndRepliesPage().open();
final PostEntity post = page.getPost().findPostById(data.getId());
assertNull(post, NOT_VISIBLE_DELETED_POST_MESSAGE);
}
use of com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity in project selenium-tests by Wikia.
the class ReportingPostTests method anonUserOnMobileCanNotSeeDeletedPostOnPostsListPage.
@Test(groups = "discussions-anonUserMobileReporting")
@Execute(asUser = User.ANONYMOUS)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void anonUserOnMobileCanNotSeeDeletedPostOnPostsListPage() {
final PostEntity.Data data = createAndReportAndDeletePostRemotely();
final PostsListPage postsListPage = openPostListPageAndWaitUntilLoaded();
final PostEntity post = postsListPage.getPost().findPostById(data.getId());
assertNull(post, ANON_NOT_VISIBLE_DELETED_POST_MESSAGE);
}
use of com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity 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.components.discussions.common.PostEntity in project selenium-tests by Wikia.
the class ReportingPostTests method userOnMobileCanReportApprovedPostOnPostsListPage.
@Test(groups = "discussions-loggedInUsersMobileReporting")
@Execute(asUser = User.USER_3)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void userOnMobileCanReportApprovedPostOnPostsListPage() {
final PostEntity.Data data = createAndReportPostRemotelyAsFirstUser();
reportPostRemotelyAsSecondUser(data);
validatePostRemotelyAsDiscussionsModerator(data);
final PostEntity postEntity = openPostListPageAndWaitUntilLoaded().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.components.discussions.common.PostEntity 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