DEV: correctly uses link to message endpoint in spec (#24652)

- correctly uses link to message endpoint in spec
- correctly uses "chat with"
This commit is contained in:
Joffrey JAFFEUX 2023-11-30 19:33:41 +01:00 committed by GitHub
parent 4fa1b0e978
commit a7a7d8e41e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -279,7 +279,7 @@ export default {
});
} else {
return I18n.t("chat.placeholder_users", {
commaSeparatedNames: this.channel.chatable.users[0].username,
commaSeparatedNames: this.channel.escapedTitle,
});
}
}

View File

@ -136,7 +136,7 @@ RSpec.describe "Chat channel", type: :system do
it "jumps to the bottom of the channel" do
unloaded_message = Fabricate(:chat_message, chat_channel: channel_1)
visit("/chat/message/#{message_1.id}")
visit("/chat/c/-/#{channel_1.id}/#{message_1.id}")
expect(channel_page).to have_no_loading_skeleton
expect(page).to have_no_css("[data-id='#{unloaded_message.id}']")
@ -168,7 +168,7 @@ RSpec.describe "Chat channel", type: :system do
end
xit "doesnt scroll the pane" do
visit("/chat/message/#{message_1.id}")
visit("/chat/c/-/#{channel_1.id}/#{message_1.id}")
new_message = Fabricate(:chat_message, chat_channel: channel_1)

View File

@ -182,7 +182,7 @@ RSpec.describe "Sidebar navigation menu", type: :system do
visit("/")
expect(sidebar_page.dms_section.find(".channel-#{dm_channel_1.id}")["title"]).to eq(
"Chat in @<script>alert('hello')</script>",
"Chat with @<script>alert('hello')</script>",
)
end
end