User new direct uploads controllers action on imageable.

This commit is contained in:
Senén Rodero Rodríguez
2017-09-19 12:00:59 +02:00
parent 824dd26d5a
commit 966ff4dc03
19 changed files with 225 additions and 135 deletions

View File

@@ -45,7 +45,7 @@ shared_examples "nested imageable" do |imageable_factory_name, path, imageable_p
imageable_attach_new_file(imageable_factory_name, "spec/fixtures/files/clippy.jpg")
expect(page).to have_css("##{imageable_factory_name}_image_attributes_title[value$='clippy.jpg']")
expect(find("##{imageable_factory_name}_image_attributes_title").value).to eq("clippy.jpg")
end
scenario "Should not update nested image file title with file name after choosing a file when title already defined", :js do
@@ -98,7 +98,6 @@ shared_examples "nested imageable" do |imageable_factory_name, path, imageable_p
end
scenario "Should show nested image errors after unvalid form submit", :js do
page.driver.resize_window 1200, 2000
login_as user
visit send(path, arguments)
@@ -130,7 +129,7 @@ shared_examples "nested imageable" do |imageable_factory_name, path, imageable_p
click_link "Remove image"
end
expect(page).to have_content "Image was deleted successfully."
expect(page).not_to have_css "#nested_image"
end
scenario "Should show successful notice when resource filled correctly without any nested images", :js do