Commit 9215c456 authored by Kerri Miller's avatar Kerri Miller

Merge branch 'djadmin-fix-dast-navigation' into 'master'

Fix sidebar navigation for DAST Profiles

See merge request gitlab-org/gitlab!49719
parents d3500998 da58b115
...@@ -167,11 +167,11 @@ module EE ...@@ -167,11 +167,11 @@ module EE
projects/security/vulnerability_report#index projects/security/vulnerability_report#index
projects/security/dashboard#index projects/security/dashboard#index
projects/on_demand_scans#index projects/on_demand_scans#index
projects/dast_profiles#index projects/security/dast_profiles#show
projects/dast_site_profiles#new projects/security/dast_site_profiles#new
projects/dast_site_profiles#edit projects/security/dast_site_profiles#edit
projects/dast_scanner_profiles#new projects/security/dast_scanner_profiles#new
projects/dast_scanner_profiles#edit projects/security/dast_scanner_profiles#edit
projects/dependencies#index projects/dependencies#index
projects/licenses#index projects/licenses#index
projects/threat_monitoring#show projects/threat_monitoring#show
...@@ -189,11 +189,18 @@ module EE ...@@ -189,11 +189,18 @@ module EE
def sidebar_on_demand_scans_paths def sidebar_on_demand_scans_paths
%w[ %w[
projects/on_demand_scans#index projects/on_demand_scans#index
projects/dast_profiles#index ]
projects/dast_site_profiles#new end
projects/dast_site_profiles#edit
projects/dast_scanner_profiles#new def sidebar_security_configuration_paths
projects/dast_scanner_profiles#edit %w[
projects/security/configuration#show
projects/security/sast_configuration#show
projects/security/dast_profiles#show
projects/security/dast_site_profiles#new
projects/security/dast_site_profiles#edit
projects/security/dast_scanner_profiles#new
projects/security/dast_scanner_profiles#edit
] ]
end end
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
%span= _('Threat Monitoring') %span= _('Threat Monitoring')
- if project_nav_tab?(:security_configuration) - if project_nav_tab?(:security_configuration)
= nav_link(path: ['projects/security/configuration#show', 'projects/security/sast_configuration#show']) do = nav_link(path: sidebar_security_configuration_paths) do
= link_to project_security_configuration_path(@project), title: _('Configuration'), data: { qa_selector: 'security_configuration_link'} do = link_to project_security_configuration_path(@project), title: _('Configuration'), data: { qa_selector: 'security_configuration_link'} do
%span= _('Configuration') %span= _('Configuration')
......
---
title: Fix sidebar navigation for On-demand scans
merge_request: 49719
author:
type: fixed
...@@ -210,11 +210,11 @@ RSpec.describe ProjectsHelper do ...@@ -210,11 +210,11 @@ RSpec.describe ProjectsHelper do
projects/security/vulnerability_report#index projects/security/vulnerability_report#index
projects/security/dashboard#index projects/security/dashboard#index
projects/on_demand_scans#index projects/on_demand_scans#index
projects/dast_profiles#index projects/security/dast_profiles#show
projects/dast_site_profiles#new projects/security/dast_site_profiles#new
projects/dast_site_profiles#edit projects/security/dast_site_profiles#edit
projects/dast_scanner_profiles#new projects/security/dast_scanner_profiles#new
projects/dast_scanner_profiles#edit projects/security/dast_scanner_profiles#edit
projects/dependencies#index projects/dependencies#index
projects/licenses#index projects/licenses#index
projects/threat_monitoring#show projects/threat_monitoring#show
...@@ -232,11 +232,6 @@ RSpec.describe ProjectsHelper do ...@@ -232,11 +232,6 @@ RSpec.describe ProjectsHelper do
let(:expected_on_demand_scans_paths) do let(:expected_on_demand_scans_paths) do
%w[ %w[
projects/on_demand_scans#index projects/on_demand_scans#index
projects/dast_profiles#index
projects/dast_site_profiles#new
projects/dast_site_profiles#edit
projects/dast_scanner_profiles#new
projects/dast_scanner_profiles#edit
] ]
end end
...@@ -245,6 +240,24 @@ RSpec.describe ProjectsHelper do ...@@ -245,6 +240,24 @@ RSpec.describe ProjectsHelper do
it { is_expected.to eq(expected_on_demand_scans_paths) } it { is_expected.to eq(expected_on_demand_scans_paths) }
end end
describe '#sidebar_security_configuration_paths' do
let(:expected_security_configuration_paths) do
%w[
projects/security/configuration#show
projects/security/sast_configuration#show
projects/security/dast_profiles#show
projects/security/dast_site_profiles#new
projects/security/dast_site_profiles#edit
projects/security/dast_scanner_profiles#new
projects/security/dast_scanner_profiles#edit
]
end
subject { helper.sidebar_security_configuration_paths }
it { is_expected.to eq(expected_security_configuration_paths) }
end
describe '#get_project_nav_tabs' do describe '#get_project_nav_tabs' do
using RSpec::Parameterized::TableSyntax using RSpec::Parameterized::TableSyntax
......
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