Commit 19fe2cd2 authored by Ezekiel Kigbo's avatar Ezekiel Kigbo

Merge branch 'ag-trim-input' into 'master'

Trim input from subscription activation from

See merge request gitlab-org/gitlab!62695
parents 7ff1e6f8 58a44b27
...@@ -136,7 +136,7 @@ export default { ...@@ -136,7 +136,7 @@ export default {
</label> </label>
<gl-form-input <gl-form-input
id="activation-code-group" id="activation-code-group"
v-model="form.fields.activationCode.value" v-model.trim="form.fields.activationCode.value"
v-validation:[form.showValidation] v-validation:[form.showValidation]
:disabled="isLoading" :disabled="isLoading"
:placeholder="$options.i18n.pasteActivationCode" :placeholder="$options.i18n.pasteActivationCode"
......
...@@ -23,7 +23,8 @@ localVue.use(VueApollo); ...@@ -23,7 +23,8 @@ localVue.use(VueApollo);
describe('CloudLicenseApp', () => { describe('CloudLicenseApp', () => {
let wrapper; let wrapper;
const fakeActivationCode = 'gEg959hDCkvM2d4Der5RyktT'; const fakeActivationCode = 'gEg959hDCkvM2d4Der5RyktT ';
const fakeActivationCodeTrimmed = 'gEg959hDCkvM2d4Der5RyktT';
const createMockApolloProvider = (resolverMock) => { const createMockApolloProvider = (resolverMock) => {
localVue.use(VueApollo); localVue.use(VueApollo);
...@@ -134,7 +135,7 @@ describe('CloudLicenseApp', () => { ...@@ -134,7 +135,7 @@ describe('CloudLicenseApp', () => {
it('calls mutate with the correct variables', () => { it('calls mutate with the correct variables', () => {
expect(mutationMock).toHaveBeenCalledWith({ expect(mutationMock).toHaveBeenCalledWith({
gitlabSubscriptionActivateInput: { gitlabSubscriptionActivateInput: {
activationCode: fakeActivationCode, activationCode: fakeActivationCodeTrimmed,
}, },
}); });
}); });
......
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