mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
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:
@@ -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' } })
|
||||
|
||||
|
||||
Reference in New Issue
Block a user