mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-29 21:17:17 +00:00
Fix failed customers filter spec
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
angular.module("admin.orders").directive 'customerSearchOverride', ->
|
||||
restrict: 'C'
|
||||
link: (scope, element, attr) ->
|
||||
console.log('customerSearchOverride C')
|
||||
formatCustomerResult = (customer) ->
|
||||
customerTemplate
|
||||
customer: customer
|
||||
@@ -40,7 +39,6 @@ angular.module("admin.orders").directive 'customerSearchOverride', ->
|
||||
]
|
||||
attribute_wrapper = '#order_' + address + '_attributes_'
|
||||
if data # modified
|
||||
console.log('xiebing')
|
||||
_.each address_parts, (part) ->
|
||||
$(attribute_wrapper + part).val data[part]
|
||||
return
|
||||
|
||||
@@ -10,7 +10,7 @@ feature %q{
|
||||
background do
|
||||
@user = create(:user)
|
||||
@product = create(:simple_product)
|
||||
@distributor = create(:distributor_enterprise, charges_sales_tax: true)
|
||||
@distributor = create(:distributor_enterprise, owner: @user, charges_sales_tax: true)
|
||||
@order_cycle = create(:simple_order_cycle, name: 'One', distributors: [@distributor], variants: [@product.variants.first])
|
||||
|
||||
@order = create(:order_with_totals_and_distribution, user: @user, distributor: @distributor, order_cycle: @order_cycle, state: 'complete', payment_state: 'balance_due')
|
||||
@@ -126,7 +126,9 @@ feature %q{
|
||||
@order.save!
|
||||
|
||||
# When I create a new order
|
||||
login_to_admin_section
|
||||
quick_login_as @user
|
||||
visit spree.admin_path
|
||||
|
||||
visit '/admin/orders'
|
||||
click_link 'New Order'
|
||||
select2_select @distributor.name, from: 'order_distributor_id'
|
||||
|
||||
Reference in New Issue
Block a user