From 2b48b4ee1859239ff791f213b7bbd265453fb594 Mon Sep 17 00:00:00 2001 From: Rob Harrington Date: Fri, 1 Jun 2018 09:42:50 +1000 Subject: [PATCH] Update cart_spec to work with Selenium --- spec/features/consumer/shopping/cart_spec.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/features/consumer/shopping/cart_spec.rb b/spec/features/consumer/shopping/cart_spec.rb index e0ce56cedc..09d4821f1c 100644 --- a/spec/features/consumer/shopping/cart_spec.rb +++ b/spec/features/consumer/shopping/cart_spec.rb @@ -154,7 +154,9 @@ feature "full-page cart", js: true do visit spree.cart_path variant.update_attributes! on_hand: 2 - fill_in "order_line_items_attributes_0_quantity", with: '4' + accept_alert do + fill_in "order_line_items_attributes_0_quantity", with: '4' + end click_button 'Update' expect(page).to have_content "Insufficient stock available, only 2 remaining"