Update shopping_spec to work with Selenium

This commit is contained in:
Rob Harrington
2018-06-01 09:43:27 +10:00
committed by luisramos0
parent 2b48b4ee18
commit eccf874f03

View File

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