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
58485351
Commit
58485351
authored
Jul 01, 2021
by
Dallas Reedy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Run forcibly showing the trial status popover as its own experiment
- Create a new feature flag for the experiment
parent
55822d83
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
1 deletion
+26
-1
ee/app/helpers/trial_status_widget_helper.rb
ee/app/helpers/trial_status_widget_helper.rb
+5
-1
ee/config/feature_flags/experiment/forcibly_show_trial_status_popover.yml
...e_flags/experiment/forcibly_show_trial_status_popover.yml
+8
-0
ee/spec/helpers/trial_status_widget_helper_spec.rb
ee/spec/helpers/trial_status_widget_helper_spec.rb
+13
-0
No files found.
ee/app/helpers/trial_status_widget_helper.rb
View file @
58485351
...
...
@@ -21,7 +21,7 @@ module TrialStatusWidgetHelper
base_attrs
.
merge
(
group_name:
group
.
name
,
purchase_href:
ultimate_subscription_path_for_group
(
group
),
start_initially_shown:
force_popover_to_be_shown?
(
group
.
trial_days_remaining
),
start_initially_shown:
in_forced_popover_experiment?
(
group
)
&&
force_popover_to_be_shown?
(
group
.
trial_days_remaining
),
target_id:
base_attrs
[
:container_id
],
trial_end_date:
group
.
trial_ends_on
)
...
...
@@ -64,4 +64,8 @@ module TrialStatusWidgetHelper
def
ultimate_subscription_path_for_group
(
group
)
new_subscriptions_path
(
namespace_id:
group
.
id
,
plan_id:
ZUORA_ULTIMATE_PLAN_ID
)
end
def
in_forced_popover_experiment?
(
group
)
experiment
(
:forcibly_show_trial_status_popover
,
group:
group
).
variant
.
group
==
:experiment
end
end
ee/config/feature_flags/experiment/forcibly_show_trial_status_popover.yml
0 → 100644
View file @
58485351
---
name
:
forcibly_show_trial_status_popover
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/65283
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/335043
milestone
:
'
14.1'
type
:
experiment
group
:
group::conversion
default_enabled
:
false
ee/spec/helpers/trial_status_widget_helper_spec.rb
View file @
58485351
...
...
@@ -33,6 +33,7 @@ RSpec.describe TrialStatusWidgetHelper do
before
do
travel_to
today_for_specs
stub_experiments
(
forcibly_show_trial_status_popover: :candidate
)
end
describe
'#trial_status_popover_data_attrs'
do
...
...
@@ -97,6 +98,18 @@ RSpec.describe TrialStatusWidgetHelper do
include_examples
'returned data attributes'
end
end
context
'when not part of the experiment'
do
before
do
stub_experiments
(
forcibly_show_trial_status_popover: :control
)
end
where
trial_days_remaining:
[
2
,
5
,
9
,
14
,
20
]
with_them
do
include_examples
'returned data attributes'
,
shown:
false
end
end
end
describe
'#trial_status_widget_data_attrs'
do
...
...
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