Search in sources :

Example 46 with PostEntity

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

the class ReportingPostTests method moderatorCanNotSeeApprovedPostOnReportedPostsPage.

private void moderatorCanNotSeeApprovedPostOnReportedPostsPage() {
    final PostEntity.Data data = createAndReportPostRemotelyAsFirstUser();
    reportPostRemotelyAsSecondUser(data);
    validatePostRemotelyAsDiscussionsModerator(data);
    final ReportedPostsAndRepliesPage page = new ReportedPostsAndRepliesPage().open();
    final PostEntity post = page.getPost().findPostById(data.getId());
    assertNull(post, NOT_VISIBLE_DELETED_POST_MESSAGE);
}
Also used : ReportedPostsAndRepliesPage(com.wikia.webdriver.elements.mercury.pages.discussions.ReportedPostsAndRepliesPage) PostEntity(com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity)

Example 47 with PostEntity

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

the class ReportingPostTests method anonUserOnMobileCanNotSeeDeletedPostOnPostsListPage.

@Test(groups = "discussions-anonUserMobileReporting")
@Execute(asUser = User.ANONYMOUS)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void anonUserOnMobileCanNotSeeDeletedPostOnPostsListPage() {
    final PostEntity.Data data = createAndReportAndDeletePostRemotely();
    final PostsListPage postsListPage = openPostListPageAndWaitUntilLoaded();
    final PostEntity post = postsListPage.getPost().findPostById(data.getId());
    assertNull(post, ANON_NOT_VISIBLE_DELETED_POST_MESSAGE);
}
Also used : PostsListPage(com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage) 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 48 with PostEntity

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

the class ReportingPostTests method userCanReportApprovedPostOnPostDetailsPage.

private void userCanReportApprovedPostOnPostDetailsPage() {
    final PostEntity.Data data = createAndReportPostRemotelyAsFirstUser();
    reportPostRemotelyAsSecondUser(data);
    validatePostRemotelyAsDiscussionsModerator(data);
    final PostDetailsPage page = openPostDetailsPageAndWaitUntilLoaded(data.getId());
    final PostEntity postEntity = page.getPost().findPostById(data.getId());
    assertFalse(postEntity.isReported(), REPORTED_INDICATOR_NOT_VISIBLE_FOR_USER_MESSAGE);
    assertTrue(postCanBeReported(postEntity), CAN_REPORT_POST_MESSAGE);
}
Also used : PostDetailsPage(com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage) PostEntity(com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity)

Example 49 with PostEntity

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

the class ReportingPostTests method userOnMobileCanReportApprovedPostOnPostsListPage.

@Test(groups = "discussions-loggedInUsersMobileReporting")
@Execute(asUser = User.USER_3)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void userOnMobileCanReportApprovedPostOnPostsListPage() {
    final PostEntity.Data data = createAndReportPostRemotelyAsFirstUser();
    reportPostRemotelyAsSecondUser(data);
    validatePostRemotelyAsDiscussionsModerator(data);
    final PostEntity postEntity = openPostListPageAndWaitUntilLoaded().getPost().findPostById(data.getId());
    assertFalse(postEntity.isReported(), REPORTED_INDICATOR_NOT_VISIBLE_FOR_USER_MESSAGE);
    assertTrue(postCanBeReported(postEntity), CAN_REPORT_POST_MESSAGE);
}
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 50 with PostEntity

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

the class ReportingPostTests method moderatorCanDeleteReportedPostOnPostDetailsPage.

private void moderatorCanDeleteReportedPostOnPostDetailsPage() {
    final PostEntity.Data data = createAndReportPostRemotelyAsFirstUser();
    reportPostRemotelyAsSecondUser(data);
    validatePostRemotelyAsDiscussionsModerator(data);
    reportPostRemotelyAsThirdUser(data);
    final PostDetailsPage page = openPostDetailsPageAndWaitUntilLoaded(data.getId());
    final PostEntity postEntity = page.getPost().findPostById(data.getId());
    assertTrue(isReported(postEntity), REPORTED_INDICATOR_ON_POST_MESSAGE);
    assertTrue(clickCancelOnDeletePostModalDialog(page, postEntity), REPORTED_INDICATOR_ON_POST_MESSAGE);
    assertTrue(clickApproveOnDeletePostModalDialog(page, postEntity), DELETED_POST_MESSAGE);
}
Also used : PostDetailsPage(com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage) PostEntity(com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity)

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