DEV: Add acceptance tests for category filtering
Dieser Commit ist enthalten in:
Ursprung
61309fd320
Commit
bb3f0c6252
2 geänderte Dateien mit 26 neuen und 0 gelöschten Zeilen
21
test/javascripts/acceptance/category-chooser-initializer-test.js
Normale Datei
21
test/javascripts/acceptance/category-chooser-initializer-test.js
Normale Datei
|
@ -0,0 +1,21 @@
|
|||
import { click, visit } from "@ember/test-helpers";
|
||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||
import { test } from "qunit";
|
||||
|
||||
acceptance("CategoryChooser", function (needs) {
|
||||
needs.user();
|
||||
needs.settings({
|
||||
allow_uncategorized_topics: false,
|
||||
});
|
||||
|
||||
test("does not display category with custom_wizard_hide_from_composer set to 't'", async function (assert) {
|
||||
const categoryChooser = selectKit(".category-chooser");
|
||||
|
||||
await visit("/");
|
||||
await click("#create-topic");
|
||||
await categoryChooser.expand();
|
||||
|
||||
assert.ok(categoryChooser.rowByIndex(4).name() !== "Custom Categories");
|
||||
});
|
||||
});
|
|
@ -33,6 +33,7 @@ export default {
|
|||
navigate_to_first_post_after_read: false,
|
||||
custom_fields: {
|
||||
create_topic_wizard: null,
|
||||
custom_wizard_hide_from_composer: null,
|
||||
},
|
||||
allowed_tags: [],
|
||||
allowed_tag_groups: [],
|
||||
|
@ -77,6 +78,7 @@ export default {
|
|||
navigate_to_first_post_after_read: false,
|
||||
custom_fields: {
|
||||
create_topic_wizard: null,
|
||||
custom_wizard_hide_from_composer: null,
|
||||
},
|
||||
allowed_tags: [],
|
||||
allowed_tag_groups: [],
|
||||
|
@ -121,6 +123,7 @@ export default {
|
|||
navigate_to_first_post_after_read: false,
|
||||
custom_fields: {
|
||||
create_topic_wizard: null,
|
||||
custom_wizard_hide_from_composer: null,
|
||||
},
|
||||
allowed_tags: [],
|
||||
allowed_tag_groups: [],
|
||||
|
@ -165,6 +168,7 @@ export default {
|
|||
navigate_to_first_post_after_read: false,
|
||||
custom_fields: {
|
||||
create_topic_wizard: null,
|
||||
custom_wizard_hide_from_composer: null,
|
||||
},
|
||||
allowed_tags: [],
|
||||
allowed_tag_groups: [],
|
||||
|
@ -206,6 +210,7 @@ export default {
|
|||
navigate_to_first_post_after_read: false,
|
||||
custom_fields: {
|
||||
create_topic_wizard: null,
|
||||
custom_wizard_hide_from_composer: "t",
|
||||
},
|
||||
allowed_tags: [],
|
||||
allowed_tag_groups: [],
|
||||
|
|
Laden …
In neuem Issue referenzieren