Search in sources :

Example 1 with UserPostsPage

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

the class ZeroErrorStateTests method userOnMobileSeesProperMessageWhenOpensNonExistingUserPostsPage.

private void userOnMobileSeesProperMessageWhenOpensNonExistingUserPostsPage() {
    ErrorMessages errorMessage = new UserPostsPage().open().getErrorMessages();
    Assertion.assertTrue(errorMessage.isErrorMessagePresent());
    Assertion.assertEquals(errorMessage.getErrorMessageText(), MESSAGE_1 + MESSAGE_3);
}
Also used : ErrorMessages(com.wikia.webdriver.elements.mercury.components.discussions.common.ErrorMessages) UserPostsPage(com.wikia.webdriver.elements.mercury.pages.discussions.UserPostsPage)

Example 2 with UserPostsPage

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

the class ReportingPostTests method anonUserOnMobileCanNotSeeDeletedPostOnUserPostsPage.

@Test(groups = "discussions-anonUserMobileReporting")
@Execute(asUser = User.ANONYMOUS)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void anonUserOnMobileCanNotSeeDeletedPostOnUserPostsPage() {
    final PostEntity.Data data = createAndReportAndDeletePostRemotely();
    final UserPostsPage open = openUserPostsAndWaitUntilLoaded(data.getAuthorId());
    final PostEntity post = open.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)

Example 3 with UserPostsPage

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

the class ReportingPostTests method openUserPostsAndWaitUntilLoaded.

private UserPostsPage openUserPostsAndWaitUntilLoaded(String authorId) {
    final UserPostsPage post = new UserPostsPage().open(authorId);
    post.waitForPageLoad();
    return post;
}
Also used : UserPostsPage(com.wikia.webdriver.elements.mercury.pages.discussions.UserPostsPage)

Example 4 with UserPostsPage

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

the class ReportingPostTests method anonUserOnMobileCanNotReportPostOnUserPostsPage.

@Test(groups = "discussions-anonUserMobileReporting")
@Execute(asUser = User.ANONYMOUS)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void anonUserOnMobileCanNotReportPostOnUserPostsPage() {
    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 5 with UserPostsPage

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

the class ReportingPostTests method moderatorCanSeeReportedPostOnUserPostsPage.

private void moderatorCanSeeReportedPostOnUserPostsPage() {
    final PostEntity.Data data = createAndReportPostRemotelyAsFirstUser();
    reportPostRemotelyAsSecondUser(data);
    final UserPostsPage page = openUserPostsAndWaitUntilLoaded(data.getAuthorId());
    final PostEntity postEntity = page.getPost().findPostById(data.getId());
    assertTrue(postEntity.isReported(), REPORTED_INDICATOR_NOT_VISIBLE_FOR_USER_MESSAGE);
}
Also used : UserPostsPage(com.wikia.webdriver.elements.mercury.pages.discussions.UserPostsPage) PostEntity(com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity)

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