mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Changing the way select filters are reset on BOM to try and fix specs
This commit is contained in:
@@ -29,9 +29,9 @@ angular.module("admin.lineItems").controller 'LineItemsCtrl', ($scope, $http, $q
|
||||
LineItems.allSaved() || confirm("Unsaved changes exist and will be lost if you continue.")
|
||||
|
||||
$scope.resetSelectFilters = ->
|
||||
$scope.distributorFilter = $scope.distributors[0].id
|
||||
$scope.supplierFilter = $scope.suppliers[0].id
|
||||
$scope.orderCycleFilter = $scope.orderCycles[0].id
|
||||
$scope.distributorFilter = blankOption().id
|
||||
$scope.supplierFilter = blankOption().id
|
||||
$scope.orderCycleFilter = blankOption().id
|
||||
$scope.quickSearch = ""
|
||||
|
||||
$scope.refreshData = ->
|
||||
|
||||
@@ -283,7 +283,7 @@ feature %q{
|
||||
|
||||
it "displays a select box for order cycles, which filters line items by the selected order cycle", retry: 3 do
|
||||
expect(page).to have_selector '#s2id_order_cycle_filter a.select2-choice', text: 'All'
|
||||
expect(page).to have_select2 'order_cycle_filter', options: OrderCycle.order('orders_close_at DESC').pluck(:name).unshift("All")
|
||||
expect(page).to have_select2 'order_cycle_filter', with_options: OrderCycle.pluck(:name).unshift("All")
|
||||
expect(page).to have_selector "tr#li_#{li1.id}"
|
||||
expect(page).to have_selector "tr#li_#{li2.id}"
|
||||
select2_select oc1.name, from: "order_cycle_filter"
|
||||
|
||||
Reference in New Issue
Block a user