diff --git a/Changelog.md b/Changelog.md index c343a24b0..a23a4fc07 100644 --- a/Changelog.md +++ b/Changelog.md @@ -9,6 +9,7 @@ * exec foreman in ./script/server to replace the process so that we can Ctrl+C it again. * Include our custom fileuploader on the mobile site too. [#3994](https://github.com/diaspora/diaspora/pull/3994) * Move custom splash page logic into the controller [#3991](https://github.com/diaspora/diaspora/issues/3991) +* Fixed removing images from publisher on the profile and tags pages. [#3995](https://github.com/diaspora/diaspora/pull/3995) # 0.0.3.0 diff --git a/app/views/photos/_new_photo.haml b/app/views/photos/_new_photo.haml index 643b2d21c..868b0a337 100644 --- a/app/views/photos/_new_photo.haml +++ b/app/views/photos/_new_photo.haml @@ -65,7 +65,7 @@ $('.x').bind('click', function(){ var photo = $(this).closest('.publisher_photo'); photo.addClass("dim"); - $.ajax({url: "photos/" + photo.children('img').attr('data-id'), + $.ajax({url: "/photos/" + photo.children('img').attr('data-id'), dataType: 'json', type: 'DELETE', success: function() { diff --git a/features/posts_from_profile_page.feature b/features/posts_from_profile_page.feature index 99f69c6d5..6aa2f5fc3 100644 --- a/features/posts_from_profile_page.feature +++ b/features/posts_from_profile_page.feature @@ -7,13 +7,13 @@ Feature: posting from own profile page Given I am on the home page And a user with username "alice" When I sign in as "alice@alice.alice" - Given I have following aspects: | Family | | Work | + Given I am on "alice@alice.alice"'s page Scenario: posting some text - Given I am on "alice@alice.alice"'s page + Given I expand the publisher And I have turned off jQuery effects And I append "I want to understand people" to the publisher And I select "Family" on the aspect dropdown @@ -45,3 +45,12 @@ Feature: posting from own profile page When I am on the home page Then I should see a "img" within ".stream_element div.photo_attachments" And I should see "who am I?" within ".stream_element" + + Scenario: back out of posting a photo-only post + Given I expand the publisher + And I have turned off jQuery effects + When I attach the file "spec/fixtures/button.png" to hidden element "file" within "#file-upload" + And I wait for the ajax to finish + And I click to delete the first uploaded photo + And I wait for the ajax to finish + Then I should not see an uploaded image within the photo drop zone