Search in sources :

Example 1 with ReportedPostsAndRepliesPage

use of com.wikia.webdriver.elements.mercury.pages.discussions.ReportedPostsAndRepliesPage in project selenium-tests by Wikia.

the class ZeroErrorStateTests method userSeesProperMessageWhenOpensEmptyReportedPostsPage.

private void userSeesProperMessageWhenOpensEmptyReportedPostsPage() {
    ErrorMessages errorMessage = new ReportedPostsAndRepliesPage().open().getErrorMessages();
    Assertion.assertTrue(errorMessage.isErrorMessagePresent());
    Assertion.assertEquals(errorMessage.getErrorMessageText(), "There are no reported posts or replies.\n" + MESSAGE_2);
}
Also used : ErrorMessages(com.wikia.webdriver.elements.mercury.components.discussions.common.ErrorMessages) ReportedPostsAndRepliesPage(com.wikia.webdriver.elements.mercury.pages.discussions.ReportedPostsAndRepliesPage)

Example 2 with ReportedPostsAndRepliesPage

use of com.wikia.webdriver.elements.mercury.pages.discussions.ReportedPostsAndRepliesPage 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)

Example 3 with ReportedPostsAndRepliesPage

use of com.wikia.webdriver.elements.mercury.pages.discussions.ReportedPostsAndRepliesPage 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 4 with ReportedPostsAndRepliesPage

use of com.wikia.webdriver.elements.mercury.pages.discussions.ReportedPostsAndRepliesPage 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 5 with ReportedPostsAndRepliesPage

use of com.wikia.webdriver.elements.mercury.pages.discussions.ReportedPostsAndRepliesPage 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)

Aggregations

ReportedPostsAndRepliesPage (com.wikia.webdriver.elements.mercury.pages.discussions.ReportedPostsAndRepliesPage)7 Execute (com.wikia.webdriver.common.core.annotations.Execute)4 InBrowser (com.wikia.webdriver.common.core.annotations.InBrowser)4 PostActionsRow (com.wikia.webdriver.elements.mercury.components.discussions.common.PostActionsRow)4 PostEntity (com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity)4 Test (org.testng.annotations.Test)4 ErrorMessages (com.wikia.webdriver.elements.mercury.components.discussions.common.ErrorMessages)1