DEV: more resilient upload spec (#21462)

Checking "uploading" string is tricky because it both takes time before showing, and when it will show it will show for a short period of time. I prefer to reduce the surface tested here while still getting some confidence out of it and making the test more reliable.
This commit is contained in:
Joffrey JAFFEUX 2023-05-10 00:33:40 +02:00 committed by GitHub
parent 44e650d175
commit dacb605e98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 4 deletions

View File

@ -64,10 +64,7 @@ describe "Uploading files in chat messages", type: :system, js: true do
# image processing clientside is slow! here we are waiting for processing
# to complete then the upload to complete as well
using_wait_time(10) do
expect(find(".chat-composer-upload")).to have_content("Uploading")
expect(page).to have_css(".chat-composer-upload .preview .preview-img")
end
expect(page).to have_css(".chat-composer-upload .preview .preview-img", wait: 25)
channel.send_message("upload testing")