Commit a316a76b authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'astoicescu-add-custom-header-text-to-free-personal-namespaces' into 'master'

Add custom header text to billing page of free personal namespaces

See merge request gitlab-org/gitlab!62365
parents b5761585 f711ee6a
...@@ -20,7 +20,10 @@ ...@@ -20,7 +20,10 @@
- else - else
= s_("BillingPlans|%{group_name} is currently using the %{plan_name}.").html_safe % { group_name: namespace.full_name, plan_name: plan.name } = s_("BillingPlans|%{group_name} is currently using the %{plan_name}.").html_safe % { group_name: namespace.full_name, plan_name: plan.name }
- if parent_group - if namespace.free_personal?
- groups_link = link_to s_("BillingPlans|group"), dashboard_groups_path
%p= html_escape_once(s_("BillingPlans|Looking to purchase or manage a subscription for your group? Navigate to your %{groups_link} and go to %{strong_open}Settings &gt; Billing.%{strong_close}")).html_safe % { groups_link: groups_link.html_safe, strong_open: '<strong>'.html_safe, strong_close: '</strong>'.html_safe }
- elsif parent_group
%p= s_("BillingPlans|This group uses the plan associated with its parent group.") %p= s_("BillingPlans|This group uses the plan associated with its parent group.")
- parent_billing_page_link = link_to parent_group.full_name, group_billings_path(parent_group) - parent_billing_page_link = link_to parent_group.full_name, group_billings_path(parent_group)
%p= s_("BillingPlans|To manage the plan for this group, visit the billing section of %{parent_billing_page_link}.").html_safe % { parent_billing_page_link: parent_billing_page_link } %p= s_("BillingPlans|To manage the plan for this group, visit the billing section of %{parent_billing_page_link}.").html_safe % { parent_billing_page_link: parent_billing_page_link }
......
...@@ -210,6 +210,13 @@ RSpec.describe 'Billing plan pages', :feature, :js do ...@@ -210,6 +210,13 @@ RSpec.describe 'Billing plan pages', :feature, :js do
visit page_path visit page_path
end end
it 'displays the correct call to action', :js do
page.within('.billing-plan-header') do
expect(page).to have_content('Looking to purchase or manage a subscription for your group? Navigate to your group and go to Settings > Billing')
expect(page).to have_link('group', href: dashboard_groups_path)
end
end
it_behaves_like 'does not display the billing plans' it_behaves_like 'does not display the billing plans'
it_behaves_like 'plan with subscription table' it_behaves_like 'plan with subscription table'
end end
......
...@@ -5051,6 +5051,9 @@ msgstr "" ...@@ -5051,6 +5051,9 @@ msgstr ""
msgid "BillingPlans|Learn more about each plan by visiting our %{pricing_page_link}." msgid "BillingPlans|Learn more about each plan by visiting our %{pricing_page_link}."
msgstr "" msgstr ""
msgid "BillingPlans|Looking to purchase or manage a subscription for your group? Navigate to your %{groups_link} and go to %{strong_open}Settings &gt; Billing.%{strong_close}"
msgstr ""
msgid "BillingPlans|Manage plan" msgid "BillingPlans|Manage plan"
msgstr "" msgstr ""
...@@ -5087,6 +5090,9 @@ msgstr "" ...@@ -5087,6 +5090,9 @@ msgstr ""
msgid "BillingPlans|frequently asked questions" msgid "BillingPlans|frequently asked questions"
msgstr "" msgstr ""
msgid "BillingPlans|group"
msgstr ""
msgid "BillingPlans|monthly" msgid "BillingPlans|monthly"
msgstr "" msgstr ""
......
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