Search in sources :

Example 16 with UserPostsPage

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

the class ReportingPostTests method anonUserOnMobileCanNotSeeReportedPostOnUserPostsPage.

@Test(groups = "discussions-anonUserMobileReporting")
@Execute(asUser = User.ANONYMOUS)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void anonUserOnMobileCanNotSeeReportedPostOnUserPostsPage() {
    final PostEntity.Data data = createAndReportPostRemotelyAsFirstUser();
    final UserPostsPage page = openUserPostsAndWaitUntilLoaded(data.getAuthorId());
    assertFalse(postHasReportedIndicator(page), NO_REPORTED_INDICATOR_ON_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 17 with UserPostsPage

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

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