From 07d979b38ff6493d24a64425aed310aa1b56eda6 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Wed, 5 Mar 2014 14:07:07 +1100 Subject: [PATCH] Collapse specs into one, halves spec runtime --- .../consumer/shopping/shopping_spec.rb | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/spec/features/consumer/shopping/shopping_spec.rb b/spec/features/consumer/shopping/shopping_spec.rb index 6c201bb92f..75a512ecf9 100644 --- a/spec/features/consumer/shopping/shopping_spec.rb +++ b/spec/features/consumer/shopping/shopping_spec.rb @@ -196,30 +196,25 @@ feature "As a consumer I want to shop with a distributor", js: true do exchange end - it "shows on hand products" do + it "filters products based on availability" do + # It shows on hand products page.should have_content p1.name page.should have_content p4.name - end - it "shows on demand products" do + # It shows on demand products page.should have_content p2.name - end - it "does not show products that are neither on hand or on demand" do + # It does not show products that are neither on hand or on demand page.should_not have_content p3.name - end - it "shows on demand variants" do + # It shows on demand variants within(".product-#{p4.id}") { find(".expand", visible: true).trigger "click" } page.should have_content v3.options_text - end - it "does not show variants that are neither on hand or on demand" do - within(".product-#{p4.id}") { find(".expand", visible: true).trigger "click" } + # It does not show variants that are neither on hand or on demand page.should_not have_content v2.options_text - end - it "does not show products that have no available variants in this distribution" do + # It does not show products that have no available variants in this distribution page.should_not have_content p5.name end end