Skip to content

Commit

Permalink
feat: ENG-2178: Update mobile field messaging (#374)
Browse files Browse the repository at this point in the history
* Update copy

* Update tests

* feat: Amazon donation related mobile field updates
  • Loading branch information
AndyEPhipps authored Feb 2, 2023
1 parent 8e6bf70 commit dae86e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cypress/integration/submit_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ describe('e2e test', () => {
cy.get('#field-input--mobile').type('sdf').clear().click();
cy.get('#field-error--mobile>span').should('contain','Please fill in your mobile number');
cy.get('#field-input--mobile').type('sdf');
cy.get('#field-error--mobile>span').should('contain', 'Please enter a valid mobile phone number - it must be the same number that you used to make your donation.');
cy.get('#field-error--mobile>span').should('contain', 'Please enter a valid mobile phone number - it must be the same number associated with your donation.');
cy.get('#field-input--mobile').clear().type(faker.phone.phoneNumber('02########'));
cy.get('#field-error--mobile>span').should('contain', 'Please enter a valid mobile phone number - it must be the same number that you used to make your donation.');
cy.get('#field-error--mobile>span').should('contain', 'Please enter a valid mobile phone number - it must be the same number associated with your donation.');
cy.get('#field-input--mobile').clear().type(faker.phone.phoneNumber('07#########'));
cy.get('#field-error--mobile>span').should('not.exist')
});
Expand Down
4 changes: 2 additions & 2 deletions src/pages/GiftAid/SubmitForm/SubmitFormFields.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ export const submitFormFields = {
label: 'Mobile number',
required: true,
pattern: '^07[0-9]{9}$',
helpText: 'Enter the one you used for your text donation or called to donate on',
helpText: 'Enter the one associated with your donation',
emptyFieldErrorText: 'Please fill in your mobile number',
invalidErrorText: 'Please enter a valid mobile phone number - it must be the same number that you used to make your donation.'
invalidErrorText: 'Please enter a valid mobile phone number - it must be the same number associated with your donation.'
},
firstName: {
id: 'firstname',
Expand Down

0 comments on commit dae86e2

Please sign in to comment.