mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: box-style rendering of sub-categories
This commit is contained in:
@@ -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");
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user