Commit da58b115 authored by Dheeraj Joshi's avatar Dheeraj Joshi

Fix subnavigation paths for On-demand Scans & profiles

parent fc8fac12
......@@ -167,11 +167,11 @@ module EE
projects/security/vulnerability_report#index
projects/security/dashboard#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
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
projects/dependencies#index
projects/licenses#index
projects/threat_monitoring#show
......@@ -189,11 +189,18 @@ module EE
def sidebar_on_demand_scans_paths
%w[
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
def sidebar_security_configuration_paths
%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
......
......@@ -46,7 +46,7 @@
%span= _('Threat Monitoring')
- 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
%span= _('Configuration')
......
---
title: Fix sidebar navigation for On-demand scans
merge_request: 49719
author:
type: fixed
......@@ -210,11 +210,11 @@ RSpec.describe ProjectsHelper do
projects/security/vulnerability_report#index
projects/security/dashboard#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
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
projects/dependencies#index
projects/licenses#index
projects/threat_monitoring#show
......@@ -232,11 +232,6 @@ RSpec.describe ProjectsHelper do
let(:expected_on_demand_scans_paths) do
%w[
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
......@@ -245,6 +240,24 @@ RSpec.describe ProjectsHelper do
it { is_expected.to eq(expected_on_demand_scans_paths) }
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
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