mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 17:23:44 +08:00
This reverts commit aa9c7dc924
.
This commit is contained in:
parent
aa9c7dc924
commit
10f6395545
|
@ -19,9 +19,7 @@
|
|||
<span class="chat-channel-title__name">{{this.usernames}}</span>
|
||||
{{else}}
|
||||
{{#let @channel.chatable.users.firstObject as |user|}}
|
||||
<span class="chat-channel-title__name">
|
||||
<ChatUserDisplayName @user={{user}} />
|
||||
</span>
|
||||
<span class="chat-channel-title__name">{{user.username}}</span>
|
||||
{{#if this.showUserStatus}}
|
||||
<UserStatusMessage
|
||||
@class="chat-channel-title__user-status-message"
|
||||
|
@ -37,6 +35,8 @@
|
|||
/>
|
||||
{{/let}}
|
||||
{{/if}}
|
||||
{{else}}
|
||||
<span class="chat-channel-title__name">Add users</span>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -80,24 +80,6 @@ module("Discourse Chat | Component | chat-channel-title", function (hooks) {
|
|||
);
|
||||
});
|
||||
|
||||
test("direct message channel - one user showing full name", async function (assert) {
|
||||
this.siteSettings.prioritize_username_in_ux = true;
|
||||
this.user = fabricators.user({
|
||||
username: "joffrey",
|
||||
name: "Joffrey Baratheon",
|
||||
});
|
||||
this.channel = fabricators.directMessageChannel({
|
||||
chatable: fabricators.directMessage({ users: [this.user] }),
|
||||
});
|
||||
|
||||
await render(hbs`<ChatChannelTitle @channel={{this.channel}} />`);
|
||||
|
||||
assert
|
||||
.dom(".chat-user-display-name__username.-first")
|
||||
.hasText(this.user.username);
|
||||
assert.dom(".chat-user-display-name__name").hasText(this.user.name);
|
||||
});
|
||||
|
||||
test("direct message channel - multiple users", async function (assert) {
|
||||
const channel = fabricators.directMessageChannel();
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user