use of com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage in project selenium-tests by Wikia.
the class LockingPostTests method openPageWithPostUnlockedByStaff.
private PostDetailsPage openPageWithPostUnlockedByStaff() {
PostEntity.Data data = DiscussionsOperations.using(User.USER, driver).createPostWithUniqueData();
DiscussionsOperations.using(User.STAFF, driver).lockPost(data).unlockPost(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 userOnDesktopCanNotAddReplyUnderLockedPostOnPostDetailsPage.
// User on desktop
@Test(groups = { "discussions-locking-posts-desktop", "discussions-userDesktopLocking" })
@Execute(asUser = User.USER)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void userOnDesktopCanNotAddReplyUnderLockedPostOnPostDetailsPage() {
PostDetailsPage page = lockPostAsDiscussionsModeratorAndOpenPostDetailsPage();
Assertion.assertTrue(page.getPost().findNewestPost().isLocked(), SHOULD_BE_LOCKED_MESSAGE);
final String message = String.format(SHOULD_NOT_ADD_REPLY_MESSAGE, User.USER.name(), User.DISCUSSIONS_MODERATOR.name());
Assertion.assertFalse(page.getReplyCreatorDesktop().isPresent(), message);
}
use of com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage in project selenium-tests by Wikia.
the class LockingPostTests method userOnMobileCanAddReplyUnderUnlockedPostOnPostDetailsPage.
@Test(groups = { "discussions-locking-posts-mobile", "discussions-userMobileLocking" })
@Execute(asUser = User.USER)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void userOnMobileCanAddReplyUnderUnlockedPostOnPostDetailsPage() {
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 = addReplyOnMobile(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 userOnMobileCanNotAddReplyUnderLockedPostOnPostDetailsPage.
// User on mobile
@Test(groups = { "discussions-locking-posts-mobile", "discussions-userMobileLocking" })
@Execute(asUser = User.USER)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void userOnMobileCanNotAddReplyUnderLockedPostOnPostDetailsPage() {
PostDetailsPage page = lockPostAsDiscussionsModeratorAndOpenPostDetailsPage();
Assertion.assertTrue(page.getPost().findNewestPost().isLocked(), SHOULD_BE_LOCKED_MESSAGE);
final String message = String.format(SHOULD_NOT_ADD_REPLY_MESSAGE, User.USER.name(), User.DISCUSSIONS_MODERATOR.name());
Assertion.assertFalse(page.getReplyCreatorMobile().isPresent(), message);
}
use of com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage in project selenium-tests by Wikia.
the class EditingPostTests method userOnDesktopCanNotSeeThatPostWasEditedByAuthorOnPostDetailsPage.
@Test(groups = USER_DESKTOP_TEST_GROUP)
@Execute(asUser = User.USER)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void userOnDesktopCanNotSeeThatPostWasEditedByAuthorOnPostDetailsPage() {
final PostEntity.Data data = updatePostAsStaffRemotely(createPostAsStaffRemotely());
final PostEntity post = new PostDetailsPage().open(data.getId()).getPost().findNewestPost();
Assertion.assertFalse(post.hasEditedBySection(), SAME_PERSON_MESSAGE);
}
Aggregations