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:
Luis Ramos
2020-05-06 14:31:52 +01:00
committed by GitHub
2 changed files with 3 additions and 1 deletions

View File

@@ -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

View File

@@ -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