Commit afab6285 authored by Minahil Nichols's avatar Minahil Nichols Committed by David O'Regan

Different copy on trial/registration flow

Update the copy of the 
company page based on trial
vs registration flow.


Changelog: added
EE: true
parent 84503b11
...@@ -56,6 +56,11 @@ export default { ...@@ -56,6 +56,11 @@ export default {
...companySizes, ...companySizes,
]; ];
}, },
descriptionText() {
return this.trial
? this.$options.i18n.description.trial
: this.$options.i18n.description.registration;
},
}, },
i18n: { i18n: {
companyNameLabel: LEADS_COMPANY_NAME_LABEL, companyNameLabel: LEADS_COMPANY_NAME_LABEL,
...@@ -67,7 +72,13 @@ export default { ...@@ -67,7 +72,13 @@ export default {
optional: __('(optional)'), optional: __('(optional)'),
websiteLabel: __('Website'), websiteLabel: __('Website'),
trialLabel: __('GitLab Ultimate trial'), trialLabel: __('GitLab Ultimate trial'),
trialDescription: __('Try all GitLab features for free for 30 days. No credit card required.'), trialToggleDescription: __(
'Try all GitLab features for free for 30 days. No credit card required.',
),
description: {
trial: __('To activate your trial, we need additional details from you.'),
registration: __('To complete registration, we need additional details from you.'),
},
}, },
}; };
</script> </script>
...@@ -75,6 +86,7 @@ export default { ...@@ -75,6 +86,7 @@ export default {
<template> <template>
<gl-form :action="createLeadPath" method="post"> <gl-form :action="createLeadPath" method="post">
<input :value="$options.csrf.token" type="hidden" name="authenticity_token" /> <input :value="$options.csrf.token" type="hidden" name="authenticity_token" />
<gl-form-text class="gl-font-base gl-text-gray-400 gl-pb-3">{{ descriptionText }}</gl-form-text>
<div class="gl-display-flex gl-flex-direction-column gl-sm-flex-direction-row gl-mt-5"> <div class="gl-display-flex gl-flex-direction-column gl-sm-flex-direction-row gl-mt-5">
<gl-form-group <gl-form-group
:label="$options.i18n.companyNameLabel" :label="$options.i18n.companyNameLabel"
...@@ -146,7 +158,7 @@ export default { ...@@ -146,7 +158,7 @@ export default {
:optional-text="$options.i18n.optional" :optional-text="$options.i18n.optional"
optional optional
> >
<gl-form-text class="gl-pb-3">{{ $options.i18n.trialDescription }}</gl-form-text> <gl-form-text class="gl-pb-3">{{ $options.i18n.trialToggleDescription }}</gl-form-text>
<registration-trial-toggle :active="trial" data-testid="trial" /> <registration-trial-toggle :active="trial" data-testid="trial" />
</gl-form-group> </gl-form-group>
<gl-button type="submit" variant="confirm" class="gl-w-20"> <gl-button type="submit" variant="confirm" class="gl-w-20">
......
import { GlButton, GlForm } from '@gitlab/ui'; import { GlButton, GlForm, GlFormText } from '@gitlab/ui';
import { createLocalVue } from '@vue/test-utils'; import { createLocalVue } from '@vue/test-utils';
import { nextTick } from 'vue';
import RegistrationForm from 'ee/registrations/components/company_form.vue'; import RegistrationForm from 'ee/registrations/components/company_form.vue';
import { shallowMountExtended } from 'helpers/vue_test_utils_helper'; import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
import { TRIAL_FORM_SUBMIT_TEXT } from 'ee/trials/constants'; import { TRIAL_FORM_SUBMIT_TEXT } from 'ee/trials/constants';
...@@ -22,6 +23,7 @@ describe('RegistrationForm', () => { ...@@ -22,6 +23,7 @@ describe('RegistrationForm', () => {
}); });
}; };
const findDescription = () => wrapper.findComponent(GlFormText);
const findButton = () => wrapper.findComponent(GlButton); const findButton = () => wrapper.findComponent(GlButton);
const findForm = () => wrapper.findComponent(GlForm); const findForm = () => wrapper.findComponent(GlForm);
const findFormInput = (testId) => wrapper.findByTestId(testId); const findFormInput = (testId) => wrapper.findByTestId(testId);
...@@ -35,6 +37,17 @@ describe('RegistrationForm', () => { ...@@ -35,6 +37,17 @@ describe('RegistrationForm', () => {
}); });
describe('rendering', () => { describe('rendering', () => {
it.each`
trialBool | descriptionText
${true} | ${'To activate your trial, we need additional details from you.'}
${false} | ${'To complete registration, we need additional details from you.'}
`('displays the correct page description text', async ({ trialBool, descriptionText }) => {
wrapper.setProps({ trial: trialBool });
await nextTick();
expect(findDescription().text()).toContain(descriptionText);
});
it('has the "Continue" text on the submit button', () => { it('has the "Continue" text on the submit button', () => {
expect(findButton().text()).toBe(TRIAL_FORM_SUBMIT_TEXT); expect(findButton().text()).toBe(TRIAL_FORM_SUBMIT_TEXT);
}); });
......
...@@ -39298,6 +39298,9 @@ msgstr "" ...@@ -39298,6 +39298,9 @@ msgstr ""
msgid "To access this domain create a new DNS record" msgid "To access this domain create a new DNS record"
msgstr "" msgstr ""
msgid "To activate your trial, we need additional details from you."
msgstr ""
msgid "To add a custom suffix, set up a Service Desk email address. %{linkStart}Learn more.%{linkEnd}" msgid "To add a custom suffix, set up a Service Desk email address. %{linkStart}Learn more.%{linkEnd}"
msgstr "" msgstr ""
...@@ -39307,6 +39310,9 @@ msgstr "" ...@@ -39307,6 +39310,9 @@ msgstr ""
msgid "To ask someone to look at a merge request, select %{strongStart}Request attention%{strongEnd}. Select again to remove the request." msgid "To ask someone to look at a merge request, select %{strongStart}Request attention%{strongEnd}. Select again to remove the request."
msgstr "" msgstr ""
msgid "To complete registration, we need additional details from you."
msgstr ""
msgid "To confirm, type %{phrase_code}" msgid "To confirm, type %{phrase_code}"
msgstr "" msgstr ""
......
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