From da563abb4f0b6146aac7cadef191da2c9282469d Mon Sep 17 00:00:00 2001 From: Andrew White Date: Thu, 20 Dec 2018 08:57:13 +0000 Subject: [PATCH] Update holiday messaging Use the word 'will' instead of 'may' as no moderation will take place over the Christmas week. Also add the messaging to the initial email that creators get to inform them about delayed moderation. --- .../gather_sponsors_for_petition.html.erb | 8 +++++++ .../gather_sponsors_for_petition.text.erb | 8 +++++++ ...sponsor_signed_email_on_threshold.html.erb | 4 ++-- ...sponsor_signed_email_on_threshold.text.erb | 4 ++-- spec/mailers/petition_mailer_spec.rb | 24 +++++++++++++++++++ spec/mailers/sponsor_mailer_spec.rb | 12 +++++----- 6 files changed, 50 insertions(+), 10 deletions(-) diff --git a/app/views/petition_mailer/gather_sponsors_for_petition.html.erb b/app/views/petition_mailer/gather_sponsors_for_petition.html.erb index f20ed415e..a8b3b1ca0 100644 --- a/app/views/petition_mailer/gather_sponsors_for_petition.html.erb +++ b/app/views/petition_mailer/gather_sponsors_for_petition.html.erb @@ -6,6 +6,14 @@

<%= Site.threshold_for_moderation %> people need to click the link and confirm their support for us to publish your petition.

+<% if christmas_period? %> +

Once you’ve gained the required number of supporters, we’ll check your petition to make sure it meets the petition standards. If it does we’ll publish it. This usually takes a week or less but over the Christmas period it will take us a little longer than usual. We’ll check your petition as quickly as we can.

+<% elsif easter_period? %> +

Once you’ve gained the required number of supporters, we’ll check your petition to make sure it meets the petition standards. If it does we’ll publish it. This usually takes a week or less but over the Easter period it will take us a little longer than usual. We’ll check your petition as quickly as we can.

+<% else %> +

Once you’ve gained the required number of supporters, we’ll check your petition to make sure it meets the petition standards. If it does, we’ll publish it. This usually takes a week or less.

+<% end %> +

Thanks,
<%= t("petitions.emails.signoff_prefix") %>
<%= t("petitions.emails.signoff_suffix") %>

diff --git a/app/views/petition_mailer/gather_sponsors_for_petition.text.erb b/app/views/petition_mailer/gather_sponsors_for_petition.text.erb index 99fbf971f..04c4e37c6 100644 --- a/app/views/petition_mailer/gather_sponsors_for_petition.text.erb +++ b/app/views/petition_mailer/gather_sponsors_for_petition.text.erb @@ -6,6 +6,14 @@ Forward the email below to your potential supporters. <%= Site.threshold_for_moderation %> people need to click the link and confirm their support for us to publish your petition. +<% if christmas_period? %> +Once you’ve gained the required number of supporters, we’ll check your petition to make sure it meets the petition standards. If it does we’ll publish it. This usually takes a week or less but over the Christmas period it will take us a little longer than usual. We’ll check your petition as quickly as we can. +<% elsif easter_period? %> +Once you’ve gained the required number of supporters, we’ll check your petition to make sure it meets the petition standards. If it does we’ll publish it. This usually takes a week or less but over the Easter period it will take us a little longer than usual. We’ll check your petition as quickly as we can. +<% else %> +Once you’ve gained the required number of supporters, we’ll check your petition to make sure it meets the petition standards. If it does, we’ll publish it. This usually takes a week or less. +<% end %> + Thanks, <%= t("petitions.emails.signoff_prefix") %> <%= t("petitions.emails.signoff_suffix") %> diff --git a/app/views/sponsor_mailer/sponsor_signed_email_on_threshold.html.erb b/app/views/sponsor_mailer/sponsor_signed_email_on_threshold.html.erb index 36d023fcf..3c8a73827 100644 --- a/app/views/sponsor_mailer/sponsor_signed_email_on_threshold.html.erb +++ b/app/views/sponsor_mailer/sponsor_signed_email_on_threshold.html.erb @@ -5,9 +5,9 @@

<%= @sponsor.name %> supported your petition – “<%= @petition.action %>”.

<% if christmas_period? %> -

<%= @sponsor_count %> people have supported your petition so far. We’re checking your petition to make sure it meets the petition standards. If it does, we’ll publish it. This usually takes a week or less but over the Christmas period it may take us a little longer than usual. We’ll check your petition as quickly as we can.

+

<%= @sponsor_count %> people have supported your petition so far. We’re checking your petition to make sure it meets the petition standards. If it does, we’ll publish it. This usually takes a week or less but over the Christmas period it will take us a little longer than usual. We’ll check your petition as quickly as we can.

<% elsif easter_period? %> -

<%= @sponsor_count %> people have supported your petition so far. We’re checking your petition to make sure it meets the petition standards. If it does, we’ll publish it. This usually takes a week or less but over the Easter period it may take us a little longer than usual. We’ll check your petition as quickly as we can.

+

<%= @sponsor_count %> people have supported your petition so far. We’re checking your petition to make sure it meets the petition standards. If it does, we’ll publish it. This usually takes a week or less but over the Easter period it will take us a little longer than usual. We’ll check your petition as quickly as we can.

<% else %>

