]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/notifications/user-notifications.ts
Merge branch 'release/3.3.0' into develop
[github/Chocobozzz/PeerTube.git] / server / tests / api / notifications / user-notifications.ts
index 53f8c75941b7dde145e1a30f57b3493f873c110b..ca592d4669b49789768f2290bc31ea27b9337dc4 100644 (file)
@@ -10,10 +10,10 @@ import {
   checkNewVideoFromSubscription,
   checkVideoIsPublished,
   cleanupTests,
-  ImportsCommand,
+  FIXTURE_URLS,
   MockSmtpServer,
+  PeerTubeServer,
   prepareNotificationsTest,
-  ServerInfo,
   uploadRandomVideoOnServers,
   wait,
   waitJobs
@@ -23,7 +23,7 @@ import { UserNotification, UserNotificationType, VideoPrivacy } from '@shared/mo
 const expect = chai.expect
 
 describe('Test user notifications', function () {
-  let servers: ServerInfo[] = []
+  let servers: PeerTubeServer[] = []
   let userAccessToken: string
   let userNotifications: UserNotification[] = []
   let adminNotifications: UserNotification[] = []
@@ -205,7 +205,7 @@ describe('Test user notifications', function () {
         name,
         channelId,
         privacy: VideoPrivacy.PUBLIC,
-        targetUrl: ImportsCommand.getGoodVideoUrl()
+        targetUrl: FIXTURE_URLS.goodVideo
       }
       const { video } = await servers[0].imports.importVideo({ attributes })
 
@@ -275,7 +275,7 @@ describe('Test user notifications', function () {
         name,
         channelId,
         privacy: VideoPrivacy.PUBLIC,
-        targetUrl: ImportsCommand.getGoodVideoUrl(),
+        targetUrl: FIXTURE_URLS.goodVideo,
         waitTranscoding: true
       }
       const { video } = await servers[1].imports.importVideo({ attributes })
@@ -343,12 +343,12 @@ describe('Test user notifications', function () {
         name,
         channelId,
         privacy: VideoPrivacy.PRIVATE,
-        targetUrl: ImportsCommand.getBadVideoUrl()
+        targetUrl: FIXTURE_URLS.badVideo
       }
       const { video } = await servers[0].imports.importVideo({ attributes })
 
       await waitJobs(servers)
-      await checkMyVideoImportIsFinished(baseParams, name, video.uuid, ImportsCommand.getBadVideoUrl(), false, 'presence')
+      await checkMyVideoImportIsFinished(baseParams, name, video.uuid, FIXTURE_URLS.badVideo, false, 'presence')
     })
 
     it('Should send a notification when the video import succeeded', async function () {
@@ -360,12 +360,12 @@ describe('Test user notifications', function () {
         name,
         channelId,
         privacy: VideoPrivacy.PRIVATE,
-        targetUrl: ImportsCommand.getGoodVideoUrl()
+        targetUrl: FIXTURE_URLS.goodVideo
       }
       const { video } = await servers[0].imports.importVideo({ attributes })
 
       await waitJobs(servers)
-      await checkMyVideoImportIsFinished(baseParams, name, video.uuid, ImportsCommand.getGoodVideoUrl(), true, 'presence')
+      await checkMyVideoImportIsFinished(baseParams, name, video.uuid, FIXTURE_URLS.goodVideo, true, 'presence')
     })
   })