Update #expect calls to count products correctly

This commit is contained in:
Matt-Yorkley
2021-07-09 16:13:44 +01:00
parent c1b85b7409
commit 447165f8a1

View File

@@ -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