diff --git a/app/assets/javascripts/admin/enterprise_fees.js b/app/assets/javascripts/admin/enterprise_fees.js index e73ff0dfcf..730df4be7c 100644 --- a/app/assets/javascripts/admin/enterprise_fees.js +++ b/app/assets/javascripts/admin/enterprise_fees.js @@ -23,7 +23,8 @@ angular.module('enterprise_fees', []) return function(scope, element, attrs) { if(scope.enterprise_fee.id) { var url = "/admin/enterprise_fees/" + scope.enterprise_fee.id - var html = 'Delete Delete'; + var html = ''; + //var html = 'Delete Delete'; element.append(html); } } diff --git a/app/views/admin/enterprise_fees/index.html.haml b/app/views/admin/enterprise_fees/index.html.haml index 82a133fa4f..8bf3135b8a 100644 --- a/app/views/admin/enterprise_fees/index.html.haml +++ b/app/views/admin/enterprise_fees/index.html.haml @@ -17,7 +17,7 @@ %th Name %th Calculator %th Calculator values - %th + %th.actions %tbody = enterprise_fee_set_form.ng_fields_for :collection do |f| %tr{'ng-repeat' => 'enterprise_fee in enterprise_fees | filter:query'} @@ -28,6 +28,6 @@ %td= f.ng_text_field :name %td= f.ng_collection_select :calculator_type, @calculators, :name, :description, 'enterprise_fee.calculator_type', {'class' => 'calculator_type', 'ng-model' => 'calculatorType', 'spree-ensure-calculator-preferences-match-type' => "1"} %td{'ng-bind-html-unsafe-compiled' => 'enterprise_fee.calculator_settings'} - %td{'spree-delete-resource' => "1"} + %td.actions{'spree-delete-resource' => "1"} = enterprise_fee_set_form.submit 'Update' diff --git a/spec/features/admin/enterprise_fees_spec.rb b/spec/features/admin/enterprise_fees_spec.rb index 39451624c0..35e8d95407 100644 --- a/spec/features/admin/enterprise_fees_spec.rb +++ b/spec/features/admin/enterprise_fees_spec.rb @@ -83,7 +83,7 @@ feature %q{ click_link 'Enterprise Fees' # And I click delete - click_link 'Delete' + find("a.delete-resource").click page.driver.browser.switch_to.alert.accept # Then my enterprise fee should have been deleted