use of com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage in project selenium-tests by Wikia.
the class EditingPostTests method userOnMobileCanSeeThatPostWasEditedByAdministratorOnPostDetailsPage.
// User on mobile
@Test(groups = USER_MOBILE_TEST_GROUP)
@Execute(asUser = User.USER)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void userOnMobileCanSeeThatPostWasEditedByAdministratorOnPostDetailsPage() {
final PostEntity.Data data = updatePostAsStaffRemotely(createPostAsUserRemotely());
final PostEntity post = new PostDetailsPage().open(data.getId()).getPost().findNewestPost();
Assertion.assertTrue(post.hasEditedBySection(), SHOULD_HAVE_EDITED_BY_SECTION_MESSAGE);
Assertion.assertEquals(post.getEditedBySectionText(), EDITED_BY_ADMINISTRATORS, EDITED_BY_ADMINISTRATORS_MESSAGE);
}
use of com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage in project selenium-tests by Wikia.
the class LockingPostTests method findMoreOptionsOnPostDetailsPage.
private MoreOptionsPopOver findMoreOptionsOnPostDetailsPage() {
final PostEntity.Data data = DiscussionsOperations.using(User.USER, driver).createPostWithUniqueData();
final PageWithPosts page = new PostDetailsPage().open(data.getId());
return findMoreOptions(page);
}
use of com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage in project selenium-tests by Wikia.
the class LockingPostTests method userOnDesktopCanAddReplyUnderUnlockedPostOnPostDetailsPage.
@Test(groups = { "discussions-locking-posts-desktop", "discussions-userDesktopLocking" })
@Execute(asUser = User.USER)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void userOnDesktopCanAddReplyUnderUnlockedPostOnPostDetailsPage() {
PostEntity.Data data = DiscussionsOperations.using(User.USER, driver).createPostWithUniqueData();
DiscussionsOperations.using(User.DISCUSSIONS_MODERATOR, driver).lockPost(data).unlockPost(data);
PostDetailsPage page = new PostDetailsPage().open(data.getId());
final String text = addReplyOnDesktop(page);
boolean actual = isReplyNotPresent(page, text);
final String message = String.format(SHOULD_ADD_REPLY_MESSAGE, User.USER.name(), User.DISCUSSIONS_MODERATOR.name());
Assertion.assertFalse(actual, message);
}
use of com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage in project selenium-tests by Wikia.
the class LockingPostTests method openPageWithPostLockedByStaff.
private PostDetailsPage openPageWithPostLockedByStaff() {
PostEntity.Data data = DiscussionsOperations.using(User.USER, driver).createPostWithUniqueData();
DiscussionsOperations.using(User.STAFF, driver).lockPost(data);
return new PostDetailsPage().open(data.getId());
}
use of com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage in project selenium-tests by Wikia.
the class LockingPostTests method staffUserOnDesktopCanNotAddReplyUnderLockedPostOnPostDetailsPage.
@Test(groups = { "discussions-locking-posts-desktop", "discussions-staffUserDesktopLocking" })
@Execute(asUser = User.STAFF)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void staffUserOnDesktopCanNotAddReplyUnderLockedPostOnPostDetailsPage() {
PostDetailsPage page = openPageWithPostLockedByDiscussionsModerator();
Assertion.assertTrue(page.getPost().findNewestPost().isLocked(), SHOULD_BE_LOCKED_MESSAGE);
final String message = String.format(SHOULD_NOT_ADD_REPLY_MESSAGE, User.STAFF.name(), User.DISCUSSIONS_ADMINISTRATOR.name());
Assertion.assertFalse(page.getReplyCreatorDesktop().isPresent(), message);
}
Aggregations