use of com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity in project selenium-tests by Wikia.
the class LockingPostTests method unlockPost.
private PostEntity unlockPost(final PostEntity.Data data) {
PostDetailsPage page = new PostDetailsPage().open(data.getId());
final PostEntity postEntity = page.getPost().findNewestPost();
postEntity.clickMoreOptions().clickUnlockPostOption();
return postEntity;
}
use of com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity in project selenium-tests by Wikia.
the class LockingPostTests method discussionsModeratorOnDesktopCanUnlockPostLockedByDiscussionsModeratorOnPostDetailsPage.
@Test(groups = { "discussions-locking-posts-desktop", "discussions-discussionsModeratorDesktopLocking" })
@Execute(asUser = User.DISCUSSIONS_MODERATOR)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void discussionsModeratorOnDesktopCanUnlockPostLockedByDiscussionsModeratorOnPostDetailsPage() {
PostEntity postEntity = unlockPostLockedByDiscussionsModerator();
final String name = User.DISCUSSIONS_MODERATOR.name();
Assertion.assertFalse(postEntity.isLocked(), String.format(SHOULD_UNLOCK_MESSAGE, name, name));
}
use of com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity in project selenium-tests by Wikia.
the class ReportingPostTests method userCannotReReportPostOnPostListPage.
private void userCannotReReportPostOnPostListPage() {
final PostEntity.Data data = createAndReportPostRemotelyAsFirstUser();
validatePostRemotelyAsDiscussionsModerator(data);
final PostsListPage page = openPostListPageAndWaitUntilLoaded();
final PostEntity postEntity = page.getPost().findPostById(data.getId());
assertFalse(postEntity.isReported(), NO_REPORTED_INDICATOR_ON_POST_MESSAGE);
assertFalse(isReportPostOptionAvailableFor(postEntity), NO_REPORT_POST_OPTION_MESSAGE);
}
use of com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity in project selenium-tests by Wikia.
the class ReportingPostTests method userOnMobileCanReportPostOnPostsListPage.
// User on mobile
@Test(groups = "discussions-loggedInUsersMobileReporting")
@Execute(asUser = User.USER)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void userOnMobileCanReportPostOnPostsListPage() {
final PostEntity.Data data = cretePostRemotelyAsFirstUser();
final PostsListPage page = openPostListPageAndWaitUntilLoaded();
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 anonUserOnDesktopCanNotSeeDeletedPostOnUserPostsPage.
@Test(groups = "discussions-anonUserDesktopReporting")
@Execute(asUser = User.ANONYMOUS)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void anonUserOnDesktopCanNotSeeDeletedPostOnUserPostsPage() {
final PostEntity.Data data = createAndReportAndDeletePostRemotely();
UserPostsPage page = openUserPostsAndWaitUntilLoaded(data.getAuthorId());
PostEntity post = page.getPost().findPostById(data.getId());
assertNull(post, ANON_NOT_VISIBLE_DELETED_POST_MESSAGE);
}
Aggregations