mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Merge pull request #6267 from jhsu802701/rubocop_shopworkflow_2
Removed variant argument from click_add_bulk_max_to_cart
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user