mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 01:38:20 +08:00

Followup to 7d8974d02f7360b324b446868463e950fe92883f Co-authored-by: David Taylor <david@taylorhq.com>
22 lines
809 B
JavaScript
22 lines
809 B
JavaScript
import { click, render } from "@ember/test-helpers";
|
|
import hbs from "htmlbars-inline-precompile";
|
|
import { module, test } from "qunit";
|
|
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
|
|
|
module("Discourse Chat | Component | chat-composer-dropdown", function (hooks) {
|
|
setupRenderingTest(hooks);
|
|
|
|
test("buttons", async function (assert) {
|
|
this.set("buttons", [{ id: "foo", icon: "xmark", action: () => {} }]);
|
|
|
|
await render(hbs`<ChatComposerDropdown @buttons={{this.buttons}} />`);
|
|
await click(".chat-composer-dropdown__trigger-btn");
|
|
|
|
assert.true(exists(".chat-composer-dropdown__item.foo"));
|
|
assert.true(
|
|
exists(".chat-composer-dropdown__action-btn.foo .d-icon-xmark")
|
|
);
|
|
});
|
|
});
|