use of com.wikia.webdriver.common.core.annotations.InBrowser in project selenium-tests by Wikia.
the class LockingPostTests method userOnMobileCanNotLockAPostOnPostsListPage.
@Test(groups = { "discussions-locking-posts-mobile", "discussions-userMobileLocking" })
@Execute(asUser = User.USER_2)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void userOnMobileCanNotLockAPostOnPostsListPage() {
final MoreOptionsPopOver moreOptionsPopOver = findMoreOptionsOnPostsListPage();
Assertion.assertFalse(moreOptionsPopOver.hasLockPostOption(), String.format(SHOULD_NOT_LOCK_MESSAGE, User.USER_2.name()));
}
use of com.wikia.webdriver.common.core.annotations.InBrowser 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);
}
use of com.wikia.webdriver.common.core.annotations.InBrowser 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.common.core.annotations.InBrowser 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.common.core.annotations.InBrowser in project selenium-tests by Wikia.
the class LockingPostTests method userOnMobileCanNotLockAPostOnUserPostsPage.
@Test(groups = { "discussions-locking-posts-mobile", "discussions-userMobileLocking" })
@Execute(asUser = User.USER_2)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void userOnMobileCanNotLockAPostOnUserPostsPage() {
final MoreOptionsPopOver moreOptionsPopOver = findMoreOptionsOnUserPostsPage();
Assertion.assertFalse(moreOptionsPopOver.hasLockPostOption(), String.format(SHOULD_NOT_LOCK_MESSAGE, User.USER_2.name()));
}
Aggregations