From eccf874f031e8d7625a404fdc3b9462030d4c27e Mon Sep 17 00:00:00 2001 From: Rob Harrington Date: Fri, 1 Jun 2018 09:43:27 +1000 Subject: [PATCH] Update shopping_spec to work with Selenium --- spec/features/consumer/shopping/shopping_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/features/consumer/shopping/shopping_spec.rb b/spec/features/consumer/shopping/shopping_spec.rb index 72584d5de7..4b18a62434 100644 --- a/spec/features/consumer/shopping/shopping_spec.rb +++ b/spec/features/consumer/shopping/shopping_spec.rb @@ -109,10 +109,10 @@ feature "As a consumer I want to shop with a distributor", js: true do page.should have_content with_currency(19.99) # -- Cart should be cleared - # ng-animate means that the old product row is likely to be present, so we explicitly - # fill in the quantity in the incoming row + # ng-animate means that the old product row is likely to be present, so we ensure + # that we are not filling in the quantity on the outgoing row page.should_not have_selector "tr.product-cart" - within('product.ng-enter') { fill_in "variants[#{variant.id}]", with: 1 } + within('product:not(.ng-leave)') { fill_in "variants[#{variant.id}]", with: 1 } within("li.cart") { page.should have_content with_currency(19.99) } end