mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 23:49:34 +08:00
FIX: correctly handles mobile and default (#23152)
This commit ensures we have correct icon and title on mobile for the chat header icon. It also fixes a bug where the site setting was not correctly used when the user has not yet set the user option. Both cases are now correctly tested.
This commit is contained in:
@ -41,4 +41,17 @@ module("Discourse Chat | Component | chat-header-icon", function (hooks) {
|
||||
|
||||
assert.dom(".d-icon-random").exists();
|
||||
});
|
||||
|
||||
test("mobile", async function (assert) {
|
||||
this.site.mobileView = true;
|
||||
|
||||
await render(hbs`<Chat::Header::Icon />`);
|
||||
|
||||
assert
|
||||
.dom(".icon.btn-flat")
|
||||
.hasAttribute("title", I18n.t("chat.title_capitalized"))
|
||||
.hasAttribute("href", "/chat");
|
||||
|
||||
assert.dom(".d-icon-d-chat").exists();
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user