X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=server%2Ftests%2Fapi%2Fusers%2Fusers.ts;h=d15daeba5097de6b0332521c483ff7127e0e0997;hb=e722fb5923ddf11d72e48cec9788abc64327c22f;hp=7023b3f08a8ae524a515b92d3aa658c5403b2f2e;hpb=81d02aac56d76227c094d40b17b29875d88417f4;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/users/users.ts b/server/tests/api/users/users.ts index 7023b3f08..d15daeba5 100644 --- a/server/tests/api/users/users.ts +++ b/server/tests/api/users/users.ts @@ -380,7 +380,7 @@ describe('Test users', function () { }) it('Should disable webtorrent, enable HLS, and update my quota', async function () { - this.timeout(60000) + this.timeout(160000) { const config = await server.config.getCustomConfig() @@ -604,7 +604,9 @@ describe('Test users', function () { await server.users.updateMyAvatar({ token: userToken, fixture }) const user = await server.users.getMyInfo({ token: userToken }) - await testImage(server.url, 'avatar-resized', user.account.avatar.path, '.gif') + for (const avatar of user.account.avatars) { + await testImage(server.url, `avatar-resized-${avatar.width}x${avatar.width}`, avatar.path, '.gif') + } }) it('Should be able to update my avatar with a gif, and then a png', async function () { @@ -614,10 +616,19 @@ describe('Test users', function () { await server.users.updateMyAvatar({ token: userToken, fixture }) const user = await server.users.getMyInfo({ token: userToken }) - await testImage(server.url, 'avatar-resized', user.account.avatar.path, extension) + for (const avatar of user.account.avatars) { + await testImage(server.url, `avatar-resized-${avatar.width}x${avatar.width}`, avatar.path, extension) + } } }) + it('Should still have the same amount of videos in my account', async function () { + const { total, data } = await server.videos.listMyVideos({ token: userToken }) + + expect(total).to.equal(2) + expect(data).to.have.lengthOf(2) + }) + it('Should be able to update my display name', async function () { await server.users.updateMe({ token: userToken, displayName: 'new display name' })