Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api-js/src/locale/en/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.':
Expand Down
2 changes: 1 addition & 1 deletion api-js/src/locale/fr/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
14 changes: 7 additions & 7 deletions api-js/src/user/mutations/__tests__/sign-up.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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,
`
Expand Down Expand Up @@ -752,15 +752,15 @@ describe('testing user sign up', () => {
signUp: {
result: {
code: 400,
description: 'Username already in use.',
description: 'Email already in use.',
},
},
},
}

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.',
])
})
})
Expand Down Expand Up @@ -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',
Expand All @@ -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,
`
Expand Down Expand Up @@ -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.',
])
})
})
Expand Down
4 changes: 2 additions & 2 deletions api-js/src/user/mutations/sign-up.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.`),
}
}

Expand Down