use of com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage in project selenium-tests by Wikia.
the class ReportingPostTests method userCannotReReportPostOnPostListPage.
private void userCannotReReportPostOnPostListPage() {
final PostEntity.Data data = createAndReportPostRemotelyAsFirstUser();
validatePostRemotelyAsDiscussionsModerator(data);
final PostsListPage page = openPostListPageAndWaitUntilLoaded();
final PostEntity postEntity = page.getPost().findPostById(data.getId());
assertFalse(postEntity.isReported(), NO_REPORTED_INDICATOR_ON_POST_MESSAGE);
assertFalse(isReportPostOptionAvailableFor(postEntity), NO_REPORT_POST_OPTION_MESSAGE);
}
use of com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage in project selenium-tests by Wikia.
the class ReportingPostTests method userOnMobileCanReportPostOnPostsListPage.
// User on mobile
@Test(groups = "discussions-loggedInUsersMobileReporting")
@Execute(asUser = User.USER)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void userOnMobileCanReportPostOnPostsListPage() {
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 SortingTests method userCanSwitchBetweenLatestAndTrendingTab.
private void userCanSwitchBetweenLatestAndTrendingTab() {
SortingFiltersOnDesktop filters = new PostsListPage().open().getSortingFiltersOnDesktop();
filters.clickLatestOption();
new Loading(driver).handleAsyncPageReload();
Assertion.assertTrue(driver.getCurrentUrl().contains("latest"));
filters.clickTrendingOption();
new Loading(driver).handleAsyncPageReload();
Assertion.assertTrue(driver.getCurrentUrl().contains("trending"));
}
use of com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage in project selenium-tests by Wikia.
the class ReportingPostTests method moderatorCanSeeReportedPostOnPostListPage.
private void moderatorCanSeeReportedPostOnPostListPage() {
final PostEntity.Data data = createAndReportPostRemotelyAsFirstUser();
reportPostRemotelyAsSecondUser(data);
final PostsListPage postsListPage = openPostListPageAndWaitUntilLoaded();
final PostEntity postEntity = postsListPage.getPost().findPostById(data.getId());
assertTrue(postEntity.isReported(), REPORTED_INDICATOR_NOT_VISIBLE_FOR_USER_MESSAGE);
}
use of com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage in project selenium-tests by Wikia.
the class ReportingPostTests method anonUserOnMobileCanNotSeeReportedPostOnPostsListPage.
@Test(groups = "discussions-anonUserMobileReporting")
@Execute(asUser = User.ANONYMOUS)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void anonUserOnMobileCanNotSeeReportedPostOnPostsListPage() {
createAndReportPostRemotelyAsFirstUser();
final PostsListPage page = openPostListPageAndWaitUntilLoaded();
assertFalse(postHasReportedIndicator(page), NO_REPORTED_INDICATOR_ON_POST_MESSAGE);
}
Aggregations