use of com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage in project selenium-tests by Wikia.
the class ReportingPostTests method userOnDesktopCanNotSeeDeletedPostOnPostsListPage.
@Test(groups = "discussions-loggedInUsersDesktopReporting")
@Execute(asUser = User.USER)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void userOnDesktopCanNotSeeDeletedPostOnPostsListPage() {
final PostEntity.Data data = createAndReportAndDeletePostRemotely();
final PostsListPage page = openPostListPageAndWaitUntilLoaded();
final PostEntity postEntity = page.getPost().findPostById(data.getId());
assertNull(postEntity, NOT_VISIBLE_DELETED_POST_MESSAGE);
}
use of com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage in project selenium-tests by Wikia.
the class ReportingPostTests method anonUserOnDesktopCanNotSeeReportedPostOnPostsListPage.
@Test(groups = "discussions-anonUserDesktopReporting")
@Execute(asUser = User.ANONYMOUS)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void anonUserOnDesktopCanNotSeeReportedPostOnPostsListPage() {
createAndReportPostRemotelyAsFirstUser();
final PostsListPage page = openPostListPageAndWaitUntilLoaded();
assertFalse(postHasReportedIndicator(page), NO_REPORTED_INDICATOR_ON_POST_MESSAGE);
}
use of com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage in project selenium-tests by Wikia.
the class ReportingPostTests method userOnDesktopCanReportPostOnPostsListPage.
@Test(groups = "discussions-loggedInUsersDesktopReporting")
@Execute(asUser = User.USER)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void userOnDesktopCanReportPostOnPostsListPage() {
final PostEntity.Data data = cretePostRemotelyAsFirstUser();
final PostsListPage page = openPostListPageAndWaitUntilLoaded();
final PostEntity postEntity = page.getPost().findPostById(data.getId());
assertTrue(postCanBeReported(postEntity), CAN_REPORT_POST_MESSAGE);
}
use of com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage in project selenium-tests by Wikia.
the class ReportingPostTests method userOnDesktopCanReportApprovedPostOnPostsListPage.
// Third user on desktop
@Test(groups = "discussions-loggedInUsersDesktopReporting")
@Execute(asUser = User.USER_3)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void userOnDesktopCanReportApprovedPostOnPostsListPage() {
final PostEntity.Data data = createAndReportPostRemotelyAsFirstUser();
reportPostRemotelyAsSecondUser(data);
validatePostRemotelyAsDiscussionsModerator(data);
final PostsListPage page = openPostListPageAndWaitUntilLoaded();
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);
}
use of com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage in project selenium-tests by Wikia.
the class SortingTests method userCanSwitchBetweenLatestAndTrendingInDropdown.
/**
* TESTING METHODS SECTION
*/
private void userCanSwitchBetweenLatestAndTrendingInDropdown() {
PostsListPage page = new PostsListPage().open();
FiltersPopOver filtersPopOver = page.getFiltersPopOver();
DiscussionsHeader discussionsHeader = page.getDiscussionsHeader();
discussionsHeader.clickSortButtonOnMobile();
Assertion.assertTrue(filtersPopOver.isSortListVisibleMobile());
filtersPopOver.clickLatestLinkOnMobile();
filtersPopOver.clickApplyButton();
new Loading(driver).handleAsyncPageReload();
discussionsHeader.clickSortButtonOnMobile();
filtersPopOver.clickTrendingOptionInSortMenu();
filtersPopOver.clickApplyButton();
new Loading(driver).handleAsyncPageReload();
}
Aggregations