discourse/plugins/automation/test/javascripts/integration/components/da-email-group-user-field-test.js
Osama Sayegh 3d4faf3272
FEATURE: Merge discourse-automation (#26432)
Automation (previously known as discourse-automation) is now a core plugin.
2024-04-03 18:20:43 +03:00

24 lines
837 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, query } 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.equal(query(".control-label").innerText, "a label");
assert.ok(
exists(
".controls details.select-kit.multi-select.user-chooser.email-group-user-chooser"
),
"has email-group-user-chooser"
);
});
});