diff --git a/spec/features/boards/attachment_upload_spec.rb b/spec/features/boards/attachment_upload_spec.rb index 2846379281..a1e47eb13c 100644 --- a/spec/features/boards/attachment_upload_spec.rb +++ b/spec/features/boards/attachment_upload_spec.rb @@ -50,7 +50,7 @@ describe 'Upload attachment to board message', js: true do login_as(user) end - it 'can upload an image to new and existin messages via drag & drop' do + it 'can upload an image to new and existing messages via drag & drop' do index_page.visit! create_page = index_page.click_create_message @@ -66,6 +66,7 @@ describe 'Upload attachment to board message', js: true do end expect(page).to have_selector('attachment-list-item', text: 'image.png') + expect(page).not_to have_selector('notification-upload-progress') show_page = create_page.click_save @@ -86,6 +87,7 @@ describe 'Upload attachment to board message', js: true do end expect(page).to have_selector('attachment-list-item', text: 'image.png', count: 2) + expect(page).not_to have_selector('notification-upload-progress') show_page.click_save diff --git a/spec/features/wiki/attachment_upload_spec.rb b/spec/features/wiki/attachment_upload_spec.rb index 038cdff0ee..922b4f4e08 100644 --- a/spec/features/wiki/attachment_upload_spec.rb +++ b/spec/features/wiki/attachment_upload_spec.rb @@ -60,6 +60,7 @@ describe 'Upload attachment to wiki page', js: true do end expect(page).to have_selector('attachment-list-item', text: 'image.png') + expect(page).not_to have_selector('notification-upload-progress') click_on 'Save' @@ -87,6 +88,7 @@ describe 'Upload attachment to wiki page', js: true do end expect(page).to have_selector('attachment-list-item', text: 'image.png', count: 2) + expect(page).not_to have_selector('notification-upload-progress') click_on 'Save' @@ -113,6 +115,7 @@ describe 'Upload attachment to wiki page', js: true do # Upload image to dropzone expect(page).to have_no_selector('.work-package--attachments--filename') attachments.attach_file_on_input(image_fixture) + expect(page).not_to have_selector('notification-upload-progress') expect(page).to have_selector('.work-package--attachments--filename', text: 'image.png') # Assume we could still save the page with an empty title diff --git a/spec/features/work_packages/attachments/attachment_upload_spec.rb b/spec/features/work_packages/attachments/attachment_upload_spec.rb index 0edbfecd5d..bf2ee79908 100644 --- a/spec/features/work_packages/attachments/attachment_upload_spec.rb +++ b/spec/features/work_packages/attachments/attachment_upload_spec.rb @@ -51,6 +51,7 @@ describe 'Upload attachment to work package', js: true do # Besides testing caption functionality this also slows down clicking on the submit button # so that the image is properly embedded page.find('figure.image figcaption').base.send_keys('Some image caption') + expect(page).not_to have_selector('notification-upload-progress') field.submit_by_click @@ -117,6 +118,8 @@ describe 'Upload attachment to work package', js: true do caption.click caption.base.send_keys('Some image caption') + expect(page).not_to have_selector('notification-upload-progress') + click_on 'Save' wp_page.expect_notification( @@ -143,12 +146,14 @@ describe 'Upload attachment to work package', js: true do # Attach file manually expect(page).to have_no_selector('.work-package--attachments--filename') attachments.attach_file_on_input(image_fixture) - expect(page).to have_selector('.work-package--attachments--filename', text: 'image.png', wait: 20) + expect(page).not_to have_selector('notification-upload-progress') + expect(page).to have_selector('.work-package--attachments--filename', text: 'image.png', wait: 5) ## # and via drag & drop attachments.drag_and_drop_file(container, Rails.root.join('spec/fixtures/files/image.png')) - expect(page).to have_selector('.work-package--attachments--filename', text: 'image.png', count: 2, wait: 20) + expect(page).not_to have_selector('notification-upload-progress') + expect(page).to have_selector('.work-package--attachments--filename', text: 'image.png', count: 2, wait: 5) end end end