Search in sources :

Example 91 with InBrowser

use of com.wikia.webdriver.common.core.annotations.InBrowser in project selenium-tests by Wikia.

the class FollowingPostTests method discussionsAdministratorOnMobileCanUnfollowPostOnReportedListPage.

/**
   * Post created by user is automatically followed.
   */
@Test(groups = "discussions-discussionsAdministratorMobileFollowingPost")
@Execute(asUser = User.DISCUSSIONS_ADMINISTRATOR)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void discussionsAdministratorOnMobileCanUnfollowPostOnReportedListPage() {
    final PostEntity.Data data = DiscussionsOperations.using(User.DISCUSSIONS_ADMINISTRATOR, driver).createPostWithUniqueData();
    DiscussionsOperations.using(User.USER, driver).reportPost(data);
    final PostActionsRow postActions = clickUnfollowOn(new ReportedPostsAndRepliesPage().open());
    Assertion.assertFalse(postActions.isFollowed(), SHOULD_UNFOLLOW_POST);
}
Also used : PostActionsRow(com.wikia.webdriver.elements.mercury.components.discussions.common.PostActionsRow) ReportedPostsAndRepliesPage(com.wikia.webdriver.elements.mercury.pages.discussions.ReportedPostsAndRepliesPage) 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 92 with InBrowser

use of com.wikia.webdriver.common.core.annotations.InBrowser in project selenium-tests by Wikia.

the class FollowingPostTests method userOnDesktopCanFollowAndUnfollowPostOnFollowedPostsPage.

/**
   * By default all posts on "Followed" tab are followed.
   */
@Test(groups = "discussions-userDesktopFollowingPost", enabled = false)
@Execute(asUser = User.USER)
@InBrowser(browser = Browser.FIREFOX, emulator = Emulator.GOOGLE_NEXUS_5)
@RelatedIssue(issueID = "SOC-3674", comment = "Introducing pagination")
public void userOnDesktopCanFollowAndUnfollowPostOnFollowedPostsPage() {
    createPostAsUserRemotely();
    final FollowPage page = FollowPage.open();
    final PostActionsRow postActions = clickUnfollowOn(page);
    Assertion.assertFalse(postActions.isFollowed(), SHOULD_UNFOLLOW_POST);
    clickFollowOn(page);
    Assertion.assertTrue(postActions.isFollowed(), SHOULD_FOLLOW_POST);
}
Also used : PostActionsRow(com.wikia.webdriver.elements.mercury.components.discussions.common.PostActionsRow) FollowPage(com.wikia.webdriver.elements.mercury.pages.discussions.FollowPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) RelatedIssue(com.wikia.webdriver.common.core.annotations.RelatedIssue) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Example 93 with InBrowser

use of com.wikia.webdriver.common.core.annotations.InBrowser in project selenium-tests by Wikia.

the class FollowingPostTests method discussionsAdministratorOnDesktopCanUnfollowPostOnReportedListPage.

/**
   * Post created by user is automatically followed.
   */
@Test(groups = "discussions-discussionsAdministratorDesktopFollowingPost")
@Execute(asUser = User.DISCUSSIONS_ADMINISTRATOR)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void discussionsAdministratorOnDesktopCanUnfollowPostOnReportedListPage() {
    final PostEntity.Data data = DiscussionsOperations.using(User.DISCUSSIONS_ADMINISTRATOR, driver).createPostWithUniqueData();
    DiscussionsOperations.using(User.USER, driver).reportPost(data);
    final PostActionsRow postActions = clickUnfollowOn(new ReportedPostsAndRepliesPage().open());
    Assertion.assertFalse(postActions.isFollowed(), SHOULD_UNFOLLOW_POST);
}
Also used : PostActionsRow(com.wikia.webdriver.elements.mercury.components.discussions.common.PostActionsRow) ReportedPostsAndRepliesPage(com.wikia.webdriver.elements.mercury.pages.discussions.ReportedPostsAndRepliesPage) 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 94 with InBrowser

use of com.wikia.webdriver.common.core.annotations.InBrowser in project selenium-tests by Wikia.

the class FollowingPostTests method discussionsAdministratorOnMobileCanFollowPostOnReportedPostsPage.

// Discussions Administrator on mobile
@Test(groups = "discussions-discussionsAdministratorMobileFollowingPost")
@Execute(asUser = User.DISCUSSIONS_ADMINISTRATOR)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void discussionsAdministratorOnMobileCanFollowPostOnReportedPostsPage() {
    createAndReportPostAsUserRemotely();
    final PostActionsRow postActions = clickFollowOn(new ReportedPostsAndRepliesPage().open());
    Assertion.assertTrue(postActions.isFollowed(), SHOULD_FOLLOW_POST);
}
Also used : PostActionsRow(com.wikia.webdriver.elements.mercury.components.discussions.common.PostActionsRow) ReportedPostsAndRepliesPage(com.wikia.webdriver.elements.mercury.pages.discussions.ReportedPostsAndRepliesPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Example 95 with InBrowser

use of com.wikia.webdriver.common.core.annotations.InBrowser 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);
}
Also used : PostDetailsPage(com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Aggregations

InBrowser (com.wikia.webdriver.common.core.annotations.InBrowser)184 Test (org.testng.annotations.Test)180 Execute (com.wikia.webdriver.common.core.annotations.Execute)146 PostEntity (com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity)50 PostDetailsPage (com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage)35 PostsListPage (com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage)26 GuidelinesPage (com.wikia.webdriver.elements.mercury.pages.discussions.GuidelinesPage)17 AdsBaseObject (com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject)15 NetworkTrafficDump (com.wikia.webdriver.common.core.annotations.NetworkTrafficDump)13 MoreOptionsPopOver (com.wikia.webdriver.elements.mercury.components.discussions.common.MoreOptionsPopOver)12 SearchResultsPage (com.wikia.webdriver.elements.mercury.pages.SearchResultsPage)12 LightboxComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.lightbox.LightboxComponentObject)12 VideoFanTakeover (com.wikia.webdriver.pageobjectsfactory.componentobject.ad.VideoFanTakeover)11 CategoriesFieldset (com.wikia.webdriver.elements.mercury.components.discussions.common.category.CategoriesFieldset)10 UserPostsPage (com.wikia.webdriver.elements.mercury.pages.discussions.UserPostsPage)10 AdsFandomObject (com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsFandomObject)9 RelatedIssue (com.wikia.webdriver.common.core.annotations.RelatedIssue)7 CategoryPill (com.wikia.webdriver.elements.mercury.components.discussions.common.category.CategoryPill)7 PostActionsRow (com.wikia.webdriver.elements.mercury.components.discussions.common.PostActionsRow)6 ReplyCreator (com.wikia.webdriver.elements.mercury.components.discussions.common.ReplyCreator)5