diff --git a/spec/features/consumer/shopping/shopping_spec.rb b/spec/features/consumer/shopping/shopping_spec.rb index 0a9dec3a17..385f5581f9 100644 --- a/spec/features/consumer/shopping/shopping_spec.rb +++ b/spec/features/consumer/shopping/shopping_spec.rb @@ -251,7 +251,7 @@ feature "As a consumer I want to shop with a distributor", js: true do # -- Max quantity open_bulk_quantity_modal(variant) - click_add_bulk_max_to_cart variant, 1 + click_add_bulk_max_to_cart 1 expect(order.reload.line_items.first.max_quantity).to eq(7) @@ -406,7 +406,7 @@ feature "As a consumer I want to shop with a distributor", js: true do it "does not update max_quantity" do click_add_bulk_to_cart variant, 2 - click_add_bulk_max_to_cart variant, 1 + click_add_bulk_max_to_cart 1 close_modal variant.update! on_hand: 1 diff --git a/spec/support/request/shop_workflow.rb b/spec/support/request/shop_workflow.rb index b1ede3ae8c..99a9a3cdd2 100644 --- a/spec/support/request/shop_workflow.rb +++ b/spec/support/request/shop_workflow.rb @@ -71,7 +71,7 @@ module ShopWorkflow wait_for_cart end - def click_add_bulk_max_to_cart(variant = nil, quantity = 1) + def click_add_bulk_max_to_cart(quantity = 1) within(".reveal-modal") do quantity.times do page.all("button", text: increase_quantity_symbol).last.click