Search in sources :

Example 26 with PostEntity

use of com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity in project selenium-tests by Wikia.

the class LockingPostTests method staffUserOnDesktopCanLockPostOnPostDetailsPage.

// Staff user on desktop
@Test(groups = { "discussions-locking-posts-desktop", "discussions-staffUserDesktopLocking" })
@Execute(asUser = User.STAFF)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void staffUserOnDesktopCanLockPostOnPostDetailsPage() {
    PostEntity.Data data = DiscussionsOperations.using(User.USER, driver).createPostWithUniqueData();
    PostEntity postEntity = lockPost(data);
    Assertion.assertTrue(postEntity.isLocked(), String.format(SHOULD_LOCK_MESSAGE, User.STAFF.name()));
}
Also used : PostEntity(com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Example 27 with PostEntity

use of com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity in project selenium-tests by Wikia.

the class LockingPostTests method discussionsAdministratorOnMobileCanLockPostOnPostDetailsPage.

// Discussions Administrator on mobile
@Test(groups = { "discussions-locking-posts-mobile", "discussions-discussionsAdministratorMobileLocking" })
@Execute(asUser = User.DISCUSSIONS_ADMINISTRATOR)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void discussionsAdministratorOnMobileCanLockPostOnPostDetailsPage() {
    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()));
}
Also used : PostEntity(com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Example 28 with PostEntity

use of com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity in project selenium-tests by Wikia.

the class LockingPostTests method discussionsModeratorOnMobileCanLockPostOnPostDetailsPage.

// Discussions moderator on mobile
@Test(groups = { "discussions-locking-posts-mobile", "discussions-discussionsModeratorMobileLocking" })
@Execute(asUser = User.DISCUSSIONS_MODERATOR)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void discussionsModeratorOnMobileCanLockPostOnPostDetailsPage() {
    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()));
}
Also used : PostEntity(com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Example 29 with PostEntity

use of com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity in project selenium-tests by Wikia.

the class LockingPostTests method staffUserOnMobileCanLockPostOnPostDetailsPage.

// Staff user on mobile
@Test(groups = { "discussions-locking-posts-mobile", "discussions-staffUserMobileLocking" })
@Execute(asUser = User.STAFF)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void staffUserOnMobileCanLockPostOnPostDetailsPage() {
    PostEntity.Data data = DiscussionsOperations.using(User.USER, driver).createPostWithUniqueData();
    PostEntity postEntity = lockPost(data);
    Assertion.assertTrue(postEntity.isLocked(), String.format(SHOULD_LOCK_MESSAGE, User.STAFF.name()));
}
Also used : PostEntity(com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Example 30 with PostEntity

use of com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity in project selenium-tests by Wikia.

the class LockingPostTests method discussionsAdministratorOnMobileCanUnlockPostLockedByDiscussionsAdministratorOnPostDetailsPage.

@Test(groups = { "discussions-locking-posts-mobile", "discussions-discussionsAdministratorMobileLocking" })
@Execute(asUser = User.DISCUSSIONS_ADMINISTRATOR)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void discussionsAdministratorOnMobileCanUnlockPostLockedByDiscussionsAdministratorOnPostDetailsPage() {
    PostEntity postEntity = unlockPostLockedByDiscussionsAdministrator();
    final String name = User.DISCUSSIONS_ADMINISTRATOR.name();
    Assertion.assertFalse(postEntity.isLocked(), String.format(SHOULD_UNLOCK_MESSAGE, name, name));
}
Also used : PostEntity(com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Aggregations

PostEntity (com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity)52 Execute (com.wikia.webdriver.common.core.annotations.Execute)36 InBrowser (com.wikia.webdriver.common.core.annotations.InBrowser)36 Test (org.testng.annotations.Test)36 PostDetailsPage (com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage)14 PostsListPage (com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage)9 UserPostsPage (com.wikia.webdriver.elements.mercury.pages.discussions.UserPostsPage)9 PageWithPosts (com.wikia.webdriver.elements.mercury.pages.discussions.PageWithPosts)3 ReportedPostsAndRepliesPage (com.wikia.webdriver.elements.mercury.pages.discussions.ReportedPostsAndRepliesPage)2