diff --git a/api-js/src/locale/en/messages.js b/api-js/src/locale/en/messages.js index 46721e03f..e6ba56642 100644 --- a/api-js/src/locale/en/messages.js +++ b/api-js/src/locale/en/messages.js @@ -499,7 +499,7 @@ 'User could not be queried.': 'User could not be queried.', 'User role was updated successfully.': 'User role was updated successfully.', - 'Username already in use.': 'Username already in use.', + 'Email already in use.': 'Email already in use.', 'Username not available, please try another.': 'Username not available, please try another.', 'You must provide a `first` or `last` value to properly paginate the `DKIMResults` connection.': diff --git a/api-js/src/locale/fr/messages.js b/api-js/src/locale/fr/messages.js index a7501236f..e21078361 100644 --- a/api-js/src/locale/fr/messages.js +++ b/api-js/src/locale/fr/messages.js @@ -260,7 +260,7 @@ 'Unable to verify unknown organization.': 'todo', 'User could not be queried.': 'todo', 'User role was updated successfully.': 'todo', - 'Username already in use.': 'todo', + 'Email already in use.': 'todo', 'Username not available, please try another.': 'todo', 'You must provide a `first` or `last` value to properly paginate the `DKIMResults` connection.': 'todo', diff --git a/api-js/src/user/mutations/__tests__/sign-up.test.js b/api-js/src/user/mutations/__tests__/sign-up.test.js index f646aecbe..7dd5dbef8 100644 --- a/api-js/src/user/mutations/__tests__/sign-up.test.js +++ b/api-js/src/user/mutations/__tests__/sign-up.test.js @@ -680,7 +680,7 @@ describe('testing user sign up', () => { ]) }) }) - describe('when the user name already in use', () => { + describe('when the user name (email) already in use', () => { beforeEach(async () => { await collections.users.save({ userName: 'test.account@istio.actually.exists', @@ -690,7 +690,7 @@ describe('testing user sign up', () => { emailValidated: false, }) }) - it('returns a user name already in use error', async () => { + it('returns an email already in use error', async () => { const response = await graphql( schema, ` @@ -752,7 +752,7 @@ describe('testing user sign up', () => { signUp: { result: { code: 400, - description: 'Username already in use.', + description: 'Email already in use.', }, }, }, @@ -760,7 +760,7 @@ describe('testing user sign up', () => { expect(response).toEqual(error) expect(consoleOutput).toEqual([ - 'User: test.account@istio.actually.exists tried to sign up, however there is already an account in use with that username.', + 'User: test.account@istio.actually.exists tried to sign up, however there is already an account in use with that email.', ]) }) }) @@ -1853,7 +1853,7 @@ describe('testing user sign up', () => { ]) }) }) - describe('when the user name already in use', () => { + describe('when the user name (email) already in use', () => { beforeEach(async () => { await collections.users.save({ userName: 'test.account@istio.actually.exists', @@ -1863,7 +1863,7 @@ describe('testing user sign up', () => { emailValidated: false, }) }) - it('returns a user name already in use error', async () => { + it('returns an email already in use error', async () => { const response = await graphql( schema, ` @@ -1933,7 +1933,7 @@ describe('testing user sign up', () => { expect(response).toEqual(error) expect(consoleOutput).toEqual([ - 'User: test.account@istio.actually.exists tried to sign up, however there is already an account in use with that username.', + 'User: test.account@istio.actually.exists tried to sign up, however there is already an account in use with that email.', ]) }) }) diff --git a/api-js/src/user/mutations/sign-up.js b/api-js/src/user/mutations/sign-up.js index de72db3d0..15e304256 100644 --- a/api-js/src/user/mutations/sign-up.js +++ b/api-js/src/user/mutations/sign-up.js @@ -97,12 +97,12 @@ export const signUp = new mutationWithClientMutationId({ if (typeof checkUser !== 'undefined') { console.warn( - `User: ${userName} tried to sign up, however there is already an account in use with that username.`, + `User: ${userName} tried to sign up, however there is already an account in use with that email.`, ) return { _type: 'error', code: 400, - description: i18n._(t`Username already in use.`), + description: i18n._(t`Email already in use.`), } }