Fix broken new property button in properties page

This commit is contained in:
Luis Ramos
2020-03-24 16:12:35 +00:00
parent 8dfdc9bc15
commit bddfa95eb5
2 changed files with 28 additions and 1 deletions

View File

@@ -1,2 +1,2 @@
$("#new_property").html('<%= escape_javascript(render :template => "spree/admin/properties/new", :formats => [:html], :handlers => [:erb]) %>');
$("#new_property").html('<%= escape_javascript(render :template => "spree/admin/properties/new", :formats => [:html], :handlers => [:haml]) %>');
$("#new_property_link").parent().hide();

View File

@@ -0,0 +1,27 @@
# frozen_string_literal: true
require "spec_helper"
feature '
As an admin
I want to manage product properties
' do
include AuthenticationWorkflow
scenario "creating and editing a property" do
login_to_admin_section
visit spree.admin_properties_path
click_link 'New Property'
fill_in 'property_name', with: 'New property!'
fill_in 'property_presentation', with: 'New property presentation!'
click_button 'Create'
expect(page).to have_content 'New property!'
page.find('td.actions a.icon-edit').click
expect(page).to have_field 'property_name', with: 'New property!'
fill_in 'property_name', with: 'New changed property!'
click_button 'Update'
expect(page).to have_content 'New changed property!'
end
end