pull/6827/head
Oliver Günther 6 years ago
parent 0c18b1a8ce
commit 9730a65ede
No known key found for this signature in database
GPG Key ID: A3A8BDAD7C0C552C
  1. 16
      spec/features/budgets/attachment_upload_spec.rb

@ -57,13 +57,7 @@ describe 'Upload attachment to budget', js: true do
fill_in "Subject", with: 'New budget'
# adding an image
editor.in_editor do |container, editable|
attachments.drag_and_drop_file(editable, image_fixture)
# Besides testing caption functionality this also slows down clicking on the submit button
# so that the image is properly embedded
editable.find('figure.image figcaption').base.send_keys('Image uploaded on creation')
end
editor.drag_attachment image_fixture, 'Image uploaded on creation'
expect(page).to have_selector('attachment-list-item', text: 'image.png')
@ -77,13 +71,7 @@ describe 'Upload attachment to budget', js: true do
click_on "Update"
end
editor.in_editor do |container, editable|
attachments.drag_and_drop_file(editable, image_fixture)
# Besides testing caption functionality this also slows down clicking on the submit button
# so that the image is properly embedded
editable.find('figure.image figcaption').base.send_keys('Image uploaded the second time')
end
editor.drag_attachment image_fixture, 'Image uploaded the second time'
expect(page).to have_selector('attachment-list-item', text: 'image.png', count: 2)

Loading…
Cancel
Save