From 483e9d80bcbbcf8c0e36a6b308660256feb55a67 Mon Sep 17 00:00:00 2001 From: Rob H Date: Thu, 6 Mar 2014 13:21:31 +1100 Subject: [PATCH] BOM: filters work in combination --- .../admin/bulk_order_management_spec.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/spec/features/admin/bulk_order_management_spec.rb b/spec/features/admin/bulk_order_management_spec.rb index 15d4f8bd78..fd15fff4b9 100644 --- a/spec/features/admin/bulk_order_management_spec.rb +++ b/spec/features/admin/bulk_order_management_spec.rb @@ -229,6 +229,23 @@ feature %q{ page.should have_selector "tr#li_#{li1.id}", visible: true page.should have_selector "tr#li_#{li2.id}", visible: true end + + it "allows filters to be used in combination" do + select oc1.name, from: "order_cycle_filter" + page.should have_selector "tr#li_#{li1.id}", visible: true + page.should_not have_selector "tr#li_#{li2.id}", visible: true + select d1.name, from: "distributor_filter" + select s1.name, from: "supplier_filter" + page.should have_selector "tr#li_#{li1.id}", visible: true + page.should_not have_selector "tr#li_#{li2.id}", visible: true + select d2.name, from: "distributor_filter" + select s2.name, from: "supplier_filter" + page.should_not have_selector "tr#li_#{li1.id}", visible: true + page.should_not have_selector "tr#li_#{li2.id}", visible: true + select oc2.name, from: "order_cycle_filter" + page.should_not have_selector "tr#li_#{li1.id}", visible: true + page.should have_selector "tr#li_#{li2.id}", visible: true + end end context "using date restriction controls" do