<%= @sponsor_count %> people have supported your petition so far. We’re checking your petition to make sure it meets the petition standards. If it does, we’ll publish it. This usually takes a week or less.

<% end %> diff --git a/app/views/sponsor_mailer/sponsor_signed_email_on_threshold.text.erb b/app/views/sponsor_mailer/sponsor_signed_email_on_threshold.text.erb index e9317369d..6f2efe60c 100644 --- a/app/views/sponsor_mailer/sponsor_signed_email_on_threshold.text.erb +++ b/app/views/sponsor_mailer/sponsor_signed_email_on_threshold.text.erb @@ -5,9 +5,9 @@ Your petition is nearly ready to go. <%= @sponsor.name %> supported your petition – "<%= @petition.action %>". <% if christmas_period? %> -<%= @sponsor_count %> people have supported your petition so far. We’re checking your petition to make sure it meets the petition standards. If it does, we’ll publish it. This usually takes a week or less but over the Christmas period it may take us a little longer than usual. We’ll check your petition as quickly as we can. +<%= @sponsor_count %> people have supported your petition so far. We’re checking your petition to make sure it meets the petition standards. If it does, we’ll publish it. This usually takes a week or less but over the Christmas period it will take us a little longer than usual. We’ll check your petition as quickly as we can. <% elsif christmas_period? %> -<%= @sponsor_count %> people have supported your petition so far. We’re checking your petition to make sure it meets the petition standards. If it does, we’ll publish it. This usually takes a week or less but over the Easter period it may take us a little longer than usual. We’ll check your petition as quickly as we can. +<%= @sponsor_count %> people have supported your petition so far. We’re checking your petition to make sure it meets the petition standards. If it does, we’ll publish it. This usually takes a week or less but over the Easter period it will take us a little longer than usual. We’ll check your petition as quickly as we can. <% else %> <%= @sponsor_count %> people have supported your petition so far. We’re checking your petition to make sure it meets the petition standards. If it does, we’ll publish it. This usually takes a week or less. <% end %> diff --git a/spec/mailers/petition_mailer_spec.rb b/spec/mailers/petition_mailer_spec.rb index 920af9300..6f3fa722e 100644 --- a/spec/mailers/petition_mailer_spec.rb +++ b/spec/mailers/petition_mailer_spec.rb @@ -334,6 +334,30 @@ it "includes the petition additional details" do expect(mail).to have_body_text(%r[To promote organic vegetables]) end + + it "includes information about moderation" do + expect(mail).to have_body_text(%r[Once you’ve gained the required number of supporters]) + end + + context "during Christmas" do + before do + allow(Holiday).to receive(:christmas?).and_return(true) + end + + it "includes information about delayed moderation" do + expect(mail).to have_body_text(%r[but over the Christmas period it will take us a little longer]) + end + end + + context "during Easter" do + before do + allow(Holiday).to receive(:easter?).and_return(true) + end + + it "includes information about delayed moderation" do + expect(mail).to have_body_text(%r[but over the Easter period it will take us a little longer]) + end + end end describe "notifying signature of debate outcome" do diff --git a/spec/mailers/sponsor_mailer_spec.rb b/spec/mailers/sponsor_mailer_spec.rb index 8a781f966..16e8ef5dc 100644 --- a/spec/mailers/sponsor_mailer_spec.rb +++ b/spec/mailers/sponsor_mailer_spec.rb @@ -131,7 +131,7 @@ it_behaves_like "a sponsor signed on threshold email" it "doesn't include the moderation delay message" do - expect(mail).not_to have_body_text(%r[over the Christmas period it may take us a little longer than usual]) + expect(mail).not_to have_body_text(%r[over the Christmas period it will take us a little longer than usual]) end end @@ -143,7 +143,7 @@ it_behaves_like "a sponsor signed on threshold email" it "includes the moderation delay message" do - expect(mail).to have_body_text(%r[over the Christmas period it may take us a little longer than usual]) + expect(mail).to have_body_text(%r[over the Christmas period it will take us a little longer than usual]) end end @@ -155,7 +155,7 @@ it_behaves_like "a sponsor signed on threshold email" it "doesn't include the moderation delay message" do - expect(mail).not_to have_body_text(%r[over the Christmas period it may take us a little longer than usual]) + expect(mail).not_to have_body_text(%r[over the Christmas period it will take us a little longer than usual]) end end @@ -167,7 +167,7 @@ it_behaves_like "a sponsor signed on threshold email" it "doesn't include the moderation delay message" do - expect(mail).not_to have_body_text(%r[over the Easter period it may take us a little longer than usual]) + expect(mail).not_to have_body_text(%r[over the Easter period it will take us a little longer than usual]) end end @@ -179,7 +179,7 @@ it_behaves_like "a sponsor signed on threshold email" it "includes the moderation delay message" do - expect(mail).to have_body_text(%r[over the Easter period it may take us a little longer than usual]) + expect(mail).to have_body_text(%r[over the Easter period it will take us a little longer than usual]) end end @@ -191,7 +191,7 @@ it_behaves_like "a sponsor signed on threshold email" it "doesn't include the moderation delay message" do - expect(mail).not_to have_body_text(%r[over the Easter period it may take us a little longer than usual]) + expect(mail).not_to have_body_text(%r[over the Easter period it will take us a little longer than usual]) end end end