Commit 8d9b0d04 authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Merge branch '229959-use-help_page_path-for-links-in-pipelinetoursuccessmodal' into 'master'

Use help_page_path for links in PipelineTourSuccessModal

See merge request gitlab-org/gitlab!47025
parents 1705f434 9b391b99
......@@ -9,8 +9,6 @@ const trackingMixin = Tracking.mixin();
export default {
beginnerLink:
'https://about.gitlab.com/blog/2018/01/22/a-beginners-guide-to-continuous-integration/',
exampleLink: 'https://docs.gitlab.com/ee/ci/examples/',
codeQualityLink: 'https://docs.gitlab.com/ee/user/project/merge_requests/code_quality.html',
goToTrackValuePipelines: 10,
goToTrackValueMergeRequest: 20,
trackEvent: 'click_button',
......@@ -39,6 +37,14 @@ export default {
type: String,
required: true,
},
exampleLink: {
type: String,
required: true,
},
codeQualityLink: {
type: String,
required: true,
},
},
data() {
return {
......@@ -93,7 +99,7 @@ export default {
<p>
<gl-sprintf :message="$options.i18n.bodyMessage">
<template #codeQualityLink="{content}">
<gl-link :href="$options.codeQualityLink" target="_blank" class="font-size-inherit">{{
<gl-link :href="codeQualityLink" target="_blank" class="font-size-inherit">{{
content
}}</gl-link>
</template>
......@@ -106,7 +112,7 @@ export default {
</gl-link>
</template>
<template #exampleLink="{content}">
<gl-link :href="$options.exampleLink" target="_blank">
<gl-link :href="exampleLink" target="_blank">
{{ content }}
</gl-link>
</template>
......
.js-success-pipeline-modal{ data: { 'commit-cookie': suggest_pipeline_commit_cookie_name,
'go-to-pipelines-path': project_pipelines_path(@project),
'project-merge-requests-path': project_merge_requests_path(@project),
'example-link': help_page_path('ci/examples/README.md', anchor: 'gitlab-cicd-examples'),
'code-quality-link': help_page_path('user/project/merge_requests/code_quality'),
'human-access': @project.team.human_max_access(current_user&.id) } }
......@@ -3,6 +3,8 @@ const modalProps = {
projectMergeRequestsPath: 'some_mr_path',
commitCookie: 'some_cookie',
humanAccess: 'maintainer',
exampleLink: '/example',
codeQualityLink: '/code-quality-link',
};
export default modalProps;
......@@ -75,7 +75,7 @@ describe('PipelineTourSuccessModal', () => {
});
it('renders the link for codeQualityLink', () => {
expect(wrapper.find(GlLink).attributes('href')).toBe(wrapper.vm.$options.codeQualityLink);
expect(wrapper.find(GlLink).attributes('href')).toBe('/code-quality-link');
});
it('calls to remove cookie', () => {
......
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