FEATURE: box-style rendering of sub-categories

This commit is contained in:
Neil Lalonde
2017-03-08 11:31:30 -05:00
parent 60dc531531
commit 6d7e968e30
18 changed files with 286 additions and 66 deletions

View File

@@ -57,3 +57,28 @@ test("Error Saving", assert => {
assert.equal(find('#modal-alert').html(), "duplicate email");
});
});
test("Subcategory list settings", () => {
visit("/c/bug");
click('.edit-category');
click('.edit-category-settings');
andThen(() => {
ok(!visible(".subcategory-list-style-field"), "subcategory list style isn't visible by default");
});
click(".show-subcategory-list-field input[type=checkbox]");
andThen(() => {
ok(visible(".subcategory-list-style-field"), "subcategory list style is shown if show subcategory list is checked");
});
click('.edit-category-general');
selectDropdown('.edit-category-tab-general .category-combobox', 2);
click('.edit-category-settings');
andThen(() => {
ok(!visible(".show-subcategory-list-field"), "show subcategory list isn't visible for child categories");
ok(!visible(".subcategory-list-style-field"), "subcategory list style isn't visible for child categories");
});
});

View File

@@ -13,6 +13,7 @@ test("Visit Discovery Pages", () => {
andThen(() => {
ok(exists(".topic-list"), "The list of topics was rendered");
ok(exists('.topic-list .topic-list-item'), "has topics");
ok(!exists('.category-list'), "doesn't render subcategories");
ok($('body.category-bug').length, "has a custom css class for the category id on the body");
});
@@ -29,4 +30,10 @@ test("Visit Discovery Pages", () => {
ok($('body.categories-list').length === 0, "removes the `categories-list` class");
ok(exists('.topic-list .topic-list-item'), "has topics");
});
visit("/c/feature");
andThen(() => {
ok(exists(".topic-list"), "The list of topics was rendered");
ok(exists(".category-boxes"), "The list of subcategories were rendered with box style");
});
});