Search in sources :

Example 31 with PostsListPage

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

the class ReportingPostTests method openPostListPageAndWaitUntilLoaded.

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

Example 32 with PostsListPage

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

the class ReportingPostTests method anonUserOnDesktopCanNotReportPostOnPostsListPage.

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

Example 33 with PostsListPage

use of com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage 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 34 with PostsListPage

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

the class ReportingPostTests method anonUserOnMobileCanNotReportPostOnPostsListPage.

// Anonymous user on mobile
@Test(groups = "discussions-anonUserMobileReporting")
@Execute(asUser = User.ANONYMOUS)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void anonUserOnMobileCanNotReportPostOnPostsListPage() {
    final PostsListPage page = openPostListPageAndWaitUntilLoaded();
    assertFalse(isReportPostOptionAvailableOn(page), NO_REPORT_POST_OPTION_MESSAGE);
}
Also used : PostsListPage(com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Example 35 with PostsListPage

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

the class CategoriesTests method discussionsAdministratorOnDesktopCanRemoveCategory.

@Test(groups = { DESKTOP })
@Execute(asUser = User.DISCUSSIONS_ADMINISTRATOR)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void discussionsAdministratorOnDesktopCanRemoveCategory() {
    CategoryPill.Data data = setUp();
    final String temporaryCategoryName = createUniqueCategoryName();
    final PostsListPage page = new PostsListPage().open(siteId);
    final CategoriesFieldset categoriesFieldset = page.getCategories();
    canRemoveCategories(page, temporaryCategoryName, categoriesFieldset, data);
}
Also used : CategoryPill(com.wikia.webdriver.elements.mercury.components.discussions.common.category.CategoryPill) PostsListPage(com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage) CategoriesFieldset(com.wikia.webdriver.elements.mercury.components.discussions.common.category.CategoriesFieldset) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Aggregations

PostsListPage (com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage)46 Execute (com.wikia.webdriver.common.core.annotations.Execute)26 InBrowser (com.wikia.webdriver.common.core.annotations.InBrowser)26 Test (org.testng.annotations.Test)26 CategoryPill (com.wikia.webdriver.elements.mercury.components.discussions.common.category.CategoryPill)11 PostEntity (com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity)10 CategoriesFieldset (com.wikia.webdriver.elements.mercury.components.discussions.common.category.CategoriesFieldset)10 Loading (com.wikia.webdriver.elements.mercury.components.Loading)3 PostsCreatorDesktop (com.wikia.webdriver.elements.mercury.components.discussions.desktop.PostsCreatorDesktop)3 Post (com.wikia.webdriver.elements.mercury.components.discussions.common.Post)2 ErrorMessages (com.wikia.webdriver.elements.mercury.components.discussions.common.ErrorMessages)1 BackButtons (com.wikia.webdriver.elements.mercury.components.discussions.desktop.BackButtons)1 SortingFiltersOnDesktop (com.wikia.webdriver.elements.mercury.components.discussions.desktop.SortingFiltersOnDesktop)1 DiscussionsHeader (com.wikia.webdriver.elements.mercury.components.discussions.mobile.DiscussionsHeader)1 FiltersPopOver (com.wikia.webdriver.elements.mercury.components.discussions.mobile.FiltersPopOver)1 PostsCreatorMobile (com.wikia.webdriver.elements.mercury.components.discussions.mobile.PostsCreatorMobile)1 PageWithPosts (com.wikia.webdriver.elements.mercury.pages.discussions.PageWithPosts)1