From 2149ce7c940b2805852bbe94a0198c82a50e5044 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Wed, 10 Mar 2021 15:47:35 +1100 Subject: [PATCH] Reduce run time of specs by combining them It's better style to have those specs independent but we also have a need for fast tests. --- spec/features/consumer/shopping/checkout_spec.rb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/spec/features/consumer/shopping/checkout_spec.rb b/spec/features/consumer/shopping/checkout_spec.rb index 42f5b3d8e2..5cc8bf280c 100644 --- a/spec/features/consumer/shopping/checkout_spec.rb +++ b/spec/features/consumer/shopping/checkout_spec.rb @@ -119,15 +119,16 @@ feature "As a consumer I want to check out my cart", js: true do end end - it "doesn't tell about previous orders" do + it "shows only applicable content" do + # Unifying several specs here to speed up test run. + + # it doesn't tell about previous orders expect(page).to have_no_content("You have an order for this order cycle already.") - end - it "doesn't show link to terms and conditions" do + # doesn't show link to terms and conditions expect(page).to have_no_link("Terms and Conditions") - end - it "doesn't show link to platform terms of service" do + # doesn't show link to platform terms of service expect(page).to have_no_link("Terms of Service") end end