Commit 4b89bd7c authored by Philip Cunningham's avatar Philip Cunningham Committed by Kushal Pandya

Align dast site validation frontend with backend

Fix incorrect value and remove redundant prefix.
parent 7b3f3de2
...@@ -146,7 +146,7 @@ export default { ...@@ -146,7 +146,7 @@ export default {
return DAST_SITE_VALIDATION_METHODS[this.validationMethod].i18n.locationStepLabel; return DAST_SITE_VALIDATION_METHODS[this.validationMethod].i18n.locationStepLabel;
}, },
httpHeader() { httpHeader() {
return `${DAST_SITE_VALIDATION_HTTP_HEADER_KEY}: uuid-code-${this.token}`; return `${DAST_SITE_VALIDATION_HTTP_HEADER_KEY}: ${this.token}`;
}, },
}, },
watch: { watch: {
...@@ -193,7 +193,7 @@ export default { ...@@ -193,7 +193,7 @@ export default {
projectFullPath: this.fullPath, projectFullPath: this.fullPath,
dastSiteTokenId: this.tokenId, dastSiteTokenId: this.tokenId,
validationPath: this.validationPath, validationPath: this.validationPath,
strategy: this.validationMethod, validationStrategy: this.validationMethod,
}, },
}); });
if (errors?.length) { if (errors?.length) {
......
import { s__ } from '~/locale'; import { s__ } from '~/locale';
export const DAST_SITE_VALIDATION_METHOD_TEXT_FILE = 'TEXT_FILE'; export const DAST_SITE_VALIDATION_METHOD_TEXT_FILE = 'TEXT_FILE';
export const DAST_SITE_VALIDATION_METHOD_HTTP_HEADER = 'HTTP_HEADER'; export const DAST_SITE_VALIDATION_METHOD_HTTP_HEADER = 'HEADER';
export const DAST_SITE_VALIDATION_METHODS = { export const DAST_SITE_VALIDATION_METHODS = {
[DAST_SITE_VALIDATION_METHOD_TEXT_FILE]: { [DAST_SITE_VALIDATION_METHOD_TEXT_FILE]: {
......
...@@ -222,7 +222,7 @@ describe('DastSiteValidation', () => { ...@@ -222,7 +222,7 @@ describe('DastSiteValidation', () => {
it('shows a code block containing the http-header key with the given token', () => { it('shows a code block containing the http-header key with the given token', () => {
expect( expect(
withinComponent().getByText(`Gitlab-On-Demand-DAST: uuid-code-${token}`, { withinComponent().getByText(`Gitlab-On-Demand-DAST: ${token}`, {
selector: 'code', selector: 'code',
}), }),
).not.toBe(null); ).not.toBe(null);
...@@ -233,7 +233,7 @@ describe('DastSiteValidation', () => { ...@@ -233,7 +233,7 @@ describe('DastSiteValidation', () => {
expect(clipboardButton.exists()).toBe(true); expect(clipboardButton.exists()).toBe(true);
expect(clipboardButton.props()).toMatchObject({ expect(clipboardButton.props()).toMatchObject({
text: `Gitlab-On-Demand-DAST: uuid-code-${token}`, text: `Gitlab-On-Demand-DAST: ${token}`,
title: 'Copy HTTP header to clipboard', title: 'Copy HTTP header to clipboard',
}); });
}); });
...@@ -282,7 +282,7 @@ describe('DastSiteValidation', () => { ...@@ -282,7 +282,7 @@ describe('DastSiteValidation', () => {
projectFullPath: fullPath, projectFullPath: fullPath,
dastSiteTokenId: tokenId, dastSiteTokenId: tokenId,
validationPath: wrapper.vm.validationPath, validationPath: wrapper.vm.validationPath,
strategy: wrapper.vm.validationMethod, validationStrategy: wrapper.vm.validationMethod,
}); });
}); });
......
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