mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:34:31 +08:00
DEV: Modernize chat's component tests (#19577)
1. `test()` and `render()` instead of `componentTest()` 2. Angle brackets 3. `strictEqual()`/`true()`/`false()` assertions This removes all remaining uses of `componentTest` from core
This commit is contained in:
@ -35,13 +35,13 @@ module("Discourse Chat | Component | chat-channel-metadata", function (hooks) {
|
||||
hbs`<ChatChannelMetadata @channel={{this.channel}} @unreadIndicator={{this.unreadIndicator}}/>`
|
||||
);
|
||||
|
||||
assert.ok(exists(".chat-channel-unread-indicator"));
|
||||
assert.true(exists(".chat-channel-unread-indicator"));
|
||||
|
||||
this.unreadIndicator = false;
|
||||
await render(
|
||||
hbs`<ChatChannelMetadata @channel={{this.channel}} @unreadIndicator={{this.unreadIndicator}}/>`
|
||||
);
|
||||
|
||||
assert.notOk(exists(".chat-channel-unread-indicator"));
|
||||
assert.false(exists(".chat-channel-unread-indicator"));
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user