Skip to content

Commit

Permalink
Wait for image to be uploaded
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperTux88 committed Aug 11, 2017
1 parent fc9bd57 commit 082dd33
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion app/assets/javascripts/mobile/mobile_file_uploader.js
Expand Up @@ -33,7 +33,6 @@ function createUploader(){
$("#fileInfo-publisher").text(fileName + " " + progress + "%");
},
onSubmit: function() {
$("#file-upload-publisher").addClass("loading");
$("#publisher_textarea_wrapper").addClass("with_attachments");
$("#photodropzone").append(
"<li class='publisher_photo loading' style='position:relative;'>" +
Expand Down
2 changes: 2 additions & 0 deletions features/step_definitions/web_steps.rb
Expand Up @@ -93,6 +93,8 @@ def with_scope(locator)
page.execute_script("$(\"input[name='#{field}']\").css('opacity', '1');")
attach_file(field, Rails.root.join(path).to_s)
end
# wait for the image to be ready
page.assert_selector(".loading", count: 0)
end

Then /^(?:|I )should see (\".+?\"[\s]*)(?:[\s]+within[\s]* "([^"]*)")?$/ do |vars, selector|
Expand Down

0 comments on commit 082dd33

Please sign in to comment.