Search in sources :

Example 1 with PostActionsRow

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

the class CreatingReplyTests method assertThatPostIsFollowedWhenReplyAdded.

private void assertThatPostIsFollowedWhenReplyAdded(PostDetailsPage page, ReplyCreator replyCreator) {
    final String text = TextGenerator.createUniqueText();
    replyCreator.click().clickGuidelinesReadButton().add(text).clickSubmitButton();
    page.getReplies().waitForReplyToAppearWith(text);
    final PostActionsRow postActions = page.getPost().findNewestPost().findPostActions();
    Assertion.assertTrue(postActions.isFollowed(), POST_FOLLOWED_BY_DEFAULT);
}
Also used : PostActionsRow(com.wikia.webdriver.elements.mercury.components.discussions.common.PostActionsRow)

Example 2 with PostActionsRow

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

the class CreatingReplyTests method assertThatPostCanBeUnfollowed.

private void assertThatPostCanBeUnfollowed(PostDetailsPage page) {
    final PostActionsRow postActions = page.getPost().findNewestPost().findPostActions();
    postActions.clickFollow();
    Assertion.assertFalse(postActions.isFollowed(), SHOULD_UNFOLLOW_MESSAGE);
}
Also used : PostActionsRow(com.wikia.webdriver.elements.mercury.components.discussions.common.PostActionsRow)

Example 3 with PostActionsRow

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

the class FollowingPostTests method assertThatPostCanBeFollowedOn.

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

Example 4 with PostActionsRow

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

the class FollowingPostTests method userOnMobileCanFollowAndUnfollowPostOnFollowedPostsPage.

/**
   * By default all posts on "Followed" tab are followed.
   */
@Test(groups = "discussions-userMobileFollowingPost", enabled = false)
@Execute(asUser = User.USER)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
@RelatedIssue(issueID = "SOC-3674", comment = "Introducing pagination")
public void userOnMobileCanFollowAndUnfollowPostOnFollowedPostsPage() {
    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 5 with PostActionsRow

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

the class FollowingPostTests method discussionsAdministratorOnDesktopCanFollowPostOnReportedPostsPage.

// Discussions Administrator on desktop
@Test(groups = "discussions-discussionsAdministratorDesktopFollowingPost")
@Execute(asUser = User.DISCUSSIONS_ADMINISTRATOR)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void discussionsAdministratorOnDesktopCanFollowPostOnReportedPostsPage() {
    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)

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