From 0ceba7c0a817cdf6c68543591bd27c153dffb1ee Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Mon, 30 Nov 2020 10:02:57 +0000 Subject: [PATCH] Update orders closing message --- app/assets/stylesheets/darkswarm/_shop-navigation.scss | 4 ---- app/views/enterprises/_change_order_cycle.html.haml | 3 ++- config/locales/en.yml | 1 + spec/features/consumer/shopping/shopping_spec.rb | 4 ++-- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/app/assets/stylesheets/darkswarm/_shop-navigation.scss b/app/assets/stylesheets/darkswarm/_shop-navigation.scss index 3251aa2f96..8ed5400ed9 100644 --- a/app/assets/stylesheets/darkswarm/_shop-navigation.scss +++ b/app/assets/stylesheets/darkswarm/_shop-navigation.scss @@ -170,10 +170,6 @@ shop ordercycle { float: none; padding: 0; } - - .no-message-pad { - padding: 0.95rem; - } } form.custom { diff --git a/app/views/enterprises/_change_order_cycle.html.haml b/app/views/enterprises/_change_order_cycle.html.haml index b6186ba8b6..7ef49f9d62 100644 --- a/app/views/enterprises/_change_order_cycle.html.haml +++ b/app/views/enterprises/_change_order_cycle.html.haml @@ -4,7 +4,8 @@ %div{"ng-if" => "closesInLessThan3Months()"} = t :enterprises_next_closing %strong {{ OrderCycle.orders_close_at() | date_in_words }} - %div.no-message-pad{"ng-if" => "!closesInLessThan3Months()"} + %div{"ng-if" => "!closesInLessThan3Months()"} + = t :enterprises_currently_open %div{"ng-if" => "!OrderCycle.selected()"} = t :enterprises_choose diff --git a/config/locales/en.yml b/config/locales/en.yml index 1ba74c312d..e402dca133 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1677,6 +1677,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using shopping_producers_of_hub: "%{hub}'s producers:" enterprises_next_closing: "Next order closing" + enterprises_currently_open: "Orders are currently open" enterprises_ready_for: "Ready for" enterprises_choose: "Choose when you want your order:" diff --git a/spec/features/consumer/shopping/shopping_spec.rb b/spec/features/consumer/shopping/shopping_spec.rb index 9f3bba9236..3be9aa346e 100644 --- a/spec/features/consumer/shopping/shopping_spec.rb +++ b/spec/features/consumer/shopping/shopping_spec.rb @@ -62,9 +62,9 @@ feature "As a consumer I want to shop with a distributor", js: true do describe "when order cycle closes in more than 3 months" do before { oc1.update orders_close_at: 5.months.from_now } - it "does not show 'closing in' message" do + it "shows alternative to 'closing in' message" do visit shop_path - expect(page).not_to have_content "Next order closing in 2 days" + expect(page).to have_content "Orders are currently open" end end end