Commit 7b3eb170 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch...

Merge branch '208865-follow-up-from-follow-pajamas-on-security-configuration-link-icons' into 'master'

Remove unused pipeline-help-path from sec config

Closes #208865

See merge request gitlab-org/gitlab!26436
parents 3c0a33c5 e14c4962
...@@ -18,10 +18,6 @@ export default { ...@@ -18,10 +18,6 @@ export default {
type: String, type: String,
required: true, required: true,
}, },
pipelinesHelpPagePath: {
type: String,
required: true,
},
autoDevopsHelpPagePath: { autoDevopsHelpPagePath: {
type: String, type: String,
required: true, required: true,
...@@ -44,15 +40,7 @@ export default { ...@@ -44,15 +40,7 @@ export default {
return sprintf(body, { wordBreakOpportunity }, false); return sprintf(body, { wordBreakOpportunity }, false);
}, },
callOutLink() { callOutLink() {
if (this.autoDevopsEnabled) { return this.autoDevopsEnabled ? this.autoDevopsHelpPagePath : this.latestPipelinePath;
return this.autoDevopsHelpPagePath;
}
if (this.latestPipelinePath) {
return this.latestPipelinePath;
}
return this.pipelinesHelpPagePath;
}, },
calloutContent() { calloutContent() {
const bodyDefault = __(`The configuration status of the table below only applies to the default branch and const bodyDefault = __(`The configuration status of the table below only applies to the default branch and
......
...@@ -9,7 +9,6 @@ export default function init() { ...@@ -9,7 +9,6 @@ export default function init() {
features, features,
helpPagePath, helpPagePath,
latestPipelinePath, latestPipelinePath,
pipelinesHelpPagePath,
} = el.dataset; } = el.dataset;
return new Vue({ return new Vue({
...@@ -25,7 +24,6 @@ export default function init() { ...@@ -25,7 +24,6 @@ export default function init() {
features: JSON.parse(features), features: JSON.parse(features),
helpPagePath, helpPagePath,
latestPipelinePath, latestPipelinePath,
pipelinesHelpPagePath,
}, },
}); });
}, },
......
...@@ -13,7 +13,6 @@ describe('Security Configuration App', () => { ...@@ -13,7 +13,6 @@ describe('Security Configuration App', () => {
latestPipelinePath: 'http://latestPipelinePath', latestPipelinePath: 'http://latestPipelinePath',
autoDevopsHelpPagePath: 'http://autoDevopsHelpPagePath', autoDevopsHelpPagePath: 'http://autoDevopsHelpPagePath',
helpPagePath: 'http://helpPagePath', helpPagePath: 'http://helpPagePath',
pipelinesHelpPagePath: 'http://pipelineHelpPagePath',
...props, ...props,
}, },
}); });
...@@ -46,14 +45,13 @@ describe('Security Configuration App', () => { ...@@ -46,14 +45,13 @@ describe('Security Configuration App', () => {
}); });
it.each` it.each`
autoDevopsEnabled | latestPipelinePath | expectedUrl autoDevopsEnabled | expectedUrl
${true} | ${'http://latestPipeline'} | ${'http://autoDevopsHelpPagePath'} ${true} | ${'http://autoDevopsHelpPagePath'}
${false} | ${'http://latestPipeline'} | ${'http://latestPipeline'} ${false} | ${'http://latestPipelinePath'}
${false} | ${undefined} | ${'http://pipelineHelpPagePath'}
`( `(
'displays a link to "$expectedUrl" when autoDevops is "$autoDevopsEnabled" and pipelinesPath is $latestPipelinePath', 'displays a link to "$expectedUrl" when autoDevops is "$autoDevopsEnabled"',
({ autoDevopsEnabled, latestPipelinePath, expectedUrl }) => { ({ autoDevopsEnabled, expectedUrl }) => {
createComponent({ autoDevopsEnabled, latestPipelinePath }); createComponent({ autoDevopsEnabled });
expect(getPipelinesLink().attributes('href')).toBe(expectedUrl); expect(getPipelinesLink().attributes('href')).toBe(expectedUrl);
expect(getPipelinesLink().attributes('rel')).toBe('noopener'); expect(getPipelinesLink().attributes('rel')).toBe('noopener');
......
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