diff --git a/app/views/shopping_shared/_order_cycles.html.haml b/app/views/shopping_shared/_order_cycles.html.haml index 24148411fe..eb83cf70e7 100644 --- a/app/views/shopping_shared/_order_cycles.html.haml +++ b/app/views/shopping_shared/_order_cycles.html.haml @@ -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 diff --git a/spec/features/consumer/shopping/shopping_spec.rb b/spec/features/consumer/shopping/shopping_spec.rb index 429f4ba3d3..bc9f98b061 100644 --- a/spec/features/consumer/shopping/shopping_spec.rb +++ b/spec/features/consumer/shopping/shopping_spec.rb @@ -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