Wait a little longer on attachments

[ci skip]
pull/6835/head
Oliver Günther 6 years ago
parent 0ce224d934
commit 507fa44804
No known key found for this signature in database
GPG Key ID: A3A8BDAD7C0C552C
  1. 5
      spec/support/components/wysiwyg/wysiwyg_editor.rb

@ -66,7 +66,7 @@ module Components
def drag_attachment(image_fixture, caption = 'Some caption') def drag_attachment(image_fixture, caption = 'Some caption')
in_editor do |container, editable| in_editor do |container, editable|
sleep 0.5 sleep 1
editable.base.send_keys(:enter, 'some text', :enter, :enter, :enter) editable.base.send_keys(:enter, 'some text', :enter, :enter, :enter)
images = editable.all('figure.image') images = editable.all('figure.image')
@ -75,12 +75,13 @@ module Components
expect(page) expect(page)
.to have_selector('figure img[src^="/api/v3/attachments/"]', count: images.length + 1, wait: 10) .to have_selector('figure img[src^="/api/v3/attachments/"]', count: images.length + 1, wait: 10)
sleep 0.5 sleep 1
expect(page).not_to have_selector('notification-upload-progress') expect(page).not_to have_selector('notification-upload-progress')
# Besides testing caption functionality this also slows down clicking on the submit button # Besides testing caption functionality this also slows down clicking on the submit button
# so that the image is properly embedded # so that the image is properly embedded
editable.all('figure.image figcaption').map { |el| el.base.send_keys(caption) } editable.all('figure.image figcaption').map { |el| el.base.send_keys(caption) }
sleep 1
end end
end end

Loading…
Cancel
Save