mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Adding the require ship address flag to admin UI:
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
/ insert_bottom "[data-hook='admin_shipping_method_form_availability_fields'] > fieldset"
|
||||
|
||||
= f.field_container :shipping_requirements do
|
||||
= f.label :require_ship_address, "Requires shipping address?"
|
||||
= f.check_box :require_ship_address
|
||||
@@ -70,6 +70,14 @@ feature 'shipping methods' do
|
||||
login_to_admin_as enterprise_user
|
||||
end
|
||||
|
||||
it "lets me choose whether a shipping address is required" do
|
||||
click_link "Enterprises"
|
||||
within(".enterprise-#{distributor1.id}") { click_link 'Shipping Methods' }
|
||||
click_link 'New Shipping Method'
|
||||
|
||||
page.should have_content "Requires shipping address?"
|
||||
end
|
||||
|
||||
it "creates shipping methods" do
|
||||
click_link 'Enterprises'
|
||||
within(".enterprise-#{distributor1.id}") { click_link 'Shipping Methods' }
|
||||
|
||||
Reference in New Issue
Block a user