Skip to content
This repository has been archived by the owner on Apr 2, 2020. It is now read-only.

Commit

Permalink
Use core attachment helper: opf/openproject#6790
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverguenther committed Oct 29, 2018
1 parent 0c18b1a commit 9730a65
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions spec/features/budgets/attachment_upload_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,7 @@
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')

Expand All @@ -77,13 +71,7 @@
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)

Expand Down

0 comments on commit 9730a65

Please sign in to comment.