Commit 2f5a0d41 authored by Patrick Bajao's avatar Patrick Bajao

Merge branch 'billing-page-trial-plan-suffix' into 'master'

Remove Trial Suffix from Trial Plan Titles on Billing Page

See merge request gitlab-org/gitlab!66578
parents cc1fa67e 73980544
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
- if show_start_free_trial_messages?(namespace) - if show_start_free_trial_messages?(namespace)
= html_escape(s_("BillingPlans|Learn more about each plan by reading our %{faq_link}, or start a free 30-day trial of GitLab.com Ultimate.")) % { faq_link: faq_link.html_safe } = html_escape(s_("BillingPlans|Learn more about each plan by reading our %{faq_link}, or start a free 30-day trial of GitLab.com Ultimate.")) % { faq_link: faq_link.html_safe }
- elsif namespace.trial_active? - elsif namespace.trial_active?
= html_escape(s_("BillingPlans|Your GitLab.com %{plan} trial will %{strong_open}expire after %{expiration_date}%{strong_close}. You can retain access to the %{plan} features by upgrading below.")) % { plan: namespace.gitlab_subscription&.plan_title, expiration_date: namespace.trial_ends_on, strong_open: '<strong>'.html_safe, strong_close: '</strong>'.html_safe } = html_escape(s_("BillingPlans|Your GitLab.com %{plan} trial will %{strong_open}expire after %{expiration_date}%{strong_close}. You can retain access to the %{plan} features by upgrading below.")) % { plan: namespace.gitlab_subscription&.plan_title&.remove(' Trial'), expiration_date: namespace.trial_ends_on, strong_open: '<strong>'.html_safe, strong_close: '</strong>'.html_safe }
- elsif namespace.trial_expired? && namespace.free_plan? - elsif namespace.trial_expired? && namespace.free_plan?
= s_("BillingPlans|Your GitLab.com trial expired on %{expiration_date}. You can restore access to the features at any time by upgrading below.") % { expiration_date: namespace.trial_ends_on } = s_("BillingPlans|Your GitLab.com trial expired on %{expiration_date}. You can restore access to the features at any time by upgrading below.") % { expiration_date: namespace.trial_ends_on }
- else - else
......
...@@ -45,6 +45,26 @@ RSpec.describe 'shared/billings/_trial_status.html.haml' do ...@@ -45,6 +45,26 @@ RSpec.describe 'shared/billings/_trial_status.html.haml' do
expect(rendered).to have_content("Your GitLab.com Premium trial will expire after #{trial_ends_on}. You can retain access to the Premium features by upgrading below.") expect(rendered).to have_content("Your GitLab.com Premium trial will expire after #{trial_ends_on}. You can retain access to the Premium features by upgrading below.")
end end
end end
context 'with an ultimate trial using the new trial plan' do
let(:plan) { create(:ultimate_trial_plan) }
it 'displays expiry date and Ultimate' do
render 'shared/billings/trial_status', namespace: group
expect(rendered).to have_content("Your GitLab.com Ultimate trial will expire after #{trial_ends_on}. You can retain access to the Ultimate features by upgrading below.")
end
end
context 'with a premium trial using the new trial plan' do
let(:plan) { create(:premium_trial_plan) }
it 'displays expiry date and Premium' do
render 'shared/billings/trial_status', namespace: group
expect(rendered).to have_content("Your GitLab.com Premium trial will expire after #{trial_ends_on}. You can retain access to the Premium features by upgrading below.")
end
end
end end
context 'when trial expired' do context 'when trial expired' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment