Commit a5311fff authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'fix-front-end-issue-254185' into 'master'

Align dast site validation frontend with backend

See merge request gitlab-org/gitlab!47221
parents d9554bd5 4b89bd7c
......@@ -146,7 +146,7 @@ export default {
return DAST_SITE_VALIDATION_METHODS[this.validationMethod].i18n.locationStepLabel;
},
httpHeader() {
return `${DAST_SITE_VALIDATION_HTTP_HEADER_KEY}: uuid-code-${this.token}`;
return `${DAST_SITE_VALIDATION_HTTP_HEADER_KEY}: ${this.token}`;
},
},
watch: {
......@@ -193,7 +193,7 @@ export default {
projectFullPath: this.fullPath,
dastSiteTokenId: this.tokenId,
validationPath: this.validationPath,
strategy: this.validationMethod,
validationStrategy: this.validationMethod,
},
});
if (errors?.length) {
......
import { s__ } from '~/locale';
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 = {
[DAST_SITE_VALIDATION_METHOD_TEXT_FILE]: {
......
......@@ -222,7 +222,7 @@ describe('DastSiteValidation', () => {
it('shows a code block containing the http-header key with the given token', () => {
expect(
withinComponent().getByText(`Gitlab-On-Demand-DAST: uuid-code-${token}`, {
withinComponent().getByText(`Gitlab-On-Demand-DAST: ${token}`, {
selector: 'code',
}),
).not.toBe(null);
......@@ -233,7 +233,7 @@ describe('DastSiteValidation', () => {
expect(clipboardButton.exists()).toBe(true);
expect(clipboardButton.props()).toMatchObject({
text: `Gitlab-On-Demand-DAST: uuid-code-${token}`,
text: `Gitlab-On-Demand-DAST: ${token}`,
title: 'Copy HTTP header to clipboard',
});
});
......@@ -282,7 +282,7 @@ describe('DastSiteValidation', () => {
projectFullPath: fullPath,
dastSiteTokenId: tokenId,
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