Search in sources :

Example 11 with PostEntity

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

the class LockingPostTests method lockPost.

private PostEntity lockPost(final PostEntity.Data data) {
    PostDetailsPage page = new PostDetailsPage().open(data.getId());
    final PostEntity postEntity = page.getPost().findNewestPost();
    postEntity.clickMoreOptions().clickLockPostOption();
    return postEntity;
}
Also used : PostDetailsPage(com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage) PostEntity(com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity)

Example 12 with PostEntity

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

the class LockingPostTests method staffUserOnMobileCanUnlockPostLockedByStaffOnPostDetailsPage.

@Test(groups = { "discussions-locking-posts-mobile", "discussions-staffUserMobileLocking" })
@Execute(asUser = User.STAFF)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void staffUserOnMobileCanUnlockPostLockedByStaffOnPostDetailsPage() {
    PostEntity postEntity = unlockPostLockedByStaff();
    final String name = User.STAFF.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)

Example 13 with PostEntity

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

the class LockingPostTests method staffUserOnDesktopCanUnlockPostLockedByStaffOnPostDetailsPage.

@Test(groups = { "discussions-locking-posts-desktop", "discussions-staffUserDesktopLocking" })
@Execute(asUser = User.STAFF)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void staffUserOnDesktopCanUnlockPostLockedByStaffOnPostDetailsPage() {
    PostEntity postEntity = unlockPostLockedByStaff();
    final String name = User.STAFF.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)

Example 14 with PostEntity

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

the class LockingPostTests method discussionsAdministratorOnDesktopCanUnlockPostLockedByDiscussionsAdministratorOnPostDetailsPage.

@Test(groups = { "discussions-locking-posts-desktop", "discussions-discussionsAdministratorDesktopLocking" })
@Execute(asUser = User.DISCUSSIONS_ADMINISTRATOR)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void discussionsAdministratorOnDesktopCanUnlockPostLockedByDiscussionsAdministratorOnPostDetailsPage() {
    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)

Example 15 with PostEntity

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

the class LockingPostTests method discussionsModeratorOnMobileCanUnlockPostLockedByDiscussionsModeratorOnPostDetailsPage.

@Test(groups = { "discussions-locking-posts-mobile", "discussions-discussionsModeratorMobileLocking" })
@Execute(asUser = User.DISCUSSIONS_MODERATOR)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void discussionsModeratorOnMobileCanUnlockPostLockedByDiscussionsModeratorOnPostDetailsPage() {
    PostEntity postEntity = unlockPostLockedByDiscussionsModerator();
    final String name = User.DISCUSSIONS_MODERATOR.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