@Test( dependsOnMethods = "checkCategoryCountAndAddNew", groups = "Enterprise-only", timeOut = 400000) public void checkOpenSubCategory() throws Exception { CategoryManagerPage categoryManagerPage = drone.getCurrentPage().render(); int categoryCount = categoryManagerPage.getCategoriesCount(); categoryManagerPage.addNewCategory(categoryName, subCategoryName); Thread.sleep(solrWaitTime); // wait solr drone.refresh(); assertTrue(categoryCount == categoryManagerPage.getCategoriesCount()); categoryManagerPage.openSubCategoryList(categoryName); assertTrue(categoryCount + 1 == categoryManagerPage.getCategoriesCount()); assertTrue(categoryManagerPage.isCategoryPresent(subCategoryName)); }
@Test( dependsOnMethods = "checkThatFactoryReturnCategoryManagerPage", groups = "Enterprise-only", timeOut = 400000) public void checkCategoryCountAndAddNew() throws Exception { CategoryManagerPage categoryManagerPage = drone.getCurrentPage().render(); int categoryCount = categoryManagerPage.getCategoriesCount(); assertTrue(categoryCount > 0); categoryManagerPage.addNewCategory(rootCategoryName, categoryName); Thread.sleep(solrWaitTime); // wait solr drone.refresh(); assertTrue( categoryCount < categoryManagerPage.getCategoriesCount(), "Before " + categoryCount + ", after " + categoryManagerPage.getCategoriesCount()); assertTrue(categoryManagerPage.isCategoryPresent(categoryName)); }