From 447165f8a13cfa09f12b88805e27e80184c5917a Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Fri, 9 Jul 2021 16:13:44 +0100 Subject: [PATCH] Update #expect calls to count products correctly --- spec/features/consumer/shopping/shopping_spec.rb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/spec/features/consumer/shopping/shopping_spec.rb b/spec/features/consumer/shopping/shopping_spec.rb index 1261fd6ba1..00a00ac777 100644 --- a/spec/features/consumer/shopping/shopping_spec.rb +++ b/spec/features/consumer/shopping/shopping_spec.rb @@ -185,16 +185,15 @@ feature "As a consumer I want to shop with a distributor", js: true do visit shop_path select "turtles", from: "order_cycle_id" select "frogs", from: "order_cycle_id" - expect(page).to have_selector("product", count: 10) + expect(page).to have_selector("product.animate-repeat", count: 10) scroll_to(page.find(".product-listing"), align: :bottom) - expect(page).to_not have_content "Loading..." - expect(page).to have_selector("product", count: 20) + expect(page).to have_selector("product.animate-repeat", count: 20) scroll_to(page.find("distributor")) select "turtles", from: "order_cycle_id" - expect(page).to have_selector("product", count: 10) + expect(page).to have_selector("product.animate-repeat", count: 10) scroll_to(page.find(".product-listing"), align: :bottom) - expect(page).to have_selector("product", count: 20) + expect(page).to have_selector("product.animate-repeat", count: 20) end end end