mirror of
https://github.com/discourse/discourse.git
synced 2024-12-15 19:13:49 +08:00
32 lines
873 B
JavaScript
32 lines
873 B
JavaScript
|
import { module, test } from "qunit";
|
||
|
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
||
|
import { render, settled } from "@ember/test-helpers";
|
||
|
import { hbs } from "ember-cli-htmlbars";
|
||
|
|
||
|
module(
|
||
|
"Discourse Chat | Component | chat-channel-settings-saved-indicator",
|
||
|
function (hooks) {
|
||
|
setupRenderingTest(hooks);
|
||
|
|
||
|
test("when property changes", async function (assert) {
|
||
|
await render(
|
||
|
hbs`<ChatChannelSettingsSavedIndicator @property={{this.property}} />`
|
||
|
);
|
||
|
|
||
|
assert
|
||
|
.dom(".chat-channel-settings-saved-indicator.is-active")
|
||
|
.doesNotExist();
|
||
|
|
||
|
this.set("property", 1);
|
||
|
|
||
|
assert.dom(".chat-channel-settings-saved-indicator.is-active").exists();
|
||
|
|
||
|
await settled();
|
||
|
|
||
|
assert
|
||
|
.dom(".chat-channel-settings-saved-indicator.is-active")
|
||
|
.doesNotExist();
|
||
|
});
|
||
|
}
|
||
|
);
|