From ba9de403e6237adbc5181caa304265fcbf1708cd Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Thu, 25 Feb 2021 16:55:51 +1100 Subject: [PATCH 01/10] Add admin option to require shoppers agree to TOS This switch doesn't have any effect yet. We need to implement it in the checkout. --- app/models/spree/app_configuration.rb | 1 + app/views/spree/admin/general_settings/edit.html.haml | 3 +++ config/locales/en.yml | 1 + 3 files changed, 5 insertions(+) diff --git a/app/models/spree/app_configuration.rb b/app/models/spree/app_configuration.rb index 67b843a4ce..c6b317023e 100644 --- a/app/models/spree/app_configuration.rb +++ b/app/models/spree/app_configuration.rb @@ -113,6 +113,7 @@ module Spree # Legal Preferences preference :footer_tos_url, :string, default: "/Terms-of-service.pdf" preference :enterprises_require_tos, :boolean, default: false + preference :shoppers_require_tos, :boolean, default: false preference :privacy_policy_url, :string, default: nil preference :cookies_consent_banner_toggle, :boolean, default: false preference :cookies_policy_matomo_section, :boolean, default: false diff --git a/app/views/spree/admin/general_settings/edit.html.haml b/app/views/spree/admin/general_settings/edit.html.haml index 9201fa00cb..d7014627b7 100644 --- a/app/views/spree/admin/general_settings/edit.html.haml +++ b/app/views/spree/admin/general_settings/edit.html.haml @@ -32,6 +32,9 @@ .field = preference_field_tag(:enterprises_require_tos, Spree::Config[:enterprises_require_tos], :type => Spree::Config.preference_type(:enterprises_require_tos)) = label_tag(:enterprises_require_tos, t('.enterprises_require_tos')) + tag(:br) + .field + = preference_field_tag(:shoppers_require_tos, Spree::Config[:shoppers_require_tos], :type => Spree::Config.preference_type(:shoppers_require_tos)) + = label_tag(:shoppers_require_tos, t('.shoppers_require_tos')) + tag(:br) .field = preference_field_tag(:cookies_consent_banner_toggle, Spree::Config[:cookies_consent_banner_toggle], :type => Spree::Config.preference_type(:cookies_consent_banner_toggle)) = label_tag(:cookies_consent_banner_toggle, t('.cookies_consent_banner_toggle')) + tag(:br) diff --git a/config/locales/en.yml b/config/locales/en.yml index 8aefff8022..77f55f420c 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -3582,6 +3582,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using cookies_consent_banner_toggle: "Display cookies consent banner" privacy_policy_url: "Privacy Policy URL" enterprises_require_tos: "Enterprises must accept Terms of Service" + shoppers_require_tos: "Shoppers must accept Terms of Service" cookies_policy_matomo_section: "Display Matomo section on cookies policy page" footer_tos_url: "Terms of Service URL" checkout: From ee66a096e223cdf732658cb2aebbae7ffefd1944 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Thu, 25 Feb 2021 16:58:09 +1100 Subject: [PATCH 02/10] Ignore uploaded Ts&Cs for version control We do that for other uploaded files already. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 6607473215..8c3ebf892c 100644 --- a/.gitignore +++ b/.gitignore @@ -31,6 +31,7 @@ app/public public/system public/stylesheets public/images +public/files public/spree public/assets config/abr.yml From 0e8745adc3a73ce4e7688f87fc8a919ccd328c3e Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Fri, 5 Mar 2021 15:44:24 +1100 Subject: [PATCH 03/10] Remove passing of unused variable --- app/views/checkout/_form.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/checkout/_form.html.haml b/app/views/checkout/_form.html.haml index 362586974c..f1df23fee0 100644 --- a/app/views/checkout/_form.html.haml +++ b/app/views/checkout/_form.html.haml @@ -15,7 +15,7 @@ = render "checkout/shipping", f: f = render "checkout/payment", f: f = render "checkout/already_ordered", f: f if show_bought_items? - = render "checkout/terms_and_conditions", f: f + = render "checkout/terms_and_conditions" %p %button.button.primary{ type: :submit, ng: { disabled: "terms_and_conditions_activated && !terms_and_conditions_accepted" } } = t :checkout_send From 561da1f8344d6a527b78777147102fbb8f318650 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Fri, 5 Mar 2021 16:58:30 +1100 Subject: [PATCH 04/10] Show Terms of Service at checkout if required The checkout page shows a checkbox to accept the platform's Terms of Service. Ticking the box doesn't have any effect yet but at least people are aware and are presented with a link to the terms. --- app/helpers/terms_and_conditions_helper.rb | 4 ++++ app/views/checkout/_form.html.haml | 1 + .../_platform_terms_of_service.html.haml | 4 ++++ config/locales/en.yml | 3 +++ .../consumer/shopping/checkout_spec.rb | 19 +++++++++++++++++++ .../terms_and_conditions_helper_spec.rb | 15 +++++++++++++++ 6 files changed, 46 insertions(+) create mode 100644 app/views/checkout/_platform_terms_of_service.html.haml create mode 100644 spec/helpers/terms_and_conditions_helper_spec.rb diff --git a/app/helpers/terms_and_conditions_helper.rb b/app/helpers/terms_and_conditions_helper.rb index ef50459edb..554272dcd8 100644 --- a/app/helpers/terms_and_conditions_helper.rb +++ b/app/helpers/terms_and_conditions_helper.rb @@ -1,6 +1,10 @@ # frozen_string_literal: true module TermsAndConditionsHelper + def platform_terms_required? + Spree::Config.shoppers_require_tos + end + def terms_and_conditions_activated? current_order.distributor.terms_and_conditions.file? end diff --git a/app/views/checkout/_form.html.haml b/app/views/checkout/_form.html.haml index f1df23fee0..0b84cb8edc 100644 --- a/app/views/checkout/_form.html.haml +++ b/app/views/checkout/_form.html.haml @@ -16,6 +16,7 @@ = render "checkout/payment", f: f = render "checkout/already_ordered", f: f if show_bought_items? = render "checkout/terms_and_conditions" + = render "checkout/platform_terms_of_service" if platform_terms_required? %p %button.button.primary{ type: :submit, ng: { disabled: "terms_and_conditions_activated && !terms_and_conditions_accepted" } } = t :checkout_send diff --git a/app/views/checkout/_platform_terms_of_service.html.haml b/app/views/checkout/_platform_terms_of_service.html.haml new file mode 100644 index 0000000000..9446c2c939 --- /dev/null +++ b/app/views/checkout/_platform_terms_of_service.html.haml @@ -0,0 +1,4 @@ +%p + %input{ type: "checkbox", id: "platform_tos_accepted" } + %label.small{for: "platform_tos_accepted"} + = t(".message_html", tos_link: link_to(t(".terms_of_service"), Spree::Config.footer_tos_url, target: "_blank")) diff --git a/config/locales/en.yml b/config/locales/en.yml index 77f55f420c..e5bfb73a18 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1246,6 +1246,9 @@ en: terms_and_conditions: message_html: "I agree to the seller's %{terms_and_conditions_link}." link_text: "Terms and Conditions" + platform_terms_of_service: + message_html: "I agree to the platform %{tos_link}." + terms_of_service: "Terms of Service" failed: "The checkout failed. Please let us know so that we can process your order." shops: hubs: diff --git a/spec/features/consumer/shopping/checkout_spec.rb b/spec/features/consumer/shopping/checkout_spec.rb index 4ed2f2e262..42f5b3d8e2 100644 --- a/spec/features/consumer/shopping/checkout_spec.rb +++ b/spec/features/consumer/shopping/checkout_spec.rb @@ -126,6 +126,10 @@ feature "As a consumer I want to check out my cart", js: true do it "doesn't show link to terms and conditions" do expect(page).to have_no_link("Terms and Conditions") end + + it "doesn't show link to platform terms of service" do + expect(page).to have_no_link("Terms of Service") + end end context "when distributor has T&Cs" do @@ -171,6 +175,21 @@ feature "As a consumer I want to check out my cart", js: true do end end + context "when the platform's terms of service have to be accepted" do + let(:tos_url) { "https://example.org/tos" } + + before do + allow(Spree::Config).to receive(:shoppers_require_tos).and_return(true) + allow(Spree::Config).to receive(:footer_tos_url).and_return(tos_url) + end + + it "shows a link to the terms" do + visit checkout_path + expect(page).to have_link("Terms of Service", href: tos_url) + expect(find_link("Terms of Service")[:target]).to eq "_blank" + end + end + context "with previous orders" do let!(:prev_order) { create(:completed_order_with_totals, order_cycle: order_cycle, distributor: distributor, user: order.user) } diff --git a/spec/helpers/terms_and_conditions_helper_spec.rb b/spec/helpers/terms_and_conditions_helper_spec.rb new file mode 100644 index 0000000000..3878891b28 --- /dev/null +++ b/spec/helpers/terms_and_conditions_helper_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +describe TermsAndConditionsHelper, type: :helper do + describe "#platform_terms_required?" do + it "returns true" do + expect(Spree::Config).to receive(:shoppers_require_tos).and_return(true) + expect(helper.platform_terms_required?).to eq true + end + + it "returns false" do + expect(Spree::Config).to receive(:shoppers_require_tos).and_return(false) + expect(helper.platform_terms_required?).to eq false + end + end +end From 2149ce7c940b2805852bbe94a0198c82a50e5044 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Wed, 10 Mar 2021 15:47:35 +1100 Subject: [PATCH 05/10] Reduce run time of specs by combining them It's better style to have those specs independent but we also have a need for fast tests. --- spec/features/consumer/shopping/checkout_spec.rb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/spec/features/consumer/shopping/checkout_spec.rb b/spec/features/consumer/shopping/checkout_spec.rb index 42f5b3d8e2..5cc8bf280c 100644 --- a/spec/features/consumer/shopping/checkout_spec.rb +++ b/spec/features/consumer/shopping/checkout_spec.rb @@ -119,15 +119,16 @@ feature "As a consumer I want to check out my cart", js: true do end end - it "doesn't tell about previous orders" do + it "shows only applicable content" do + # Unifying several specs here to speed up test run. + + # it doesn't tell about previous orders expect(page).to have_no_content("You have an order for this order cycle already.") - end - it "doesn't show link to terms and conditions" do + # doesn't show link to terms and conditions expect(page).to have_no_link("Terms and Conditions") - end - it "doesn't show link to platform terms of service" do + # doesn't show link to platform terms of service expect(page).to have_no_link("Terms of Service") end end From b266c9df34de68c915b22625437169fa6d41917d Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Wed, 10 Mar 2021 15:40:13 +1100 Subject: [PATCH 06/10] Enable checkout button only when terms accepted This was working with the seller's terms but now it includes the platform's terms as well. Pending: - Simplify Ansible code - Unify the two terms checkboxes if both required --- app/views/checkout/_form.html.haml | 2 +- .../_platform_terms_of_service.html.haml | 2 +- .../consumer/shopping/checkout_spec.rb | 40 ++++++++++++++++++- 3 files changed, 41 insertions(+), 3 deletions(-) diff --git a/app/views/checkout/_form.html.haml b/app/views/checkout/_form.html.haml index 0b84cb8edc..5c21b68744 100644 --- a/app/views/checkout/_form.html.haml +++ b/app/views/checkout/_form.html.haml @@ -18,6 +18,6 @@ = render "checkout/terms_and_conditions" = render "checkout/platform_terms_of_service" if platform_terms_required? %p - %button.button.primary{ type: :submit, ng: { disabled: "terms_and_conditions_activated && !terms_and_conditions_accepted" } } + %button.button.primary{ type: :submit, ng: { disabled: "(terms_and_conditions_activated && !terms_and_conditions_accepted) || platform_tos_accepted == false" } } = t :checkout_send / {{ checkout.$valid }} diff --git a/app/views/checkout/_platform_terms_of_service.html.haml b/app/views/checkout/_platform_terms_of_service.html.haml index 9446c2c939..2fdc57dcb1 100644 --- a/app/views/checkout/_platform_terms_of_service.html.haml +++ b/app/views/checkout/_platform_terms_of_service.html.haml @@ -1,4 +1,4 @@ %p - %input{ type: "checkbox", id: "platform_tos_accepted" } + %input{ type: "checkbox", id: "platform_tos_accepted", ng: { model: "platform_tos_accepted", init: "platform_tos_accepted = false" } } %label.small{for: "platform_tos_accepted"} = t(".message_html", tos_link: link_to(t(".terms_of_service"), Spree::Config.footer_tos_url, target: "_blank")) diff --git a/spec/features/consumer/shopping/checkout_spec.rb b/spec/features/consumer/shopping/checkout_spec.rb index 5cc8bf280c..7324a38e51 100644 --- a/spec/features/consumer/shopping/checkout_spec.rb +++ b/spec/features/consumer/shopping/checkout_spec.rb @@ -184,10 +184,48 @@ feature "As a consumer I want to check out my cart", js: true do allow(Spree::Config).to receive(:footer_tos_url).and_return(tos_url) end - it "shows a link to the terms" do + it "shows the terms which need to be accepted" do visit checkout_path expect(page).to have_link("Terms of Service", href: tos_url) expect(find_link("Terms of Service")[:target]).to eq "_blank" + expect(page).to have_button("Place order now", disabled: true) + + check "Terms of Service" + expect(page).to have_button("Place order now", disabled: false) + + uncheck "Terms of Service" + expect(page).to have_button("Place order now", disabled: true) + end + end + + context "when the seller's terms and the platform's terms have to be accepted" do + let(:fake_terms_and_conditions_path) { Rails.root.join("app/assets/images/logo-white.png") } + let(:terms_and_conditions_file) { Rack::Test::UploadedFile.new(fake_terms_and_conditions_path, "application/pdf") } + let(:tos_url) { "https://example.org/tos" } + + before do + order.distributor.terms_and_conditions = terms_and_conditions_file + order.distributor.save! + + allow(Spree::Config).to receive(:shoppers_require_tos).and_return(true) + allow(Spree::Config).to receive(:footer_tos_url).and_return(tos_url) + end + + it "shows links to both terms and all need accepting" do + visit checkout_path + + expect(page).to have_link("Terms and Conditions", href: order.distributor.terms_and_conditions.url) + expect(page).to have_link("Terms of Service", href: tos_url) + expect(page).to have_button("Place order now", disabled: true) + + check "Terms and Conditions" + expect(page).to have_button("Place order now", disabled: true) + + check "Terms of Service" + expect(page).to have_button("Place order now", disabled: false) + + uncheck "Terms and Conditions" + expect(page).to have_button("Place order now", disabled: true) end end From 4af0e611630108055f0a8c5e0a7fd61768c7dbb3 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Wed, 10 Mar 2021 16:32:06 +1100 Subject: [PATCH 07/10] Simplify logic for terms and conditions display Checking for `false` instead of a falsey value allows us to distinguish from an unset variable and disable the checkout button only when a checkbox is present and unticked. --- app/views/checkout/_form.html.haml | 2 +- app/views/checkout/_terms_and_conditions.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/checkout/_form.html.haml b/app/views/checkout/_form.html.haml index 5c21b68744..c63ed0f93f 100644 --- a/app/views/checkout/_form.html.haml +++ b/app/views/checkout/_form.html.haml @@ -18,6 +18,6 @@ = render "checkout/terms_and_conditions" = render "checkout/platform_terms_of_service" if platform_terms_required? %p - %button.button.primary{ type: :submit, ng: { disabled: "(terms_and_conditions_activated && !terms_and_conditions_accepted) || platform_tos_accepted == false" } } + %button.button.primary{ type: :submit, ng: { disabled: "terms_and_conditions_accepted == false || platform_tos_accepted == false" } } = t :checkout_send / {{ checkout.$valid }} diff --git a/app/views/checkout/_terms_and_conditions.html.haml b/app/views/checkout/_terms_and_conditions.html.haml index 05e0122ae7..13c0a1986e 100644 --- a/app/views/checkout/_terms_and_conditions.html.haml +++ b/app/views/checkout/_terms_and_conditions.html.haml @@ -1,4 +1,4 @@ - if terms_and_conditions_activated? %p - %input{ type: 'checkbox', id: 'accept_terms', ng: { model: "terms_and_conditions_accepted", init: "terms_and_conditions_activated=#{terms_and_conditions_activated?}; terms_and_conditions_accepted=#{terms_and_conditions_already_accepted?}" } } + %input{ type: 'checkbox', id: 'accept_terms', ng: { model: "terms_and_conditions_accepted", init: "terms_and_conditions_accepted=#{terms_and_conditions_already_accepted?}" } } %label.small{for: "accept_terms"}= t('.message_html', terms_and_conditions_link: link_to( t( '.link_text' ), current_order.distributor.terms_and_conditions.url, target: '_blank')) From f73c32ce4bafe28c769f328f5ecc9f1fd8c0c2f7 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Wed, 10 Mar 2021 16:44:32 +1100 Subject: [PATCH 08/10] Move rendering logic of terms to helper Preparing for a third option to display. --- app/helpers/terms_and_conditions_helper.rb | 10 ++++++++++ app/views/checkout/_form.html.haml | 3 +-- app/views/checkout/_terms_and_conditions.html.haml | 7 +++---- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/app/helpers/terms_and_conditions_helper.rb b/app/helpers/terms_and_conditions_helper.rb index 554272dcd8..1b86ce0dbe 100644 --- a/app/helpers/terms_and_conditions_helper.rb +++ b/app/helpers/terms_and_conditions_helper.rb @@ -1,6 +1,16 @@ # frozen_string_literal: true module TermsAndConditionsHelper + def render_terms_and_conditions + if platform_terms_required? && terms_and_conditions_activated? + render("checkout/terms_and_conditions") + render("checkout/platform_terms_of_service") + elsif platform_terms_required? + render "checkout/platform_terms_of_service" + elsif terms_and_conditions_activated? + render "checkout/terms_and_conditions" + end + end + def platform_terms_required? Spree::Config.shoppers_require_tos end diff --git a/app/views/checkout/_form.html.haml b/app/views/checkout/_form.html.haml index c63ed0f93f..84601fd410 100644 --- a/app/views/checkout/_form.html.haml +++ b/app/views/checkout/_form.html.haml @@ -15,8 +15,7 @@ = render "checkout/shipping", f: f = render "checkout/payment", f: f = render "checkout/already_ordered", f: f if show_bought_items? - = render "checkout/terms_and_conditions" - = render "checkout/platform_terms_of_service" if platform_terms_required? + = render_terms_and_conditions %p %button.button.primary{ type: :submit, ng: { disabled: "terms_and_conditions_accepted == false || platform_tos_accepted == false" } } = t :checkout_send diff --git a/app/views/checkout/_terms_and_conditions.html.haml b/app/views/checkout/_terms_and_conditions.html.haml index 13c0a1986e..e84b4b9c81 100644 --- a/app/views/checkout/_terms_and_conditions.html.haml +++ b/app/views/checkout/_terms_and_conditions.html.haml @@ -1,4 +1,3 @@ -- if terms_and_conditions_activated? - %p - %input{ type: 'checkbox', id: 'accept_terms', ng: { model: "terms_and_conditions_accepted", init: "terms_and_conditions_accepted=#{terms_and_conditions_already_accepted?}" } } - %label.small{for: "accept_terms"}= t('.message_html', terms_and_conditions_link: link_to( t( '.link_text' ), current_order.distributor.terms_and_conditions.url, target: '_blank')) +%p + %input{ type: 'checkbox', id: 'accept_terms', ng: { model: "terms_and_conditions_accepted", init: "terms_and_conditions_accepted=#{terms_and_conditions_already_accepted?}" } } + %label.small{for: "accept_terms"}= t('.message_html', terms_and_conditions_link: link_to( t( '.link_text' ), current_order.distributor.terms_and_conditions.url, target: '_blank')) From 20f11327b5a31ddfbf62c5af067fc1bd5d216e2e Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Wed, 10 Mar 2021 17:04:52 +1100 Subject: [PATCH 09/10] Show combined checkbox when all terms required The user should need to tick only one box to agree. We don't remember yet if someone agreed to the platform TOS and therefore the box is always unticked to start with. Remembering the agreement is another issue: https://github.com/openfoodfoundation/openfoodnetwork/issues/6328 --- app/helpers/terms_and_conditions_helper.rb | 2 +- app/views/checkout/_all_terms_and_conditions.html.haml | 4 ++++ config/locales/en.yml | 4 ++++ spec/features/consumer/shopping/checkout_spec.rb | 6 ++---- 4 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 app/views/checkout/_all_terms_and_conditions.html.haml diff --git a/app/helpers/terms_and_conditions_helper.rb b/app/helpers/terms_and_conditions_helper.rb index 1b86ce0dbe..c9e907d228 100644 --- a/app/helpers/terms_and_conditions_helper.rb +++ b/app/helpers/terms_and_conditions_helper.rb @@ -3,7 +3,7 @@ module TermsAndConditionsHelper def render_terms_and_conditions if platform_terms_required? && terms_and_conditions_activated? - render("checkout/terms_and_conditions") + render("checkout/platform_terms_of_service") + render("checkout/all_terms_and_conditions") elsif platform_terms_required? render "checkout/platform_terms_of_service" elsif terms_and_conditions_activated? diff --git a/app/views/checkout/_all_terms_and_conditions.html.haml b/app/views/checkout/_all_terms_and_conditions.html.haml new file mode 100644 index 0000000000..36314bdcfe --- /dev/null +++ b/app/views/checkout/_all_terms_and_conditions.html.haml @@ -0,0 +1,4 @@ +%p + %input{ type: 'checkbox', id: 'accept_terms', ng: { model: "terms_and_conditions_accepted", init: "terms_and_conditions_accepted=false" } } + %label.small{for: "accept_terms"} + = t('.message_html', terms_and_conditions_link: link_to( t(".terms_and_conditions"), current_order.distributor.terms_and_conditions.url, target: '_blank'), tos_link: link_to(t(".terms_of_service"), Spree::Config.footer_tos_url, target: "_blank")) diff --git a/config/locales/en.yml b/config/locales/en.yml index e5bfb73a18..fe50504b40 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1249,6 +1249,10 @@ en: platform_terms_of_service: message_html: "I agree to the platform %{tos_link}." terms_of_service: "Terms of Service" + all_terms_and_conditions: + message_html: "I agree to the seller's %{terms_and_conditions_link} and the platform %{tos_link}." + terms_and_conditions: "Terms and Conditions" + terms_of_service: "Terms of Service" failed: "The checkout failed. Please let us know so that we can process your order." shops: hubs: diff --git a/spec/features/consumer/shopping/checkout_spec.rb b/spec/features/consumer/shopping/checkout_spec.rb index 7324a38e51..14320170d7 100644 --- a/spec/features/consumer/shopping/checkout_spec.rb +++ b/spec/features/consumer/shopping/checkout_spec.rb @@ -218,13 +218,11 @@ feature "As a consumer I want to check out my cart", js: true do expect(page).to have_link("Terms of Service", href: tos_url) expect(page).to have_button("Place order now", disabled: true) + # Both Ts&Cs and TOS appear in the one label for the one checkbox. check "Terms and Conditions" - expect(page).to have_button("Place order now", disabled: true) - - check "Terms of Service" expect(page).to have_button("Place order now", disabled: false) - uncheck "Terms and Conditions" + uncheck "Terms of Service" expect(page).to have_button("Place order now", disabled: true) end end From 06f46c4e29ca916882aa15226e11c3b772a24a09 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Thu, 11 Mar 2021 11:18:12 +1100 Subject: [PATCH 10/10] Remove unnecessary comments --- spec/features/consumer/shopping/checkout_spec.rb | 5 ----- 1 file changed, 5 deletions(-) diff --git a/spec/features/consumer/shopping/checkout_spec.rb b/spec/features/consumer/shopping/checkout_spec.rb index 14320170d7..0c829e35fe 100644 --- a/spec/features/consumer/shopping/checkout_spec.rb +++ b/spec/features/consumer/shopping/checkout_spec.rb @@ -120,15 +120,10 @@ feature "As a consumer I want to check out my cart", js: true do end it "shows only applicable content" do - # Unifying several specs here to speed up test run. - - # it doesn't tell about previous orders expect(page).to have_no_content("You have an order for this order cycle already.") - # doesn't show link to terms and conditions expect(page).to have_no_link("Terms and Conditions") - # doesn't show link to platform terms of service expect(page).to have_no_link("Terms of Service") end end