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:
Jarek Radosz
2022-12-22 14:35:18 +01:00
committed by GitHub
parent 8546c2084a
commit dc3473fe06
34 changed files with 1397 additions and 1762 deletions

View File

@ -15,7 +15,7 @@ module("Discourse Chat | Component | user-card-chat-button", function (hooks) {
await render(hbs`<UserCardChatButton/>`);
assert.ok(exists(".user-card-chat-btn"), "it shows the chat button");
assert.true(exists(".user-card-chat-btn"), "it shows the chat button");
});
test("when current user can’t send direct messages", async function (assert) {
@ -25,7 +25,7 @@ module("Discourse Chat | Component | user-card-chat-button", function (hooks) {
await render(hbs`<UserCardChatButton/>`);
assert.notOk(
assert.false(
exists(".user-card-chat-btn"),
"it doesn’t show the chat button"
);