DH SM MS Fix showing image in the publisher when it gets uploaded
This commit is contained in:
parent
b495e71c77
commit
948a7c5d55
3 changed files with 8 additions and 2 deletions
|
|
@ -40,7 +40,7 @@
|
||||||
onComplete: function(id, fileName, responseJSON) {
|
onComplete: function(id, fileName, responseJSON) {
|
||||||
$('#fileInfo').text(fileName + ' completed');
|
$('#fileInfo').text(fileName + ' completed');
|
||||||
var id = responseJSON.data.photo.id,
|
var id = responseJSON.data.photo.id,
|
||||||
url = responseJSON.data.photo.url,
|
url = responseJSON.data.photo.unprocessed_image.url,
|
||||||
currentPlaceholder = $('li.loading').first();
|
currentPlaceholder = $('li.loading').first();
|
||||||
|
|
||||||
$("#publisher textarea").addClass("with_attachments");
|
$("#publisher textarea").addClass("with_attachments");
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,8 @@ Feature: posting
|
||||||
Scenario: post a photo without text
|
Scenario: post a photo without text
|
||||||
Given I expand the publisher
|
Given I expand the publisher
|
||||||
And I attach the file "spec/fixtures/button.png" to hidden element "file" within "#file-upload"
|
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 press "Share"
|
||||||
And I wait for the ajax to finish
|
And I wait for the ajax to finish
|
||||||
And I follow "All Aspects"
|
And I follow "All Aspects"
|
||||||
|
|
|
||||||
|
|
@ -8,3 +8,7 @@ When /^I post a photo with a token$/ do
|
||||||
JSON
|
JSON
|
||||||
page.driver.post(activity_streams_photos_path, json.merge!(:auth_token => @me.authentication_token))
|
page.driver.post(activity_streams_photos_path, json.merge!(:auth_token => @me.authentication_token))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Then /^I should see an uploaded image within the photo drop zone$/ do
|
||||||
|
find("#photodropzone img")["src"].should include("uploads/images")
|
||||||
|
end
|
||||||
Loading…
Reference in a new issue