Commit 49b3e17e authored by Mark Chao's avatar Mark Chao

Merge branch 'logged-out-marketing-header-exp/trial-focused-variant' into 'master'

Add trial_focused variant to logged_out_marketing_header experiment

See merge request gitlab-org/gitlab!76912
parents 99114abe 511b2b27
...@@ -426,7 +426,9 @@ module ApplicationHelper ...@@ -426,7 +426,9 @@ module ApplicationHelper
return if current_user return if current_user
experiment(:logged_out_marketing_header, actor: nil) do |e| experiment(:logged_out_marketing_header, actor: nil) do |e|
e.candidate { 'logged-out-marketing-header-candidate' } html_class = 'logged-out-marketing-header-candidate'
e.candidate { html_class }
e.try(:trial_focused) { html_class }
e.control {} e.control {}
e.run e.run
end end
......
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
- experiment(:logged_out_marketing_header, actor: nil) do |e| - experiment(:logged_out_marketing_header, actor: nil) do |e|
- e.candidate do - e.candidate do
= render 'layouts/header/marketing_links' = render 'layouts/header/marketing_links'
- e.try(:trial_focused) do
= render 'layouts/header/marketing_links'
- e.control do - e.control do
.gl-display-none.gl-sm-display-block .gl-display-none.gl-sm-display-block
= render "layouts/nav/top_nav" = render "layouts/nav/top_nav"
...@@ -117,6 +119,9 @@ ...@@ -117,6 +119,9 @@
- e.candidate do - e.candidate do
%li.nav-item.gl-display-none.gl-sm-display-block %li.nav-item.gl-display-none.gl-sm-display-block
= render "layouts/nav/top_nav" = render "layouts/nav/top_nav"
- e.try(:trial_focused) do
%li.nav-item.gl-display-none.gl-sm-display-block
= render "layouts/nav/top_nav"
- e.control {} - e.control {}
- if header_link?(:user_dropdown) - if header_link?(:user_dropdown)
%li.nav-item.header-user.js-nav-user-dropdown.dropdown{ data: { track_label: "profile_dropdown", track_action: "click_dropdown", track_value: "", qa_selector: 'user_menu' }, class: ('mr-0' if has_impersonation_link) } %li.nav-item.header-user.js-nav-user-dropdown.dropdown{ data: { track_label: "profile_dropdown", track_action: "click_dropdown", track_value: "", qa_selector: 'user_menu' }, class: ('mr-0' if has_impersonation_link) }
...@@ -138,6 +143,14 @@ ...@@ -138,6 +143,14 @@
%li.nav-item.gl-display-none.gl-sm-display-block %li.nav-item.gl-display-none.gl-sm-display-block
= link_to _('Login'), new_session_path(:user, redirect_to_referer: 'yes') = link_to _('Login'), new_session_path(:user, redirect_to_referer: 'yes')
= render 'layouts/header/sign_in_register_button', class: 'gl-sm-display-none' = render 'layouts/header/sign_in_register_button', class: 'gl-sm-display-none'
- e.try(:trial_focused) do
%li.nav-item.gl-display-none.gl-sm-display-block
= link_to _('Get a free trial'), 'https://about.gitlab.com/free-trial/', class: 'gl-button btn btn-default btn-sign-in'
%li.nav-item.gl-display-none.gl-sm-display-block
= link_to _('Sign up'), new_user_registration_path
%li.nav-item.gl-display-none.gl-sm-display-block
= link_to _('Login'), new_session_path(:user, redirect_to_referer: 'yes')
= render 'layouts/header/sign_in_register_button', class: 'gl-sm-display-none'
- e.control do - e.control do
= render 'layouts/header/sign_in_register_button' = render 'layouts/header/sign_in_register_button'
......
...@@ -16040,6 +16040,9 @@ msgstr "" ...@@ -16040,6 +16040,9 @@ msgstr ""
msgid "Get a free instance review" msgid "Get a free instance review"
msgstr "" msgstr ""
msgid "Get a free trial"
msgstr ""
msgid "Get a support subscription" msgid "Get a support subscription"
msgstr "" msgstr ""
......
...@@ -20,6 +20,21 @@ RSpec.describe 'User sees experimental lmarketing header' do ...@@ -20,6 +20,21 @@ RSpec.describe 'User sees experimental lmarketing header' do
end end
end end
context 'when experiment candidate (trial focused variant)' do
it 'shows marketing header links', :aggregate_failures do
stub_experiments(logged_out_marketing_header: :trial_focused)
visit project_path(project)
expect(page).to have_text "About GitLab"
expect(page).to have_text "Pricing"
expect(page).to have_text "Talk to an expert"
expect(page).to have_text "Get a free trial"
expect(page).to have_text "Sign up"
expect(page).to have_text "Login"
end
end
context 'when experiment control' do context 'when experiment control' do
it 'does not show marketing header links', :aggregate_failures do it 'does not show marketing header links', :aggregate_failures do
stub_experiments(logged_out_marketing_header: :control) stub_experiments(logged_out_marketing_header: :control)
...@@ -31,6 +46,8 @@ RSpec.describe 'User sees experimental lmarketing header' do ...@@ -31,6 +46,8 @@ RSpec.describe 'User sees experimental lmarketing header' do
expect(page).not_to have_text "Talk to an expert" expect(page).not_to have_text "Talk to an expert"
expect(page).not_to have_text "Sign up now" expect(page).not_to have_text "Sign up now"
expect(page).not_to have_text "Login" expect(page).not_to have_text "Login"
expect(page).not_to have_text "Get a free trial"
expect(page).not_to have_text "Sign up"
expect(page).to have_text "Sign in / Register" expect(page).to have_text "Sign in / Register"
end end
end end
......
...@@ -498,6 +498,12 @@ RSpec.describe ApplicationHelper do ...@@ -498,6 +498,12 @@ RSpec.describe ApplicationHelper do
it { is_expected.to include(expected_class) } it { is_expected.to include(expected_class) }
end end
context 'when candidate (:trial_focused variant)' do
let(:variant) { :trial_focused }
it { is_expected.to include(expected_class) }
end
context 'when control' do context 'when control' do
let(:variant) { :control } let(:variant) { :control }
......
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