Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
2b97b16d
Commit
2b97b16d
authored
Dec 03, 2020
by
Alper Akgun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Trim-down the "skip copy" in the .com trial flow
Experiment for non-GL users
parent
bd145786
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
25 additions
and
4 deletions
+25
-4
ee/app/controllers/trials_controller.rb
ee/app/controllers/trials_controller.rb
+2
-0
ee/app/views/trials/_skip_trial.html.haml
ee/app/views/trials/_skip_trial.html.haml
+2
-1
ee/spec/controllers/trials_controller_spec.rb
ee/spec/controllers/trials_controller_spec.rb
+6
-3
ee/spec/views/trials/_skip_trial.html.haml_spec.rb
ee/spec/views/trials/_skip_trial.html.haml_spec.rb
+8
-0
ee/spec/views/trials/new.html.haml_spec.rb
ee/spec/views/trials/new.html.haml_spec.rb
+1
-0
lib/gitlab/experimentation.rb
lib/gitlab/experimentation.rb
+3
-0
locale/gitlab.pot
locale/gitlab.pot
+3
-0
No files found.
ee/app/controllers/trials_controller.rb
View file @
2b97b16d
...
...
@@ -14,6 +14,7 @@ class TrialsController < ApplicationController
def
new
record_experiment_user
(
:remove_known_trial_form_fields
)
record_experiment_user
(
:trimmed_skip_trial_copy
)
end
def
select
...
...
@@ -36,6 +37,7 @@ class TrialsController < ApplicationController
if
@result
&
.
dig
(
:success
)
record_experiment_conversion_event
(
:remove_known_trial_form_fields
)
record_experiment_conversion_event
(
:trimmed_skip_trial_copy
)
redirect_to
group_url
(
@namespace
,
{
trial:
true
})
else
render
:select
...
...
ee/app/views/trials/_skip_trial.html.haml
View file @
2b97b16d
...
...
@@ -4,6 +4,7 @@
.label
=
s_
(
"Trials|You can always resume this process by selecting your avatar and choosing 'Start a Gold trial'"
)
-
else
=
link_to
s_
(
'Trials|Skip Trial (Continue with Free Account)'
),
dashboard_projects_path
,
class:
'block center py-2'
-
trial_text
=
experiment_enabled?
(
:trimmed_skip_trial_copy
)
?
s_
(
'Trials|Skip Trial'
)
:
s_
(
'Trials|Skip Trial (Continue with Free Account)'
)
=
link_to
trial_text
,
dashboard_projects_path
,
class:
'block center py-2'
.label
=
s_
(
"Trials|You won't get a free trial right now but you can always resume this process by clicking on your avatar and choosing 'Start a free trial'"
)
ee/spec/controllers/trials_controller_spec.rb
View file @
2b97b16d
...
...
@@ -54,8 +54,9 @@ RSpec.describe TrialsController do
response
end
it
'calls record_experiment_user for the remove_known_trial_form_fields
experiment
'
do
it
'calls record_experiment_user for the remove_known_trial_form_fields
& trimmed_skip_trial_copy experiments
'
do
expect
(
controller
).
to
receive
(
:record_experiment_user
).
with
(
:remove_known_trial_form_fields
)
expect
(
controller
).
to
receive
(
:record_experiment_user
).
with
(
:trimmed_skip_trial_copy
)
subject
end
...
...
@@ -196,8 +197,9 @@ RSpec.describe TrialsController do
let
(
:apply_trial_result
)
{
true
}
it
{
is_expected
.
to
redirect_to
(
"/
#{
namespace
.
path
}
?trial=true"
)
}
it
'calls the record conversion method for the remove_known_trial_form_fields
experiment
'
do
it
'calls the record conversion method for the remove_known_trial_form_fields
& trimmed_skip_trial_copy experiments
'
do
expect
(
controller
).
to
receive
(
:record_experiment_conversion_event
).
with
(
:remove_known_trial_form_fields
)
expect
(
controller
).
to
receive
(
:record_experiment_conversion_event
).
with
(
:trimmed_skip_trial_copy
)
subject
end
...
...
@@ -215,8 +217,9 @@ RSpec.describe TrialsController do
let
(
:apply_trial_result
)
{
false
}
it
{
is_expected
.
to
render_template
(
:select
)
}
it
'does not call the record conversion method for the remove_known_trial_form_fields
experiment
'
do
it
'does not call the record conversion method for the remove_known_trial_form_fields
& trimmed_skip_trial_copy experiments
'
do
expect
(
controller
).
not_to
receive
(
:record_experiment_conversion_event
).
with
(
:remove_known_trial_form_fields
)
expect
(
controller
).
not_to
receive
(
:record_experiment_conversion_event
).
with
(
:trimmed_skip_trial_copy
)
subject
end
...
...
ee/spec/views/trials/_skip_trial.html.haml_spec.rb
View file @
2b97b16d
...
...
@@ -5,9 +5,11 @@ require 'spec_helper'
RSpec
.
describe
'trials/_skip_trial.html.haml'
do
include
ApplicationHelper
let_it_be
(
:trimmed_skip_trial_copy_enabled
)
{
false
}
let
(
:source
)
{
nil
}
before
do
allow
(
view
).
to
receive
(
:experiment_enabled?
).
with
(
:trimmed_skip_trial_copy
).
and_return
(
trimmed_skip_trial_copy_enabled
)
params
[
:glm_source
]
=
source
render
'trials/skip_trial'
end
...
...
@@ -26,6 +28,12 @@ RSpec.describe 'trials/_skip_trial.html.haml' do
let
(
:source
)
{
'about.gitlab.com'
}
include_examples
'has Skip Trial verbiage'
context
'when trimmed_skip_trial_copy experiment is enabled'
do
let_it_be
(
:trimmed_skip_trial_copy_enabled
)
{
true
}
it
{
is_expected
.
to
have_content
(
"Skip Trial"
)
}
end
end
context
'with glm_source of gitlab.com'
do
...
...
ee/spec/views/trials/new.html.haml_spec.rb
View file @
2b97b16d
...
...
@@ -10,6 +10,7 @@ RSpec.describe 'trials/new.html.haml' do
before
do
allow
(
view
).
to
receive
(
:current_user
)
{
user
}
allow
(
view
).
to
receive
(
:experiment_enabled?
).
with
(
:remove_known_trial_form_fields
).
and_return
(
remove_known_trial_form_fields_enabled
)
allow
(
view
).
to
receive
(
:experiment_enabled?
).
with
(
:trimmed_skip_trial_copy
)
render
end
...
...
lib/gitlab/experimentation.rb
View file @
2b97b16d
...
...
@@ -83,6 +83,9 @@ module Gitlab
},
remove_known_trial_form_fields:
{
tracking_category:
'Growth::Conversion::Experiment::RemoveKnownTrialFormFields'
},
trimmed_skip_trial_copy:
{
tracking_category:
'Growth::Conversion::Experiment::TrimmedSkipTrialCopy'
}
}.
freeze
...
...
locale/gitlab.pot
View file @
2b97b16d
...
...
@@ -28903,6 +28903,9 @@ msgstr ""
msgid "Trials|Go back to GitLab"
msgstr ""
msgid "Trials|Skip Trial"
msgstr ""
msgid "Trials|Skip Trial (Continue with Free Account)"
msgstr ""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment