Commit af5def7d authored by Vitali Tatarintev's avatar Vitali Tatarintev

Merge branch 'tr-alert-deprecation-feature-flag' into 'master'

Add feature flag for alert deprecation [RUN ALL RSPEC] [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!62528
parents 0e0f1aef 1f0d3394
...@@ -3,6 +3,10 @@ ...@@ -3,6 +3,10 @@
class Projects::AlertManagementController < Projects::ApplicationController class Projects::AlertManagementController < Projects::ApplicationController
before_action :authorize_read_alert_management_alert! 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 feature_category :incident_management
def index def index
......
---
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
...@@ -55,4 +55,28 @@ RSpec.describe 'Alert Management index', :js do ...@@ -55,4 +55,28 @@ RSpec.describe 'Alert Management index', :js do
it_behaves_like 'alert page with title, filtered search, and table' it_behaves_like 'alert page with title, filtered search, and table'
end end
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 end
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