]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/notifications/notifications-api.ts
Increase timeout
[github/Chocobozzz/PeerTube.git] / server / tests / api / notifications / notifications-api.ts
index 647d783b54e055894844db116405a6c86c404ff0..a529a9bf7b78f73ce36919d1f03a344c94d305e4 100644 (file)
@@ -8,8 +8,8 @@ import {
   cleanupTests,
   getAllNotificationsSettings,
   MockSmtpServer,
+  PeerTubeServer,
   prepareNotificationsTest,
-  ServerInfo,
   waitJobs
 } from '@shared/extra-utils'
 import { UserNotification, UserNotificationSettingValue } from '@shared/models'
@@ -17,7 +17,7 @@ import { UserNotification, UserNotificationSettingValue } from '@shared/models'
 const expect = chai.expect
 
 describe('Test notifications API', function () {
-  let server: ServerInfo
+  let server: PeerTubeServer
   let userNotifications: UserNotification[] = []
   let userToken: string
   let emails: object[] = []
@@ -111,10 +111,10 @@ describe('Test notifications API', function () {
         expect(info.notificationSettings.newVideoFromSubscription).to.equal(UserNotificationSettingValue.NONE)
       }
 
-      const { name, uuid } = await server.videos.randomUpload()
+      const { name, shortUUID } = await server.videos.randomUpload()
 
       const check = { web: true, mail: true }
-      await checkNewVideoFromSubscription({ ...baseParams, check }, name, uuid, 'absence')
+      await checkNewVideoFromSubscription({ ...baseParams, check, videoName: name, shortUUID, checkType: 'absence' })
     })
 
     it('Should only have web notifications', async function () {
@@ -130,16 +130,16 @@ describe('Test notifications API', function () {
         expect(info.notificationSettings.newVideoFromSubscription).to.equal(UserNotificationSettingValue.WEB)
       }
 
-      const { name, uuid } = await server.videos.randomUpload()
+      const { name, shortUUID } = await server.videos.randomUpload()
 
       {
         const check = { mail: true, web: false }
-        await checkNewVideoFromSubscription({ ...baseParams, check }, name, uuid, 'absence')
+        await checkNewVideoFromSubscription({ ...baseParams, check, videoName: name, shortUUID, checkType: 'absence' })
       }
 
       {
         const check = { mail: false, web: true }
-        await checkNewVideoFromSubscription({ ...baseParams, check }, name, uuid, 'presence')
+        await checkNewVideoFromSubscription({ ...baseParams, check, videoName: name, shortUUID, checkType: 'presence' })
       }
     })
 
@@ -156,16 +156,16 @@ describe('Test notifications API', function () {
         expect(info.notificationSettings.newVideoFromSubscription).to.equal(UserNotificationSettingValue.EMAIL)
       }
 
-      const { name, uuid } = await server.videos.randomUpload()
+      const { name, shortUUID } = await server.videos.randomUpload()
 
       {
         const check = { mail: false, web: true }
-        await checkNewVideoFromSubscription({ ...baseParams, check }, name, uuid, 'absence')
+        await checkNewVideoFromSubscription({ ...baseParams, check, videoName: name, shortUUID, checkType: 'absence' })
       }
 
       {
         const check = { mail: true, web: false }
-        await checkNewVideoFromSubscription({ ...baseParams, check }, name, uuid, 'presence')
+        await checkNewVideoFromSubscription({ ...baseParams, check, videoName: name, shortUUID, checkType: 'presence' })
       }
     })
 
@@ -187,9 +187,9 @@ describe('Test notifications API', function () {
         )
       }
 
-      const { name, uuid } = await server.videos.randomUpload()
+      const { name, shortUUID } = await server.videos.randomUpload()
 
-      await checkNewVideoFromSubscription(baseParams, name, uuid, 'presence')
+      await checkNewVideoFromSubscription({ ...baseParams, videoName: name, shortUUID, checkType: 'presence' })
     })
   })