Commit 7b298552 authored by Dheeraj Joshi's avatar Dheeraj Joshi Committed by Kushal Pandya

Add anchors for redirect path

This change would redirect the dast profile
forms to specific tabs by using the anchors
parent b2bb6152
- add_to_breadcrumbs s_('OnDemandScans|On-demand Scans'), project_on_demand_scans_path(@project) - add_to_breadcrumbs s_('OnDemandScans|On-demand Scans'), project_on_demand_scans_path(@project)
- add_to_breadcrumbs s_('DastProfiles|Manage profiles'), project_profiles_path(@project) - add_to_breadcrumbs s_('DastProfiles|Manage profiles'), project_profiles_path(@project, anchor: 'scanner-profiles')
- breadcrumb_title s_('DastProfiles|New scanner profile') - breadcrumb_title s_('DastProfiles|New scanner profile')
- page_title s_('DastProfiles|New scanner profile') - page_title s_('DastProfiles|New scanner profile')
.js-dast-scanner-profile-form{ data: { project_full_path: @project.path_with_namespace, .js-dast-scanner-profile-form{ data: { project_full_path: @project.path_with_namespace,
profiles_library_path: project_profiles_path(@project) } } profiles_library_path: project_profiles_path(@project, anchor: 'scanner-profiles') } }
- add_to_breadcrumbs s_('OnDemandScans|On-demand Scans'), project_on_demand_scans_path(@project) - add_to_breadcrumbs s_('OnDemandScans|On-demand Scans'), project_on_demand_scans_path(@project)
- add_to_breadcrumbs s_('DastProfiles|Manage profiles'), project_profiles_path(@project) - add_to_breadcrumbs s_('DastProfiles|Manage profiles'), project_profiles_path(@project, anchor: 'site-profiles')
- breadcrumb_title s_('DastProfiles|Edit site profile') - breadcrumb_title s_('DastProfiles|Edit site profile')
- page_title s_('DastProfiles|Edit site profile') - page_title s_('DastProfiles|Edit site profile')
.js-dast-site-profile-form{ data: { full_path: @project.path_with_namespace, .js-dast-site-profile-form{ data: { full_path: @project.path_with_namespace,
profiles_library_path: project_profiles_path(@project), profiles_library_path: project_profiles_path(@project, anchor: 'site-profiles'),
site_profile: { id: @site_profile.to_global_id.to_s, name: @site_profile.name, target_url: @site_profile.dast_site.url }.to_json } } site_profile: { id: @site_profile.to_global_id.to_s, name: @site_profile.name, target_url: @site_profile.dast_site.url }.to_json } }
- add_to_breadcrumbs s_('OnDemandScans|On-demand Scans'), project_on_demand_scans_path(@project) - add_to_breadcrumbs s_('OnDemandScans|On-demand Scans'), project_on_demand_scans_path(@project)
- add_to_breadcrumbs s_('DastProfiles|Manage profiles'), project_profiles_path(@project) - add_to_breadcrumbs s_('DastProfiles|Manage profiles'), project_profiles_path(@project, anchor: 'site-profiles')
- breadcrumb_title s_('DastProfiles|New site profile') - breadcrumb_title s_('DastProfiles|New site profile')
- page_title s_('DastProfiles|New site profile') - page_title s_('DastProfiles|New site profile')
.js-dast-site-profile-form{ data: { full_path: @project.path_with_namespace, .js-dast-site-profile-form{ data: { full_path: @project.path_with_namespace,
profiles_library_path: project_profiles_path(@project) } } profiles_library_path: project_profiles_path(@project, anchor: 'site-profiles') } }
...@@ -17,6 +17,6 @@ RSpec.describe "projects/dast_scanner_profiles/new", type: :view do ...@@ -17,6 +17,6 @@ RSpec.describe "projects/dast_scanner_profiles/new", type: :view do
end end
it 'passes DAST profiles library URL' do it 'passes DAST profiles library URL' do
expect(rendered).to include '/on_demand_scans/profiles' expect(rendered).to include '/on_demand_scans/profiles#scanner-profiles'
end end
end end
...@@ -22,7 +22,7 @@ RSpec.describe "projects/dast_site_profiles/edit", type: :view do ...@@ -22,7 +22,7 @@ RSpec.describe "projects/dast_site_profiles/edit", type: :view do
end end
it 'passes DAST profiles library URL' do it 'passes DAST profiles library URL' do
expect(rendered).to include '/on_demand_scans/profiles' expect(rendered).to include '/on_demand_scans/profiles#site-profiles'
end end
it 'passes DAST site profile\'s data' do it 'passes DAST site profile\'s data' do
......
...@@ -17,6 +17,6 @@ RSpec.describe "projects/dast_site_profiles/new", type: :view do ...@@ -17,6 +17,6 @@ RSpec.describe "projects/dast_site_profiles/new", type: :view do
end end
it 'passes DAST profiles library URL' do it 'passes DAST profiles library URL' do
expect(rendered).to include '/on_demand_scans/profiles' expect(rendered).to include '/on_demand_scans/profiles#site-profiles'
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