diff --git a/app/assets/javascripts/mobile/mobile_file_uploader.js b/app/assets/javascripts/mobile/mobile_file_uploader.js index 86c784818..3a33ef5ee 100644 --- a/app/assets/javascripts/mobile/mobile_file_uploader.js +++ b/app/assets/javascripts/mobile/mobile_file_uploader.js @@ -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( "
  • " + diff --git a/features/step_definitions/web_steps.rb b/features/step_definitions/web_steps.rb index 36092716f..2ffdd4829 100644 --- a/features/step_definitions/web_steps.rb +++ b/features/step_definitions/web_steps.rb @@ -93,6 +93,8 @@ When /^(?:|I )attach the file "([^"]*)" to (?:hidden )?"([^"]*)"(?: within "([^" 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|