use of com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage in project selenium-tests by Wikia.
the class CategoriesTests method discussionsAdministratorOnMobileCanRemoveCategory.
@Test(groups = { MOBILE })
@Execute(asUser = User.DISCUSSIONS_ADMINISTRATOR, onWikia = MercuryWikis.DISCUSSIONS_MOBILE)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void discussionsAdministratorOnMobileCanRemoveCategory() {
CategoryPill.Data data = setUp(MercuryWikis.DISCUSSIONS_MOBILE);
final String temporaryCategoryName = createUniqueCategoryName();
final PostsListPage page = new PostsListPage().open(siteId);
final CategoriesFieldset categoriesFieldset = page.getFiltersPopOver().click().getCategoriesFieldset();
canRemoveCategories(page, temporaryCategoryName, categoriesFieldset, data);
}
use of com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage in project selenium-tests by Wikia.
the class CategoriesTests method discussionsAdministratorOnDesktopCanNotAddMoreThanTenCategories.
@Test(groups = { DESKTOP })
@Execute(asUser = User.DISCUSSIONS_ADMINISTRATOR)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void discussionsAdministratorOnDesktopCanNotAddMoreThanTenCategories() {
deleteCategoriesDesktop();
ArrayList<CategoryPill.Data> categoriesAdded = setUp(MAX_NUMBER_OF_CATEGORIES - 1);
final PostsListPage page = new PostsListPage().open(siteId);
final String newCategoryName = createUniqueCategoryName();
CategoriesFieldset categoriesFieldset = addCategory(page.getCategories(), newCategoryName);
try {
assertEquals(categoriesFieldset.getInfoMessageText(), CATEGORIES_LIMIT_REACHED_INFO_MESSAGE, INFOR_MESSAGE_SHOULD_APPEAR_MESSAGE);
} finally {
cleanUp(categoriesAdded);
}
}
use of com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage in project selenium-tests by Wikia.
the class CategoriesTests method canChangeCategoryDesktop.
// test methods body
private void canChangeCategoryDesktop() {
CategoryPill.Data postCategory = setUp();
final PostsListPage page = new PostsListPage().open(siteId);
openPageAndSelectCategoryOnDesktop(page, postCategory.getName());
assertCategoryVisibleAndCleanUp(page, postCategory);
}
use of com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage in project selenium-tests by Wikia.
the class CreatingPostTests method userOnMobileCannotAddPostWithoutTitle.
@Test(groups = MOBILE)
@Execute(asUser = User.USER, onWikia = MercuryWikis.DISCUSSIONS_2)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void userOnMobileCannotAddPostWithoutTitle() throws MalformedURLException {
String description = TextGenerator.createUniqueText();
PostsListPage page = new PostsListPage().open();
PostsCreator postsCreator = page.getPostsCreatorMobile();
fillPostCategoryWith(postsCreator, description);
Assertion.assertFalse(postsCreator.isPostButtonActive());
}
use of com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage in project selenium-tests by Wikia.
the class CreatingPostTests method userOnDesktopCanExpandPostEditor.
/*
* LOGGED-IN USERS ON DESKTOP SECTION
*/
@Test(groups = DESKTOP)
@Execute(asUser = User.USER)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void userOnDesktopCanExpandPostEditor() {
PostsCreatorDesktop postsCreator = new PostsListPage().open().getPostsCreatorDesktop();
postsCreator.click();
Assertion.assertTrue(postsCreator.isExpanded());
Assertion.assertFalse(postsCreator.isPostButtonActive());
}
Aggregations