Search in sources :

Example 6 with UserPostsPage

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

the class ReportingPostTests method userCannotReReportPostOnUserPostPage.

private void userCannotReReportPostOnUserPostPage() {
    final PostEntity.Data data = createAndReportPostRemotelyAsFirstUser();
    validatePostRemotelyAsDiscussionsModerator(data);
    final UserPostsPage userPostsPage = openUserPostsAndWaitUntilLoaded(data.getAuthorId());
    final PostEntity postEntity = userPostsPage.getPost().findPostById(data.getId());
    assertFalse(postEntity.isReported(), NO_REPORTED_INDICATOR_ON_POST_MESSAGE);
    assertFalse(isReportPostOptionAvailableFor(postEntity), NO_REPORT_POST_OPTION_MESSAGE);
}
Also used : UserPostsPage(com.wikia.webdriver.elements.mercury.pages.discussions.UserPostsPage) PostEntity(com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity)

Example 7 with UserPostsPage

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

the class ReportingPostTests method anonUserOnDesktopCanNotReportPostOnUserPostsPage.

@Test(groups = "discussions-anonUserDesktopReporting")
@Execute(asUser = User.ANONYMOUS)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void anonUserOnDesktopCanNotReportPostOnUserPostsPage() {
    final UserPostsPage page = openDefaultUserPostPageWaiting();
    assertFalse(isReportPostOptionAvailableOn(page), NO_REPORT_POST_OPTION_MESSAGE);
}
Also used : UserPostsPage(com.wikia.webdriver.elements.mercury.pages.discussions.UserPostsPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Example 8 with UserPostsPage

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

the class LockingPostTests method findMoreOptionsOnUserPostsPage.

private MoreOptionsPopOver findMoreOptionsOnUserPostsPage() {
    final PostEntity.Data data = DiscussionsOperations.using(User.USER, driver).createPostWithUniqueData();
    final PageWithPosts page = new UserPostsPage().open(data.getAuthorId());
    return findMoreOptions(page, data);
}
Also used : PageWithPosts(com.wikia.webdriver.elements.mercury.pages.discussions.PageWithPosts) UserPostsPage(com.wikia.webdriver.elements.mercury.pages.discussions.UserPostsPage) PostEntity(com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity)

Example 9 with UserPostsPage

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

the class ZeroErrorStateTests method userOnDesktopSeesProperMessageWhenOpensNonExistingUserPostsPage.

/**
   * TESTING METHODS SECTION
   */
private void userOnDesktopSeesProperMessageWhenOpensNonExistingUserPostsPage() {
    ErrorMessages errorMessage = new UserPostsPage().open().getErrorMessages();
    Assertion.assertTrue(errorMessage.isErrorMessagePresent());
    Assertion.assertEquals(errorMessage.getErrorMessageText(), MESSAGE_1 + MESSAGE_2);
}
Also used : ErrorMessages(com.wikia.webdriver.elements.mercury.components.discussions.common.ErrorMessages) UserPostsPage(com.wikia.webdriver.elements.mercury.pages.discussions.UserPostsPage)

Example 10 with UserPostsPage

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

the class ReportingPostTests method anonUserOnDesktopCanNotSeeDeletedPostOnUserPostsPage.

@Test(groups = "discussions-anonUserDesktopReporting")
@Execute(asUser = User.ANONYMOUS)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void anonUserOnDesktopCanNotSeeDeletedPostOnUserPostsPage() {
    final PostEntity.Data data = createAndReportAndDeletePostRemotely();
    UserPostsPage page = openUserPostsAndWaitUntilLoaded(data.getAuthorId());
    PostEntity post = page.getPost().findPostById(data.getId());
    assertNull(post, ANON_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)

Aggregations

UserPostsPage (com.wikia.webdriver.elements.mercury.pages.discussions.UserPostsPage)17 PostEntity (com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity)12 Execute (com.wikia.webdriver.common.core.annotations.Execute)10 InBrowser (com.wikia.webdriver.common.core.annotations.InBrowser)10 Test (org.testng.annotations.Test)10 ErrorMessages (com.wikia.webdriver.elements.mercury.components.discussions.common.ErrorMessages)2 PageWithPosts (com.wikia.webdriver.elements.mercury.pages.discussions.PageWithPosts)1