mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
FIX: Chat member user card rendered out of view (#20332)
This commit is contained in:
@ -0,0 +1,24 @@
|
||||
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
||||
import hbs from "htmlbars-inline-precompile";
|
||||
import { module, test } from "qunit";
|
||||
import { render } from "@ember/test-helpers";
|
||||
|
||||
module("Discourse Chat | Component | chat-user-info", function (hooks) {
|
||||
setupRenderingTest(hooks);
|
||||
|
||||
test("avatar and name", async function (assert) {
|
||||
this.set("user", this.currentUser);
|
||||
|
||||
await render(hbs`<ChatUserInfo @user={{this.user}} />`);
|
||||
|
||||
assert
|
||||
.dom(`a[data-user-card=${this.user.username}] div.chat-user-avatar`)
|
||||
.exists();
|
||||
|
||||
assert
|
||||
.dom(
|
||||
`a[data-user-card=${this.user.username}] span.chat-user-display-name`
|
||||
)
|
||||
.includesText(this.user.username);
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user