mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Fix broken new property button in properties page
This commit is contained in:
@@ -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();
|
||||
|
||||
27
spec/features/admin/properties_spec.rb
Normal file
27
spec/features/admin/properties_spec.rb
Normal 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
|
||||
Reference in New Issue
Block a user