diff --git a/backend/src/schema/resolvers/registration.spec.js b/backend/src/schema/resolvers/registration.spec.js index d9c05fde6..e94e36b4b 100644 --- a/backend/src/schema/resolvers/registration.spec.js +++ b/backend/src/schema/resolvers/registration.spec.js @@ -327,6 +327,7 @@ describe('SignupVerification', () => { $password: String! $email: String! $nonce: String! + $about: String $termsAndConditionsAgreedVersion: String! ) { SignupVerification( @@ -334,6 +335,7 @@ describe('SignupVerification', () => { password: $password email: $email nonce: $nonce + about: $about termsAndConditionsAgreedVersion: $termsAndConditionsAgreedVersion ) { id @@ -423,6 +425,15 @@ describe('SignupVerification', () => { expect(emails).toHaveLength(1) }) + it('set `about` attribute of User', async () => { + variables = { ...variables, about: 'Find this description in the user profile' } + await mutate({ mutation, variables }) + const user = await neode.first('User', { name: 'John Doe' }) + await expect(user.toJson()).resolves.toMatchObject({ + about: 'Find this description in the user profile', + }) + }) + it('marks the EmailAddress as primary', async () => { const cypher = ` MATCH(email:EmailAddress)<-[:PRIMARY_EMAIL]-(u:User {name: {name}}) diff --git a/webapp/components/Registration/CreateUserAccount.spec.js b/webapp/components/Registration/CreateUserAccount.spec.js index 3ee358db6..75e1ade83 100644 --- a/webapp/components/Registration/CreateUserAccount.spec.js +++ b/webapp/components/Registration/CreateUserAccount.spec.js @@ -1,5 +1,6 @@ import { config, mount, createLocalVue } from '@vue/test-utils' -import CreateUserAccount, { SignupVerificationMutation } from './CreateUserAccount' +import CreateUserAccount from './CreateUserAccount' +import { SignupVerificationMutation } from '~/graphql/Registration.js' import Styleguide from '@human-connection/styleguide' const localVue = createLocalVue() @@ -55,6 +56,7 @@ describe('CreateUserAccount', () => { wrapper = Wrapper() wrapper.find('input#name').setValue('John Doe') wrapper.find('input#password').setValue('hellopassword') + wrapper.find('textarea#about').setValue('Hello I am the `about` attribute') wrapper.find('input#passwordConfirmation').setValue('hellopassword') wrapper.find('input#checkbox').setChecked() await wrapper.find('form').trigger('submit') @@ -72,7 +74,7 @@ describe('CreateUserAccount', () => { await action() const expected = expect.objectContaining({ variables: { - about: '', + about: 'Hello I am the `about` attribute', name: 'John Doe', email: 'sixseven@example.org', nonce: '666777', diff --git a/webapp/components/Registration/CreateUserAccount.vue b/webapp/components/Registration/CreateUserAccount.vue index e1ff98a5c..9e4d899e7 100644 --- a/webapp/components/Registration/CreateUserAccount.vue +++ b/webapp/components/Registration/CreateUserAccount.vue @@ -25,7 +25,7 @@ :placeholder="$t('settings.data.namePlaceholder')" />