DH SM MS Fix showing image in the publisher when it gets uploaded

This commit is contained in:
Sarah Mei 2011-06-30 20:36:15 -07:00
parent b495e71c77
commit 948a7c5d55
3 changed files with 8 additions and 2 deletions

View file

@ -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");

View file

@ -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

View file

@ -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