Commit 0f2a22e7 authored by Simon Knox's avatar Simon Knox

Merge branch 'fix-dast-site-validation' into 'master'

Realign DAST site validation frontend with backend

See merge request gitlab-org/gitlab!46475
parents e5c1f23e cab75d57
......@@ -214,9 +214,7 @@ export default {
try {
const {
data: {
project: {
dastSiteValidation: { status },
},
project: { dastSiteValidation },
},
} = await this.$apollo.query({
query: dastSiteValidationQuery,
......@@ -226,7 +224,7 @@ export default {
},
fetchPolicy: fetchPolicies.NETWORK_ONLY,
});
this.validationStatus = status;
this.validationStatus = dastSiteValidation?.status || null;
if (this.validationStatusMatches(INPROGRESS)) {
await new Promise(resolve => {
......@@ -254,7 +252,7 @@ export default {
} = await this.$apollo.mutate({
mutation: dastSiteTokenCreateMutation,
variables: {
projectFullPath: this.fullPath,
fullPath: this.fullPath,
targetUrl: this.form.fields.targetUrl.value,
},
});
......
mutation dastSiteTokenCreate($projectFullPath: ID!, $targetUrl: String!) {
dastSiteTokenCreate(input: { projectFullPath: $projectFullPath, targetUrl: $targetUrl }) {
mutation dastSiteTokenCreate($fullPath: ID!, $targetUrl: String!) {
dastSiteTokenCreate(input: { fullPath: $fullPath, targetUrl: $targetUrl }) {
id
token
errors
......
......@@ -237,7 +237,7 @@ describe('DastSiteProfileForm', () => {
await waitForPromises();
expect(requestHandlers.dastSiteTokenCreate).toHaveBeenCalledWith({
projectFullPath: fullPath,
fullPath,
targetUrl,
});
......
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