Commit 4d93d767 authored by Alper Akgun's avatar Alper Akgun

Maintainer fix for glm query string

Maintainer review fixes
parent 3cb25f06
- parent_group = local_assigns[:parent_group]
- if namespace_for_user?(namespace)
- namespace_for_user = namespace_for_user?(namespace)
- if namespace_for_user
= render_if_exists 'trials/banner', namespace: namespace
.billing-plan-header.content-block.center
.billing-plan-logo
- if namespace_for_user?(namespace)
- if namespace_for_user
.avatar-container.s96.home-panel-avatar.append-right-default.float-none.mx-auto.mb-4.mt-1
= user_avatar_without_link(user: current_user, class: 'mb-3', size: 96)
- elsif @group.avatar_url.present?
......@@ -15,7 +15,7 @@
= group_icon(@group, class: 'avatar avatar-tile s96', width: 96, height: 96, alt: @group.name)
%h4
- if namespace_for_user?(namespace)
- if namespace_for_user
= s_("BillingPlans|@%{user_name} you are currently using the %{plan_name} plan.").html_safe % { user_name: current_user.username, plan_name: plan.code.titleize }
- else
= s_("BillingPlans|%{group_name} is currently using the %{plan_name} plan.").html_safe % { group_name: namespace.full_name, plan_name: plan.code.titleize }
......@@ -29,5 +29,5 @@
= render 'shared/billings/trial_status', namespace: namespace
- if namespace.eligible_for_trial?
- glm_content = namespace_for_user?(namespace) ? 'user-billing' : 'group-billing'
- glm_content = namespace_for_user ? 'user-billing' : 'group-billing'
%p= link_to 'Start your free trial', new_trial_registration_path(glm_source: 'gitlab.com', glm_content: glm_content), class: 'btn btn-primary'
......@@ -11,7 +11,8 @@ describe 'Trial Sign In' do
end
it 'logs the user in' do
visit(new_trial_registration_path(glm_source: 'any-source', glm_content: 'any-content'))
url_params = { glm_source: 'any-source', glm_content: 'any-content' }
visit(new_trial_registration_path(url_params))
within('div#login-pane') do
fill_in 'user_login', with: user.email
......@@ -20,7 +21,7 @@ describe 'Trial Sign In' do
click_button 'Continue'
end
expect(current_path).to eq(new_trial_path)
expect(current_url).to eq(new_trial_url(url_params))
end
end
......
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