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
1f0d3394
Commit
1f0d3394
authored
May 27, 2021
by
Tristan Read
Committed by
Vitali Tatarintev
May 27, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add feature flag for alert deprecation [RUN ALL RSPEC] [RUN AS-IF-FOSS]
parent
732467b9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
0 deletions
+36
-0
app/controllers/projects/alert_management_controller.rb
app/controllers/projects/alert_management_controller.rb
+4
-0
config/feature_flags/development/managed_alerts_deprecation.yml
.../feature_flags/development/managed_alerts_deprecation.yml
+8
-0
spec/features/alert_management/alert_management_list_spec.rb
spec/features/alert_management/alert_management_list_spec.rb
+24
-0
No files found.
app/controllers/projects/alert_management_controller.rb
View file @
1f0d3394
...
...
@@ -3,6 +3,10 @@
class
Projects::AlertManagementController
<
Projects
::
ApplicationController
before_action
:authorize_read_alert_management_alert!
before_action
(
only:
[
:index
])
do
push_frontend_feature_flag
(
:managed_alerts_deprecation
,
@project
)
end
feature_category
:incident_management
def
index
...
...
config/feature_flags/development/managed_alerts_deprecation.yml
0 → 100644
View file @
1f0d3394
---
name
:
managed_alerts_deprecation
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/62528
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/331863
milestone
:
'
14.0'
type
:
development
group
:
group::monitor
default_enabled
:
false
spec/features/alert_management/alert_management_list_spec.rb
View file @
1f0d3394
...
...
@@ -55,4 +55,28 @@ RSpec.describe 'Alert Management index', :js do
it_behaves_like
'alert page with title, filtered search, and table'
end
end
describe
'managed_alerts_deprecation feature flag'
do
subject
{
page
}
before
do
stub_feature_flags
(
managed_alerts_deprecation:
feature_flag_value
)
sign_in
(
developer
)
visit
project_alert_management_index_path
(
project
)
wait_for_requests
end
context
'feature flag on'
do
let
(
:feature_flag_value
)
{
true
}
it
{
is_expected
.
to
have_pushed_frontend_feature_flags
(
managedAlertsDeprecation:
true
)
}
end
context
'feature flag off'
do
let
(
:feature_flag_value
)
{
false
}
it
{
is_expected
.
to
have_pushed_frontend_feature_flags
(
managedAlertsDeprecation:
false
)
}
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