diff --git a/app/views/photos/_new_photo.haml b/app/views/photos/_new_photo.haml index dde30ed35..2038f5e07 100644 --- a/app/views/photos/_new_photo.haml +++ b/app/views/photos/_new_photo.haml @@ -40,7 +40,7 @@ onComplete: function(id, fileName, responseJSON) { $('#fileInfo').text(fileName + ' completed'); var id = responseJSON.data.photo.id, - url = responseJSON.data.photo.url, + url = responseJSON.data.photo.unprocessed_image.url, currentPlaceholder = $('li.loading').first(); $("#publisher textarea").addClass("with_attachments"); diff --git a/features/posts.feature b/features/posts.feature index 710b14bb6..94b59108b 100644 --- a/features/posts.feature +++ b/features/posts.feature @@ -26,6 +26,8 @@ Feature: posting Scenario: post a photo without text Given I expand the publisher And I attach the file "spec/fixtures/button.png" to hidden element "file" within "#file-upload" + And I wait for the ajax to finish + Then I should see an uploaded image within the photo drop zone And I press "Share" And I wait for the ajax to finish And I follow "All Aspects" @@ -96,7 +98,7 @@ Feature: posting | aspect | see | | PostTo | see | | DidntPostTo | not see | - + Scenario Outline: posting to all aspects from the profile page Given I am on "alice@alice.alice"'s page And I have turned off jQuery effects diff --git a/features/step_definitions/posts_steps.rb b/features/step_definitions/posts_steps.rb index 5ed9e08c1..ac39424c7 100644 --- a/features/step_definitions/posts_steps.rb +++ b/features/step_definitions/posts_steps.rb @@ -8,3 +8,7 @@ When /^I post a photo with a token$/ do JSON page.driver.post(activity_streams_photos_path, json.merge!(:auth_token => @me.authentication_token)) end + +Then /^I should see an uploaded image within the photo drop zone$/ do + find("#photodropzone img")["src"].should include("uploads/images") +end \ No newline at end of file