0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-09-19 23:31:11 +02:00
discourse-custom-wizard/test/javascripts/acceptance/category-chooser-initializer-test.js

21 Zeilen
700 B
JavaScript

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