From 1f20622f2b087eaf8738d60fae00a44b9c558ca3 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 7 Jun 2019 16:59:53 +0200 Subject: 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 --- server/tests/api/users/users.ts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'server/tests/api/users') diff --git a/server/tests/api/users/users.ts b/server/tests/api/users/users.ts index 9d2ef786f..b1f214fe2 100644 --- a/server/tests/api/users/users.ts +++ b/server/tests/api/users/users.ts @@ -17,11 +17,12 @@ import { getUserInformation, getUsersList, getUsersListPaginationAndSort, + getVideoChannel, getVideosList, login, makePutBodyRequest, rateVideo, - registerUser, + registerUserWithChannel, removeUser, removeVideo, ServerInfo, @@ -31,8 +32,7 @@ import { updateMyUser, updateUser, uploadVideo, - userLogin, - registerUserWithChannel, getVideoChannel + userLogin } from '../../../../shared/extra-utils' import { follow } from '../../../../shared/extra-utils/server/follows' import { setAccessTokensToServers } from '../../../../shared/extra-utils/users/login' @@ -618,7 +618,7 @@ describe('Test users', function () { describe('Registering a new user', function () { it('Should register a new user', async function () { - const user = { username: 'user_15', password: 'my super password' } + const user = { displayName: 'super user 15', username: 'user_15', password: 'my super password' } const channel = { name: 'my_user_15_channel', displayName: 'my channel rocks' } await registerUserWithChannel({ url: server.url, user, channel }) @@ -633,6 +633,13 @@ describe('Test users', function () { accessToken = await userLogin(server, user15) }) + it('Should have the correct display name', async function () { + const res = await getMyUserInformation(server.url, accessToken) + const user: User = res.body + + expect(user.account.displayName).to.equal('super user 15') + }) + it('Should have the correct video quota', async function () { const res = await getMyUserInformation(server.url, accessToken) const user = res.body -- cgit v1.2.3