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