2024-04-03 23:20:43 +08:00
|
|
|
import { render } from "@ember/test-helpers";
|
|
|
|
import { hbs } from "ember-cli-htmlbars";
|
|
|
|
import { module, test } from "qunit";
|
|
|
|
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
|
|
|
|
|
|
|
module("Integration | Component | email-group-user-field", function (hooks) {
|
|
|
|
setupRenderingTest(hooks);
|
|
|
|
|
|
|
|
test("Email group user field uses email-group-user-chooser component", async function (assert) {
|
|
|
|
const template = hbs` <Fields::DaEmailGroupUserField @label="a label" />`;
|
|
|
|
|
|
|
|
await render(template);
|
|
|
|
|
2024-11-04 04:04:38 +08:00
|
|
|
assert.dom(".control-label").hasText("a label");
|
2024-11-10 08:30:33 +08:00
|
|
|
assert
|
|
|
|
.dom(
|
2024-04-03 23:20:43 +08:00
|
|
|
".controls details.select-kit.multi-select.user-chooser.email-group-user-chooser"
|
2024-11-10 08:30:33 +08:00
|
|
|
)
|
|
|
|
.exists("has email-group-user-chooser");
|
2024-04-03 23:20:43 +08:00
|
|
|
});
|
|
|
|
});
|