mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Merge pull request #5347 from luisramos0/hide_oc_selector_for_private_shop
[Mobile] Hide OC selector if shop requires login/customer
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
- content_for :injection_data do
|
||||
= inject_current_order_cycle
|
||||
|
||||
- unless no_open_order_cycles?
|
||||
- unless no_open_order_cycles? || require_customer?
|
||||
%ordercycle{"ng-controller" => "OrderCycleCtrl", "ng-cloak" => true,
|
||||
"ng-class" => "{'requires-selection': !OrderCycle.selected()}"}
|
||||
%form.custom
|
||||
|
||||
@@ -495,6 +495,7 @@ feature "As a consumer I want to shop with a distributor", js: true do
|
||||
expect(page).to have_content "Only approved customers can access this shop."
|
||||
expect(page).to have_content "login or signup"
|
||||
expect(page).to have_no_content product.name
|
||||
expect(page).not_to have_selector "ordercycle"
|
||||
end
|
||||
end
|
||||
|
||||
@@ -512,6 +513,7 @@ feature "As a consumer I want to shop with a distributor", js: true do
|
||||
expect(page).to have_content "Only approved customers can access this shop."
|
||||
expect(page).to have_content "please contact #{distributor.name}"
|
||||
expect(page).to have_no_content product.name
|
||||
expect(page).not_to have_selector "ordercycle"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user