Fix issues causing enterprise fee tests to break

This commit is contained in:
Rob H
2013-02-15 14:10:56 +11:00
parent 68246e08d2
commit 046eb256ff
3 changed files with 5 additions and 4 deletions

View File

@@ -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);
}
}

View File

@@ -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'

View File

@@ -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