FEATURE: display last message on mobile (#25384)

Direct messages on mobile will now display the last message in the channels list.
This commit is contained in:
Joffrey JAFFEUX
2024-01-25 15:30:21 +01:00
committed by GitHub
parent 4d1ed4a62d
commit 7b173e883f
20 changed files with 568 additions and 329 deletions

View File

@ -43,7 +43,9 @@ module("Discourse Chat | Component | chat-channel-row", function (hooks) {
test("renders correct channel title", async function (assert) {
await render(hbs`<ChatChannelRow @channel={{this.categoryChatChannel}} />`);
assert.dom(".chat-channel-title").hasText(this.categoryChatChannel.title);
assert
.dom(".chat-channel-name__label")
.hasText(this.categoryChatChannel.title);
});
test("renders correct channel metadata", async function (assert) {
@ -53,7 +55,7 @@ module("Discourse Chat | Component | chat-channel-row", function (hooks) {
await render(hbs`<ChatChannelRow @channel={{this.categoryChatChannel}} />`);
assert
.dom(".chat-channel-metadata")
.dom(".chat-channel__metadata-date")
.hasText(
moment(this.categoryChatChannel.lastMessage.createdAt).format("h:mm A")
);