mirror of
https://github.com/discourse/discourse.git
synced 2024-12-13 21:34:23 +08:00
b81055a6d4
…to either qunit-dom or `strictEqual`
24 lines
819 B
JavaScript
24 lines
819 B
JavaScript
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";
|
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
|
|
|
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);
|
|
|
|
assert.dom(".control-label").hasText("a label");
|
|
assert.ok(
|
|
exists(
|
|
".controls details.select-kit.multi-select.user-chooser.email-group-user-chooser"
|
|
),
|
|
"has email-group-user-chooser"
|
|
);
|
|
});
|
|
});
|