use of com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage in project selenium-tests by Wikia.
the class LockingPostTests method staffUserOnMobileCanAddReplyUnderUnlockedPostOnPostDetailsPage.
@Test(groups = { "discussions-locking-posts-mobile", "discussions-staffUserMobileLocking" })
@Execute(asUser = User.STAFF)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void staffUserOnMobileCanAddReplyUnderUnlockedPostOnPostDetailsPage() {
PostEntity.Data data = DiscussionsOperations.using(User.USER, driver).createPostWithUniqueData();
DiscussionsOperations.using(User.DISCUSSIONS_ADMINISTRATOR, 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.STAFF.name(), User.DISCUSSIONS_ADMINISTRATOR.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 staffUserOnDesktopCanAddReplyUnderUnlockedPostOnPostDetailsPage.
@Test(groups = { "discussions-locking-posts-desktop", "discussions-staffUserDesktopLocking" })
@Execute(asUser = User.STAFF)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void staffUserOnDesktopCanAddReplyUnderUnlockedPostOnPostDetailsPage() {
PostEntity.Data data = DiscussionsOperations.using(User.USER, driver).createPostWithUniqueData();
DiscussionsOperations.using(User.DISCUSSIONS_ADMINISTRATOR, 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.STAFF.name(), User.DISCUSSIONS_ADMINISTRATOR.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 lockPostAsDiscussionsModeratorAndOpenPostDetailsPage.
private PostDetailsPage lockPostAsDiscussionsModeratorAndOpenPostDetailsPage() {
PostEntity.Data data = DiscussionsOperations.using(User.USER, driver).createPostWithUniqueData();
DiscussionsOperations.using(User.DISCUSSIONS_MODERATOR, 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 openPageWithPostLockedByDiscussionsModerator.
private PostDetailsPage openPageWithPostLockedByDiscussionsModerator() {
PostEntity.Data data = DiscussionsOperations.using(User.USER, driver).createPostWithUniqueData();
DiscussionsOperations.using(User.DISCUSSIONS_ADMINISTRATOR, 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 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;
}
Aggregations