Commit 8046d377 authored by Mehul Sharma's avatar Mehul Sharma Committed by Jacques Erasmus

Remove deprecated fullPath arguments from frontend DAST mutations

parent b5eb8b81
......@@ -247,14 +247,13 @@ export default {
const mutation = this.isEdit ? dastProfileUpdateMutation : dastProfileCreateMutation;
const responseType = this.isEdit ? 'dastProfileUpdate' : 'dastProfileCreate';
const input = {
fullPath: this.projectPath,
dastScannerProfileId: this.selectedScannerProfile.id,
dastSiteProfileId: this.selectedSiteProfile.id,
branchName: this.selectedBranch,
...(this.glFeatures.dastOnDemandScansScheduler
? { dastProfileSchedule: this.profileSchedule }
: {}),
...(this.isEdit ? { id: this.dastScan.id } : {}),
...(this.isEdit ? { id: this.dastScan.id } : { fullPath: this.projectPath }),
...serializeFormObject(this.form.fields),
[this.isEdit ? 'runAfterUpdate' : 'runAfterCreate']: runAfter,
};
......
......@@ -152,7 +152,6 @@ export default {
},
deleteProfile(profileType, profileId) {
const {
projectFullPath,
handleError,
profileSettings: {
[profileType]: {
......@@ -174,7 +173,6 @@ export default {
mutation: deletion.mutation,
variables: {
input: {
...(profileType !== 'dastProfiles' ? { fullPath: projectFullPath } : {}),
id: profileId,
},
},
......
......@@ -20,10 +20,6 @@ export default {
},
mixins: [glFeatureFlagsMixin()],
props: {
fullPath: {
type: String,
required: true,
},
errorMessage: {
type: String,
required: false,
......@@ -72,7 +68,6 @@ export default {
mutation: dastProfileRunMutation,
variables: {
input: {
fullPath: this.fullPath,
id,
},
},
......@@ -101,7 +96,6 @@ export default {
<template>
<profiles-list
:full-path="fullPath"
:error-message="error.errorMessage"
:error-details="error.errorDetails"
v-bind="$attrs"
......
......@@ -118,8 +118,7 @@ export default {
},
mutationVariables() {
return {
fullPath: this.projectFullPath,
...(this.isEdit ? { id: this.profile.id } : {}),
...(this.isEdit ? { id: this.profile.id } : { fullPath: this.projectFullPath }),
...serializeFormObject(this.form.fields),
};
},
......
......@@ -141,8 +141,7 @@ export default {
} = serializeFormObject(this.form.fields);
return {
fullPath: this.projectFullPath,
...(this.isEdit ? { id: this.profile.id } : {}),
...(this.isEdit ? { id: this.profile.id } : { fullPath: this.projectFullPath }),
profileName,
targetUrl,
targetType,
......
......@@ -428,7 +428,6 @@ describe('OnDemandScansForm', () => {
description: 'Tests for SQL injections',
dastScannerProfileId: passiveScannerProfile.id,
dastSiteProfileId: nonValidatedSiteProfile.id,
fullPath: projectPath,
runAfterUpdate: runAfter,
},
},
......
......@@ -120,9 +120,9 @@ describe('DastScannerProfileForm', () => {
});
describe.each`
title | profile | mutation | mutationVars | mutationKind
${'New scanner profile'} | ${{}} | ${dastScannerProfileCreateMutation} | ${{}} | ${'dastScannerProfileCreate'}
${'Edit scanner profile'} | ${defaultProfile} | ${dastScannerProfileUpdateMutation} | ${{ id: defaultProfile.id }} | ${'dastScannerProfileUpdate'}
title | profile | mutation | mutationVars | mutationKind
${'New scanner profile'} | ${{}} | ${dastScannerProfileCreateMutation} | ${{ fullPath: projectFullPath }} | ${'dastScannerProfileCreate'}
${'Edit scanner profile'} | ${defaultProfile} | ${dastScannerProfileUpdateMutation} | ${{ id: defaultProfile.id }} | ${'dastScannerProfileUpdate'}
`('$title', ({ profile, title, mutation, mutationVars, mutationKind }) => {
beforeEach(() => {
createComponent({
......@@ -155,7 +155,6 @@ describe('DastScannerProfileForm', () => {
profileName,
spiderTimeout,
targetTimeout,
fullPath: projectFullPath,
scanType,
useAjaxSpider,
showDebugMessages,
......
......@@ -186,9 +186,9 @@ describe('DastSiteProfileForm', () => {
});
describe.each`
title | profile | mutationVars | mutation | mutationKind
${'New site profile'} | ${{}} | ${{}} | ${dastSiteProfileCreateMutation} | ${'dastSiteProfileCreate'}
${'Edit site profile'} | ${siteProfileOne} | ${{ id: siteProfileOne.id }} | ${dastSiteProfileUpdateMutation} | ${'dastSiteProfileUpdate'}
title | profile | mutationVars | mutation | mutationKind
${'New site profile'} | ${{}} | ${{ fullPath: projectFullPath }} | ${dastSiteProfileCreateMutation} | ${'dastSiteProfileCreate'}
${'Edit site profile'} | ${siteProfileOne} | ${{ id: siteProfileOne.id }} | ${dastSiteProfileUpdateMutation} | ${'dastSiteProfileUpdate'}
`('$title', ({ profile, mutationVars, mutation, mutationKind }) => {
beforeEach(() => {
createComponent({
......@@ -208,7 +208,6 @@ describe('DastSiteProfileForm', () => {
expect(baseDastProfileForm.props('mutationVariables')).toEqual({
profileName,
targetUrl,
fullPath: projectFullPath,
excludedUrls: siteProfileOne.excludedUrls,
requestHeaders,
targetType: 'API',
......
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