]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/users/users.ts
Merge branch 'release/4.2.0' into develop
[github/Chocobozzz/PeerTube.git] / server / tests / api / users / users.ts
index 7023b3f08a8ae524a515b92d3aa658c5403b2f2e..d15daeba5097de6b0332521c483ff7127e0e0997 100644 (file)
@@ -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' })