DEV: Add chat system spec for multi-file upload (#19709)
Followup to 29638f0639
This commit is contained in:
parent
ab7f3ee599
commit
9e175a3613
|
@ -34,6 +34,22 @@ describe "Uploading files in chat messages", type: :system, js: true do
|
|||
expect(ChatMessage.last.uploads.count).to eq(1)
|
||||
end
|
||||
|
||||
it "allows uploading multiple files" do
|
||||
chat.visit_channel(channel_1)
|
||||
file_path_1 = file_from_fixtures("logo.png", "images").path
|
||||
file_path_2 = file_from_fixtures("logo.jpg", "images").path
|
||||
attach_file([file_path_1, file_path_2]) do
|
||||
channel.open_action_menu
|
||||
channel.click_action_button("chat-upload-btn")
|
||||
end
|
||||
expect(page).to have_css(".chat-composer-upload .preview .preview-img", count: 2)
|
||||
channel.send_message("upload testing")
|
||||
|
||||
expect(page).not_to have_css(".chat-composer-upload")
|
||||
expect(channel).to have_message(text: "upload testing")
|
||||
expect(ChatMessage.last.uploads.count).to eq(2)
|
||||
end
|
||||
|
||||
it "allows uploading a huge image file with preprocessing" do
|
||||
SiteSetting.composer_media_optimization_image_bytes_optimization_threshold = 200.kilobytes
|
||||
chat.visit_channel(channel_1)
|
||||
|
|
Loading…
Reference in New Issue