1
0
Fork 0

DEV: Add acceptance tests for category filtering

Dieser Commit ist enthalten in:
jumagura 2023-09-18 17:41:24 -04:00
Ursprung 61309fd320
Commit bb3f0c6252
2 geänderte Dateien mit 26 neuen und 0 gelöschten Zeilen

Datei anzeigen

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

Datei anzeigen

@ -33,6 +33,7 @@ export default {
navigate_to_first_post_after_read: false, navigate_to_first_post_after_read: false,
custom_fields: { custom_fields: {
create_topic_wizard: null, create_topic_wizard: null,
custom_wizard_hide_from_composer: null,
}, },
allowed_tags: [], allowed_tags: [],
allowed_tag_groups: [], allowed_tag_groups: [],
@ -77,6 +78,7 @@ export default {
navigate_to_first_post_after_read: false, navigate_to_first_post_after_read: false,
custom_fields: { custom_fields: {
create_topic_wizard: null, create_topic_wizard: null,
custom_wizard_hide_from_composer: null,
}, },
allowed_tags: [], allowed_tags: [],
allowed_tag_groups: [], allowed_tag_groups: [],
@ -121,6 +123,7 @@ export default {
navigate_to_first_post_after_read: false, navigate_to_first_post_after_read: false,
custom_fields: { custom_fields: {
create_topic_wizard: null, create_topic_wizard: null,
custom_wizard_hide_from_composer: null,
}, },
allowed_tags: [], allowed_tags: [],
allowed_tag_groups: [], allowed_tag_groups: [],
@ -165,6 +168,7 @@ export default {
navigate_to_first_post_after_read: false, navigate_to_first_post_after_read: false,
custom_fields: { custom_fields: {
create_topic_wizard: null, create_topic_wizard: null,
custom_wizard_hide_from_composer: null,
}, },
allowed_tags: [], allowed_tags: [],
allowed_tag_groups: [], allowed_tag_groups: [],
@ -206,6 +210,7 @@ export default {
navigate_to_first_post_after_read: false, navigate_to_first_post_after_read: false,
custom_fields: { custom_fields: {
create_topic_wizard: null, create_topic_wizard: null,
custom_wizard_hide_from_composer: "t",
}, },
allowed_tags: [], allowed_tags: [],
allowed_tag_groups: [], allowed_tag_groups: [],