Improve registration

* Add ability to set the user display name
 * Use display name to guess the username/channel name
 * Add explanations about what is the purpose of a username/channel name
 * Add a loader at the "done" step
This commit is contained in:
Chocobozzz
2019-06-07 16:59:53 +02:00
parent 1a03bea0c4
commit 1f20622f2b
23 changed files with 253 additions and 76 deletions

View File

@@ -643,6 +643,7 @@ describe('Test users API validators', function () {
const registrationPath = path + '/register'
const baseCorrectParams = {
username: 'user3',
displayName: 'super user',
email: 'test3@example.com',
password: 'my super password'
}
@@ -725,6 +726,12 @@ describe('Test users API validators', function () {
})
})
it('Should fail with a bad display name', async function () {
const fields = immutableAssign(baseCorrectParams, { displayName: 'a'.repeat(150) })
await makePostBodyRequest({ url: server.url, path: registrationPath, token: server.accessToken, fields })
})
it('Should fail with a bad channel name', async function () {
const fields = immutableAssign(baseCorrectParams, { channel: { name: '[]azf', displayName: 'toto' } })