use of com.wikia.webdriver.elements.mercury.components.discussions.common.category.CategoriesFieldset in project selenium-tests by Wikia.
the class CategoriesTests method discussionsAdministratorOnDesktopCanNotEditAllAndGeneralCategories.
// Discussions Administrator on desktop
@Test(groups = { DESKTOP })
@Execute(asUser = User.DISCUSSIONS_ADMINISTRATOR)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void discussionsAdministratorOnDesktopCanNotEditAllAndGeneralCategories() {
final PostsListPage page = new PostsListPage().open(siteId);
final CategoriesFieldset categoriesFieldset = page.getCategories();
categoriesFieldset.clickEdit();
assertFalse(categoriesFieldset.canEditAllCategory(), ALL_CATEGORY_SHOULD_NOT_BE_EDITABLE_MESSAGE);
assertFalse(categoriesFieldset.canEditGeneralCategory(), GENERAL_CATEGORY_SHOULD_BE_NOT_EDITABLE_MESSAGE);
}
use of com.wikia.webdriver.elements.mercury.components.discussions.common.category.CategoriesFieldset in project selenium-tests by Wikia.
the class CategoriesTests method discussionsAdministratorOnMobileCanNotAddMoreThanTenCategories.
@Test(groups = { MOBILE })
@Execute(asUser = User.DISCUSSIONS_ADMINISTRATOR, onWikia = MercuryWikis.DISCUSSIONS_MOBILE)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void discussionsAdministratorOnMobileCanNotAddMoreThanTenCategories() {
deleteCategoriesMobile();
ArrayList<CategoryPill.Data> categoriesAdded = setUp(MercuryWikis.DISCUSSIONS_MOBILE, MAX_NUMBER_OF_CATEGORIES - 1);
final PostsListPage page = new PostsListPage().open(siteId);
final String newCategoryName = createUniqueCategoryName();
CategoriesFieldset categoriesFieldset = addCategory(page.getFiltersPopOver().click().getCategoriesFieldset(), 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.components.discussions.common.category.CategoriesFieldset in project selenium-tests by Wikia.
the class CategoriesTests method discussionsAdministratorOnMobileCanAddCategory.
@Test(groups = { MOBILE })
@Execute(asUser = User.DISCUSSIONS_ADMINISTRATOR, onWikia = MercuryWikis.DISCUSSIONS_MOBILE)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void discussionsAdministratorOnMobileCanAddCategory() {
final PostsListPage page = new PostsListPage().open(siteId);
final String categoryName = createUniqueCategoryName();
final CategoriesFieldset categoriesFieldset = addCategory(page.getFiltersPopOver().click().getCategoriesFieldset(), categoryName);
page.waitForPageReload();
CategoryPill.Data newCategory = categoriesFieldset.findCategoryOrElseThrow(categoryName);
try {
assertTrue(categoriesFieldset.hasCategory(categoryName), String.format(CATEGORY_SHOULD_BE_VISILBE_IN_LIST_MESSAGE, categoryName));
assertTrue(isCategoryIn(page.getPostsCreatorMobile(), categoryName), String.format(CATEGORY_SHOULD_BE_VISIBLE_IN_CREATOR_MESSAGE, categoryName));
} finally {
cleanUp(newCategory);
}
}
use of com.wikia.webdriver.elements.mercury.components.discussions.common.category.CategoriesFieldset 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.components.discussions.common.category.CategoriesFieldset 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);
}
}
Aggregations