Skip to content
Snippets Groups Projects
Unverified Commit 8e33afd8 authored by Allen Cook's avatar Allen Cook
Browse files

Merge branch '422292_update_adherence_ui_ff_scope' into 'master'

Update adherence_report_ui ff scope

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/129532



Merged-by: default avatarAllen Cook <acook@gitlab.com>
Approved-by: default avatarSam Figueroa <sfigueroa@gitlab.com>
Approved-by: default avatarAllen Cook <acook@gitlab.com>
Co-authored-by: default avatarJay Montal <jmontal@gitlab.com>
parents fed6773b 5e6cbf63
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -10,4 +10,4 @@
pipeline_configuration_full_path_enabled: can?(current_user, :admin_compliance_pipeline_configuration, @group),
base_path: group_security_compliance_dashboard_path(@group),
pipeline_configuration_enabled: @group.licensed_feature_available?(:compliance_pipeline_configuration).to_s,
adherence_report_ui_enabled: Feature.enabled?(:adherence_report_ui).to_s } }
adherence_report_ui_enabled: Feature.enabled?(:adherence_report_ui, @group).to_s } }
Loading
Loading
@@ -11,7 +11,6 @@
before do
allow(view).to receive(:current_user).and_return(user)
assign(:group, group)
render
end
 
it 'renders with the correct data attributes', :aggregate_failures do
Loading
Loading
@@ -25,6 +24,43 @@
expect(rendered).to have_selector("[data-root-ancestor-path='#{group.root_ancestor.full_path}']")
expect(rendered).to have_selector("[data-base-path='#{group_security_compliance_dashboard_path(group)}']")
expect(rendered).to have_selector("[data-pipeline-configuration-enabled='false']")
expect(rendered).to have_selector("[data-adherence-report-ui-enabled='true']")
end
context 'for `adherence-report-ui-enabled` selector' do
before do
Feature.disable(:adherence_report_ui)
end
context 'when feature `adherence_report_ui` is not enabled' do
it 'renders with the correct selector value' do
render
expect(rendered).to have_selector("[data-adherence-report-ui-enabled='false']")
end
end
context 'when feature `adherence_report_ui` is enabled for a group' do
before do
Feature.enable(:adherence_report_ui, group)
end
it 'renders with the correct selector value' do
render
expect(rendered).to have_selector("[data-adherence-report-ui-enabled='true']")
end
end
context 'when feature `adherence_report_ui` is globally enabled' do
before do
Feature.enable(:adherence_report_ui)
end
it 'renders with the correct selector value' do
render
expect(rendered).to have_selector("[data-adherence-report-ui-enabled='true']")
end
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment