use of com.wikia.webdriver.common.core.annotations.InBrowser in project selenium-tests by Wikia.
the class EditingPostTests method userOnDesktopCanSeeThatPostWasEditedByAdministratorOnPostDetailsPage.
// User on desktop
@Test(groups = USER_DESKTOP_TEST_GROUP)
@Execute(asUser = User.USER)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void userOnDesktopCanSeeThatPostWasEditedByAdministratorOnPostDetailsPage() {
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.common.core.annotations.InBrowser 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.common.core.annotations.InBrowser in project selenium-tests by Wikia.
the class LockingPostTests method userOnDesktopCanNotLockAPostOnUserPostsPage.
@Test(groups = { "discussions-locking-posts-desktop", "discussions-userDesktopLocking" })
@Execute(asUser = User.USER_2)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void userOnDesktopCanNotLockAPostOnUserPostsPage() {
final MoreOptionsPopOver moreOptionsPopOver = findMoreOptionsOnUserPostsPage();
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 discussionsAdministratorOnDesktopCanLockPostOnPostDetailsPage.
// Discussions Administrator on desktop
@Test(groups = { "discussions-locking-posts-desktop", "discussions-discussionsAdministratorDesktopLocking" })
@Execute(asUser = User.DISCUSSIONS_ADMINISTRATOR)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void discussionsAdministratorOnDesktopCanLockPostOnPostDetailsPage() {
PostEntity.Data data = DiscussionsOperations.using(User.USER, driver).createPostWithUniqueData();
PostEntity postEntity = lockPost(data);
Assertion.assertTrue(postEntity.isLocked(), String.format(SHOULD_LOCK_MESSAGE, User.DISCUSSIONS_ADMINISTRATOR.name()));
}
use of com.wikia.webdriver.common.core.annotations.InBrowser in project selenium-tests by Wikia.
the class LockingPostTests method anonymousUserOnDesktopCanNotLockAPostOnPostsListPage.
@Test(groups = { "discussions-locking-posts-desktop", "discussions-anonymousUserDesktopLocking" })
@Execute(asUser = User.ANONYMOUS)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void anonymousUserOnDesktopCanNotLockAPostOnPostsListPage() {
final MoreOptionsPopOver moreOptionsPopOver = findMoreOptionsOnPostsListPage();
Assertion.assertFalse(moreOptionsPopOver.hasLockPostOption(), String.format(SHOULD_NOT_LOCK_MESSAGE, User.ANONYMOUS.name()));
}
Aggregations