Search in sources :

Example 6 with PostActionsRow

use of com.wikia.webdriver.elements.mercury.components.discussions.common.PostActionsRow 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 7 with PostActionsRow

use of com.wikia.webdriver.elements.mercury.components.discussions.common.PostActionsRow 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 8 with PostActionsRow

use of com.wikia.webdriver.elements.mercury.components.discussions.common.PostActionsRow 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 9 with PostActionsRow

use of com.wikia.webdriver.elements.mercury.components.discussions.common.PostActionsRow 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 10 with PostActionsRow

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

the class FollowingPostTests method assertThatPostCanBeUnfollowedOn.

private void assertThatPostCanBeUnfollowedOn(Function<PostEntity.Data, PageWithPosts> navigator) {
    final PostEntity.Data data = createPostAsUserRemotely();
    final PostActionsRow postActions = clickUnfollowOn(navigator.apply(data));
    Assertion.assertFalse(postActions.isFollowed(), SHOULD_UNFOLLOW_POST);
}
Also used : PostActionsRow(com.wikia.webdriver.elements.mercury.components.discussions.common.PostActionsRow) PostEntity(com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity)

Aggregations

PostActionsRow (com.wikia.webdriver.elements.mercury.components.discussions.common.PostActionsRow)10 Execute (com.wikia.webdriver.common.core.annotations.Execute)6 InBrowser (com.wikia.webdriver.common.core.annotations.InBrowser)6 Test (org.testng.annotations.Test)6 PostEntity (com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity)4 ReportedPostsAndRepliesPage (com.wikia.webdriver.elements.mercury.pages.discussions.ReportedPostsAndRepliesPage)4 RelatedIssue (com.wikia.webdriver.common.core.annotations.RelatedIssue)2 FollowPage (com.wikia.webdriver.elements.mercury.pages.discussions.FollowPage)2