Wait for image to be uploaded
This commit is contained in:
parent
6b8c2ebe9f
commit
605e292589
2 changed files with 2 additions and 1 deletions
|
|
@ -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;'>" +
|
||||
|
|
|
|||
|
|
@ -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|
|
||||
|
|
|
|||
Loading…
Reference in a new issue