Commit bc85f602 authored by Jackie Fraser's avatar Jackie Fraser

Copy updates for PipelineTourSuccessModal

Implements Copy updates for "Success Modal" from Growth experiment
parent 40caa9d0
...@@ -11,8 +11,12 @@ export default { ...@@ -11,8 +11,12 @@ export default {
beginnerLink: beginnerLink:
'https://about.gitlab.com/blog/2018/01/22/a-beginners-guide-to-continuous-integration/', 'https://about.gitlab.com/blog/2018/01/22/a-beginners-guide-to-continuous-integration/',
exampleLink: 'https://docs.gitlab.com/ee/ci/examples/', exampleLink: 'https://docs.gitlab.com/ee/ci/examples/',
codeQualityLink: 'https://docs.gitlab.com/ee/user/project/merge_requests/code_quality.html',
bodyMessage: s__( bodyMessage: s__(
'MR widget|The pipeline will now run automatically every time you commit code. Pipelines are useful for deploying static web pages, detecting vulnerabilities in dependencies, static or dynamic application security testing (SAST and DAST), and so much more!', `MR widget|The pipeline will test your code on every commit. A %{codeQualityLinkStart}code quality report%{codeQualityLinkEnd} will appear in your merge requests to warn you about potential code degradations.`,
),
helpMessage: s__(
`MR widget|Take a look at our %{beginnerLinkStart}Beginner's Guide to Continuous Integration%{beginnerLinkEnd} and our %{exampleLinkStart}examples of GitLab CI/CD%{exampleLinkEnd} to learn more.`,
), ),
modalTitle: sprintf( modalTitle: sprintf(
__("That's it, well done!%{celebrate}"), __("That's it, well done!%{celebrate}"),
...@@ -75,15 +79,15 @@ export default { ...@@ -75,15 +79,15 @@ export default {
modal-id="success-pipeline-modal-id-not-used" modal-id="success-pipeline-modal-id-not-used"
> >
<p> <p>
{{ $options.bodyMessage }} <gl-sprintf :message="$options.bodyMessage">
<template #codeQualityLink="{content}">
<gl-link :href="$options.codeQualityLink" target="_blank" class="font-size-inherit">{{
content
}}</gl-link>
</template>
</gl-sprintf>
</p> </p>
<gl-sprintf <gl-sprintf :message="$options.helpMessage">
:message="
s__(`MR widget|Take a look at our %{beginnerLinkStart}Beginner's Guide to Continuous Integration%{beginnerLinkEnd}
and our %{exampleLinkStart}examples of GitLab CI/CD%{exampleLinkEnd}
to see all the cool stuff you can do with it.`)
"
>
<template #beginnerLink="{content}"> <template #beginnerLink="{content}">
<gl-link :href="$options.beginnerLink" target="_blank"> <gl-link :href="$options.beginnerLink" target="_blank">
{{ content }} {{ content }}
...@@ -105,7 +109,7 @@ export default { ...@@ -105,7 +109,7 @@ export default {
:data-track-event="$options.trackEvent" :data-track-event="$options.trackEvent"
:data-track-label="trackLabel" :data-track-label="trackLabel"
> >
{{ __('Go to Pipelines') }} {{ __('See your pipeline in action') }}
</a> </a>
</template> </template>
</gl-modal> </gl-modal>
......
...@@ -54,13 +54,9 @@ document.addEventListener('DOMContentLoaded', () => { ...@@ -54,13 +54,9 @@ document.addEventListener('DOMContentLoaded', () => {
new Vue({ new Vue({
el: successPipelineEl, el: successPipelineEl,
render(createElement) { render(createElement) {
const { commitCookie, goToPipelinesPath, humanAccess } = this.$el.dataset;
return createElement(PipelineTourSuccessModal, { return createElement(PipelineTourSuccessModal, {
props: { props: {
goToPipelinesPath, ...successPipelineEl.dataset,
commitCookie,
humanAccess,
}, },
}); });
}, },
......
...@@ -11305,9 +11305,6 @@ msgstr "" ...@@ -11305,9 +11305,6 @@ msgstr ""
msgid "Go to <strong>Issues</strong> > <strong>Boards</strong> to access your personalized learning issue board." msgid "Go to <strong>Issues</strong> > <strong>Boards</strong> to access your personalized learning issue board."
msgstr "" msgstr ""
msgid "Go to Pipelines"
msgstr ""
msgid "Go to Webhooks" msgid "Go to Webhooks"
msgstr "" msgstr ""
...@@ -14105,10 +14102,10 @@ msgstr "" ...@@ -14105,10 +14102,10 @@ msgstr ""
msgid "MERGED" msgid "MERGED"
msgstr "" msgstr ""
msgid "MR widget|Take a look at our %{beginnerLinkStart}Beginner's Guide to Continuous Integration%{beginnerLinkEnd} and our %{exampleLinkStart}examples of GitLab CI/CD%{exampleLinkEnd} to see all the cool stuff you can do with it." msgid "MR widget|Take a look at our %{beginnerLinkStart}Beginner's Guide to Continuous Integration%{beginnerLinkEnd} and our %{exampleLinkStart}examples of GitLab CI/CD%{exampleLinkEnd} to learn more."
msgstr "" msgstr ""
msgid "MR widget|The pipeline will now run automatically every time you commit code. Pipelines are useful for deploying static web pages, detecting vulnerabilities in dependencies, static or dynamic application security testing (SAST and DAST), and so much more!" msgid "MR widget|The pipeline will test your code on every commit. A %{codeQualityLinkStart}code quality report%{codeQualityLinkEnd} will appear in your merge requests to warn you about potential code degradations."
msgstr "" msgstr ""
msgid "MRApprovals|Approvals" msgid "MRApprovals|Approvals"
...@@ -20973,6 +20970,9 @@ msgstr "" ...@@ -20973,6 +20970,9 @@ msgstr ""
msgid "See what's new at GitLab" msgid "See what's new at GitLab"
msgstr "" msgstr ""
msgid "See your pipeline in action"
msgstr ""
msgid "Select" msgid "Select"
msgstr "" msgstr ""
......
import pipelineTourSuccess from '~/blob/pipeline_tour_success_modal.vue'; import pipelineTourSuccess from '~/blob/pipeline_tour_success_modal.vue';
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
import { GlSprintf, GlModal } from '@gitlab/ui'; import { GlSprintf, GlModal, GlLink } from '@gitlab/ui';
import { mockTracking, triggerEvent, unmockTracking } from 'helpers/tracking_helper'; import { mockTracking, triggerEvent, unmockTracking } from 'helpers/tracking_helper';
import modalProps from './pipeline_tour_success_mock_data'; import modalProps from './pipeline_tour_success_mock_data';
...@@ -18,6 +18,7 @@ describe('PipelineTourSuccessModal', () => { ...@@ -18,6 +18,7 @@ describe('PipelineTourSuccessModal', () => {
propsData: modalProps, propsData: modalProps,
stubs: { stubs: {
GlModal, GlModal,
GlSprintf,
}, },
}); });
...@@ -37,6 +38,10 @@ describe('PipelineTourSuccessModal', () => { ...@@ -37,6 +38,10 @@ describe('PipelineTourSuccessModal', () => {
expect(sprintf.exists()).toBe(true); expect(sprintf.exists()).toBe(true);
}); });
it('renders the link for codeQualityLink', () => {
expect(wrapper.find(GlLink).attributes('href')).toBe(wrapper.vm.$options.codeQualityLink);
});
it('calls to remove cookie', () => { it('calls to remove cookie', () => {
wrapper.vm.disableModalFromRenderingAgain(); wrapper.vm.disableModalFromRenderingAgain();
......
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