mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-01 02:03:22 +00:00
Fix issues causing enterprise fee tests to break
This commit is contained in:
@@ -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 = '<a href="'+url+'" class="delete-resource" data-confirm="Are you sure?"><img alt="Delete" src="/assets/admin/icons/delete.png" /> Delete</a>';
|
||||
var html = '<a href="'+url+'" class="delete-resource icon_link with-tip icon-trash no-text" data-action="remove" data-confirm="Are you sure?" url="'+url+'"></a>';
|
||||
//var html = '<a href="'+url+'" class="delete-resource" data-confirm="Are you sure?"><img alt="Delete" src="/assets/admin/icons/delete.png" /> Delete</a>';
|
||||
element.append(html);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user