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
4b5c46c6
Commit
4b5c46c6
authored
Jan 24, 2022
by
Alper Akgun
Committed by
Kerri Miller
Jan 24, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Redirect in-app trial users to the feature
Changelog: added EE: true
parent
eb24f558
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
35 deletions
+5
-35
config/feature_flags/experiment/redirect_trial_user_to_feature.yml
...ature_flags/experiment/redirect_trial_user_to_feature.yml
+0
-8
ee/app/controllers/trials_controller.rb
ee/app/controllers/trials_controller.rb
+1
-9
ee/spec/controllers/trials_controller_spec.rb
ee/spec/controllers/trials_controller_spec.rb
+4
-18
No files found.
config/feature_flags/experiment/redirect_trial_user_to_feature.yml
deleted
100644 → 0
View file @
eb24f558
---
name
:
redirect_trial_user_to_feature
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/65450
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/335824
milestone
:
'
14.1'
type
:
experiment
group
:
group::conversion
default_enabled
:
false
ee/app/controllers/trials_controller.rb
View file @
4b5c46c6
...
...
@@ -214,14 +214,6 @@ class TrialsController < ApplicationController
group
end
def
redirect_trial_user_to_feature_experiment_flow
experiment
(
:redirect_trial_user_to_feature
,
namespace:
@namespace
)
do
|
e
|
e
.
use
{
redirect_to
group_url
(
@namespace
,
{
trial:
true
})
}
e
.
try
{
redirect_to
group_security_dashboard_url
(
@namespace
,
{
trial:
true
})
}
e
.
publish_to_database
end
end
def
discover_group_security_flow?
%w(discover-group-security discover-project-security)
.
include?
(
params
[
:glm_content
])
end
...
...
@@ -238,7 +230,7 @@ class TrialsController < ApplicationController
experiment
(
:combined_registration
,
user:
current_user
).
track
(
:create_trial
)
if
discover_group_security_flow?
redirect_t
rial_user_to_feature_experiment_flow
redirect_t
o
group_security_dashboard_url
(
@namespace
,
{
trial:
true
})
else
redirect_to
stored_location_or_provided_path
(
group_url
(
@namespace
,
{
trial:
true
}))
end
...
...
ee/spec/controllers/trials_controller_spec.rb
View file @
4b5c46c6
...
...
@@ -411,30 +411,16 @@ RSpec.describe TrialsController, :saas do
context
'redirect trial user to feature'
do
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:segment
,
:glm_content
,
:redirect
)
do
:control
|
'discover-group-security'
|
:group_url
:candidate
|
'discover-group-security'
|
:group_security_dashboard_url
:control
|
'discover-project-security'
|
:group_url
:candidate
|
'discover-project-security'
|
:group_security_dashboard_url
where
(
:glm_content
,
:redirect
)
do
'discover-group-security'
|
:group_security_dashboard_url
'discover-project-security'
|
:group_security_dashboard_url
end
with_them
do
let
(
:post_params
)
{
{
namespace_id:
namespace
.
id
,
glm_content:
glm_content
}
}
let
(
:variant
)
{
segment
==
:control
?
:control
:
:experimental
}
let
(
:redirect_url
)
do
redirect
==
:group_url
?
group_url
(
namespace
,
{
trial:
true
})
:
group_security_dashboard_url
(
namespace
,
{
trial:
true
})
end
before
do
stub_experiments
(
redirect_trial_user_to_feature:
segment
)
end
let
(
:redirect_url
)
{
group_security_dashboard_url
(
namespace
,
{
trial:
true
})
}
it
{
is_expected
.
to
redirect_to
(
redirect_url
)
}
it
'records the subject'
do
expect
(
Experiment
).
to
receive
(
:add_subject
).
with
(
'redirect_trial_user_to_feature'
,
variant:
variant
,
subject:
namespace
)
post_apply
end
end
end
...
...
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