Search in sources :

Example 41 with PostEntity

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

the class ReportingPostTests method moderatorCanSeeReportedPostOnPostListPage.

private void moderatorCanSeeReportedPostOnPostListPage() {
    final PostEntity.Data data = createAndReportPostRemotelyAsFirstUser();
    reportPostRemotelyAsSecondUser(data);
    final PostsListPage postsListPage = openPostListPageAndWaitUntilLoaded();
    final PostEntity postEntity = postsListPage.getPost().findPostById(data.getId());
    assertTrue(postEntity.isReported(), REPORTED_INDICATOR_NOT_VISIBLE_FOR_USER_MESSAGE);
}
Also used : PostsListPage(com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage) PostEntity(com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity)

Example 42 with PostEntity

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

the class ReportingPostTests method moderatorCanSeeReReportedPostOnReportedPostsPage.

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

Example 43 with PostEntity

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

the class ReportingPostTests method userCannotSeeReportedIndicatorOnPostsReportedByAnotherUserOnPostDetailsPageAndCanReportThatPost.

private void userCannotSeeReportedIndicatorOnPostsReportedByAnotherUserOnPostDetailsPageAndCanReportThatPost() {
    final PostEntity.Data data = createAndReportPostRemotelyAsFirstUser();
    final PageWithPosts 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 : PageWithPosts(com.wikia.webdriver.elements.mercury.pages.discussions.PageWithPosts) PostEntity(com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity)

Example 44 with PostEntity

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

the class ReportingPostTests method userOnMobileCanNotSeeDeletedPostOnUserPostsPage.

@Test(groups = "discussions-loggedInUsersMobileReporting")
@Execute(asUser = User.USER)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void userOnMobileCanNotSeeDeletedPostOnUserPostsPage() {
    final PostEntity.Data data = createAndReportAndDeletePostRemotely();
    final UserPostsPage page = openUserPostsAndWaitUntilLoaded(data.getAuthorId());
    final PostEntity post = page.getPost().findPostById(data.getId());
    assertNull(post, NOT_VISIBLE_DELETED_POST_MESSAGE);
}
Also used : UserPostsPage(com.wikia.webdriver.elements.mercury.pages.discussions.UserPostsPage) 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 45 with PostEntity

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

the class ReportingPostTests method moderatorCanApproveReportedPostOnPostDetailsPage.

private void moderatorCanApproveReportedPostOnPostDetailsPage() {
    PostEntity.Data data = createAndReportPostRemotelyAsFirstUser();
    reportPostRemotelyAsSecondUser(data);
    final PostDetailsPage page = openPostDetailsPageAndWaitUntilLoaded(data.getId());
    final PostEntity postEntity = page.getPost().findPostById(data.getId());
    assertTrue(isReported(postEntity), REPORTED_INDICATOR_ON_POST_MESSAGE);
    assertTrue(clickCancelOnValidatePostModalDialog(page, postEntity), REPORTED_INDICATOR_ON_POST_MESSAGE);
    assertFalse(clickApproveOnValidatePostModalDialog(page, postEntity), NO_REPORTED_INDICATOR_ON_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