use of com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage in project selenium-tests by Wikia.
the class LockingPostTests method staffUserOnMobileCanNotAddReplyUnderLockedPostOnPostDetailsPage.
@Test(groups = { "discussions-locking-posts-mobile", "discussions-staffUserMobileLocking" })
@Execute(asUser = User.STAFF)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void staffUserOnMobileCanNotAddReplyUnderLockedPostOnPostDetailsPage() {
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.getReplyCreatorMobile().isPresent(), message);
}
use of com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage in project selenium-tests by Wikia.
the class CreatingReplyTests method replyEditorExpandsForUserOnDesktopOnPostDetailsPage.
// User on desktop
@Test(groups = DESKTOP)
@Execute(asUser = User.USER_2)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void replyEditorExpandsForUserOnDesktopOnPostDetailsPage() {
final PostDetailsPage page = new PostDetailsPage().open(createPostAsUserRemotely().getId());
final ReplyCreator replyCreator = page.getReplyCreatorDesktop();
final int originalEditorHeight = replyCreator.getEditorHeight();
replyCreator.click().clickGuidelinesReadButton();
int expandedEditorHeight = replyCreator.getEditorHeight();
Assertion.assertTrue(expandedEditorHeight > originalEditorHeight, "Reply editor should expand.");
Assertion.assertFalse(replyCreator.isSubmitButtonActive(), SUBMIT_BUTTON_INACTIVE_MESSAGE);
}
use of com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage in project selenium-tests by Wikia.
the class CreatingReplyTests method anonUserOnDesktopCanNotWriteNewReply.
// Anonymous on desktop
@Test(groups = DESKTOP)
@Execute(asUser = User.ANONYMOUS)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void anonUserOnDesktopCanNotWriteNewReply() {
final PostDetailsPage page = new PostDetailsPage().open(createPostAsUserRemotely().getId());
userOnDesktopMustBeLoggedInToUseReplyCreator(page.getReplyCreatorDesktop());
}
use of com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage in project selenium-tests by Wikia.
the class CreatingReplyTests method userOnMobileCanCreateReplyOnPostDetailsPage.
// User on mobile
@Test(groups = MOBILE)
@Execute(asUser = User.USER_2, onWikia = MercuryWikis.DISCUSSIONS_2)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void userOnMobileCanCreateReplyOnPostDetailsPage() {
final PostDetailsPage page = new PostDetailsPage().open(createPostAsUserRemotely().getId());
final ReplyCreator replyCreator = page.getReplyCreatorMobile();
assertThatUserCanCreateReply(page, replyCreator);
}
use of com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage in project selenium-tests by Wikia.
the class LockingPostTests method discussionsModeratorOnMobileCanAddReplyUnderUnlockedPostOnPostDetailsPage.
@Test(groups = { "discussions-locking-posts-mobile", "discussions-discussionsModeratorMobileLocking" })
@Execute(asUser = User.DISCUSSIONS_MODERATOR)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void discussionsModeratorOnMobileCanAddReplyUnderUnlockedPostOnPostDetailsPage() {
final PostDetailsPage page = openPageWithPostUnlockedByStaff();
final String text = addReplyOnMobile(page);
final boolean actual = isReplyNotPresent(page, text);
final String message = String.format(SHOULD_ADD_REPLY_MESSAGE, User.DISCUSSIONS_MODERATOR.name(), User.STAFF.name());
Assertion.assertFalse(actual, message);
}
Aggregations