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");
});
});

File diff suppressed because one or more lines are too long

View File

@@ -92,7 +92,9 @@ export default {
"permission":1,
"notification_level":null,
"logo_url":null,
"background_url":null
"background_url":null,
"show_subcategory_list":false,
"default_view":"latest"
},
{
"id":10,
@@ -108,7 +110,9 @@ export default {
"permission":1,
"notification_level":null,
"logo_url":null,
"background_url":null
"background_url":null,
"show_subcategory_list":false,
"default_view":"latest"
},
{
"id":26,
@@ -141,7 +145,9 @@ export default {
"permission":1,
"notification_level":null,
"logo_url":null,
"background_url":null
"background_url":null,
"show_subcategory_list":false,
"default_view":"latest"
},
{
"id":6,
@@ -157,7 +163,9 @@ export default {
"permission":1,
"notification_level":null,
"logo_url":null,
"background_url":null
"background_url":null,
"show_subcategory_list":false,
"default_view":"latest"
},
{
"id":24,
@@ -224,7 +232,9 @@ export default {
"permission":1,
"notification_level":null,
"logo_url":null,
"background_url":null
"background_url":null,
"show_subcategory_list":false,
"default_view":"latest"
},
{
"id":14,
@@ -240,7 +250,9 @@ export default {
"permission":1,
"notification_level":null,
"logo_url":null,
"background_url":null
"background_url":null,
"show_subcategory_list":false,
"default_view":"latest"
},
{
"id":12,
@@ -256,7 +268,9 @@ export default {
"permission":1,
"notification_level":null,
"logo_url":null,
"background_url":null
"background_url":null,
"show_subcategory_list":false,
"default_view":"latest"
},
{
"id":13,
@@ -272,7 +286,9 @@ export default {
"permission":1,
"notification_level":null,
"logo_url":null,
"background_url":null
"background_url":null,
"show_subcategory_list":false,
"default_view":"latest"
},
{
"id":5,
@@ -288,7 +304,9 @@ export default {
"permission":1,
"notification_level":null,
"logo_url":null,
"background_url":null
"background_url":null,
"show_subcategory_list":false,
"default_view":"latest"
},
{
"id":11,
@@ -304,7 +322,9 @@ export default {
"permission":1,
"notification_level":null,
"logo_url":null,
"background_url":null
"background_url":null,
"show_subcategory_list":false,
"default_view":"latest"
},
{
"id":22,
@@ -338,7 +358,9 @@ export default {
"notification_level":null,
"logo_url":null,
"background_url":null,
"can_edit":true
"can_edit":true,
"show_subcategory_list":false,
"default_view":"latest"
},
{
"id":17,
@@ -354,7 +376,9 @@ export default {
"permission":1,
"notification_level":null,
"logo_url":"",
"background_url":""
"background_url":"",
"show_subcategory_list":false,
"default_view":"latest"
},
{
"id":21,
@@ -387,7 +411,9 @@ export default {
"permission":1,
"notification_level":null,
"logo_url":null,
"background_url":null
"background_url":null,
"show_subcategory_list":false,
"default_view":"latest"
},
{
"id":9,
@@ -403,7 +429,9 @@ export default {
"permission":1,
"notification_level":null,
"logo_url":null,
"background_url":null
"background_url":null,
"show_subcategory_list":false,
"default_view":"latest"
},
{
"id":2,
@@ -419,7 +447,10 @@ export default {
"permission":1,
"notification_level":null,
"logo_url":null,
"background_url":null
"background_url":null,
"show_subcategory_list":true,
"default_view":"latest",
"subcategory_list_style":"boxes"
}
],
"post_action_types":[