mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-21 05:54:19 +08:00
22 lines
815 B
Text
Vendored
22 lines
815 B
Text
Vendored
import { click, render } from "@ember/test-helpers";
|
|
import { module, test } from "qunit";
|
|
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
|
import ChatComposerDropdown from "discourse/plugins/chat/discourse/components/chat-composer-dropdown";
|
|
|
|
module("Component | chat-composer-dropdown", function (hooks) {
|
|
setupRenderingTest(hooks);
|
|
|
|
test("buttons", async function (assert) {
|
|
this.set("buttons", [{ id: "foo", icon: "xmark", action: () => {} }]);
|
|
|
|
await render(
|
|
<template><ChatComposerDropdown @buttons={{this.buttons}} /></template>
|
|
);
|
|
await click(".chat-composer-dropdown__trigger-btn");
|
|
|
|
assert.dom(".chat-composer-dropdown__item.foo").exists();
|
|
assert
|
|
.dom(".chat-composer-dropdown__action-btn.foo .d-icon-xmark")
|
|
.exists();
|
|
});
|
|
});
|