use of com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity in project selenium-tests by Wikia.
the class ReportingPostTests method userCanReportApprovedPostOnUserPostsPage.
private void userCanReportApprovedPostOnUserPostsPage() {
final PostEntity.Data data = createAndReportPostRemotelyAsFirstUser();
reportPostRemotelyAsSecondUser(data);
validatePostRemotelyAsDiscussionsModerator(data);
final UserPostsPage page = openUserPostsAndWaitUntilLoaded(data.getAuthorId());
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 userOnMobileCanReportPostOnUserPostsPage.
@Test(groups = "discussions-loggedInUsersMobileReporting")
@Execute(asUser = User.USER)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void userOnMobileCanReportPostOnUserPostsPage() {
final PostEntity.Data data = cretePostRemotelyAsFirstUser();
final UserPostsPage page = openUserPostsAndWaitUntilLoaded(data.getAuthorId());
final PostEntity postEntity = page.getPost().findPostById(data.getId());
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 userCannotSeeReportedIndicatorOnPostsReportedByAnotherUserOnPostsListPageAndCanReportThatPost.
private void userCannotSeeReportedIndicatorOnPostsReportedByAnotherUserOnPostsListPageAndCanReportThatPost() {
final PostEntity.Data data = createAndReportPostRemotelyAsFirstUser();
final PageWithPosts page = openPostListPageAndWaitUntilLoaded();
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 userOnDesktopCanReportPostOnUserPostsPage.
@Test(groups = "discussions-loggedInUsersDesktopReporting")
@Execute(asUser = User.USER)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void userOnDesktopCanReportPostOnUserPostsPage() {
final PostEntity.Data data = cretePostRemotelyAsFirstUser();
final UserPostsPage page = openUserPostsAndWaitUntilLoaded(data.getAuthorId());
final PostEntity postEntity = page.getPost().findPostById(data.getId());
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 userOnDesktopCanNotSeeDeletedPostOnUserPostsPage.
@Test(groups = "discussions-loggedInUsersDesktopReporting")
@Execute(asUser = User.USER)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void userOnDesktopCanNotSeeDeletedPostOnUserPostsPage() {
final PostEntity.Data data = createAndReportAndDeletePostRemotely();
final UserPostsPage userPostsPage = openUserPostsAndWaitUntilLoaded(data.getAuthorId());
final PostEntity post = userPostsPage.getPost().findPostById(data.getId());
assertNull(post, NOT_VISIBLE_DELETED_POST_MESSAGE);
}
Aggregations