]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/notifications/user-notifications.ts
Add version to generate types packages
[github/Chocobozzz/PeerTube.git] / server / tests / api / notifications / user-notifications.ts
index e53ab2aa527a02117d5117442e23178c5423c2ed..0bd474c09df098ea90b5c5cac69ccf7796b61b5c 100644 (file)
@@ -2,23 +2,20 @@
 
 import 'mocha'
 import * as chai from 'chai'
-import { buildUUID } from '@server/helpers/uuid'
 import {
   CheckerBaseParams,
   checkMyVideoImportIsFinished,
   checkNewActorFollow,
   checkNewVideoFromSubscription,
   checkVideoIsPublished,
-  cleanupTests,
   FIXTURE_URLS,
   MockSmtpServer,
-  PeerTubeServer,
   prepareNotificationsTest,
-  uploadRandomVideoOnServers,
-  wait,
-  waitJobs
-} from '@shared/extra-utils'
+  uploadRandomVideoOnServers
+} from '@server/tests/shared'
+import { buildUUID, wait } from '@shared/core-utils'
 import { UserNotification, UserNotificationType, VideoPrivacy } from '@shared/models'
+import { cleanupTests, PeerTubeServer, waitJobs } from '@shared/server-commands'
 
 const expect = chai.expect
 
@@ -61,7 +58,7 @@ describe('Test user notifications', function () {
 
       await uploadRandomVideoOnServers(servers, 1)
 
-      const notification = await servers[0].notifications.getLastest({ token: userAccessToken })
+      const notification = await servers[0].notifications.getLatest({ token: userAccessToken })
       expect(notification).to.be.undefined
 
       expect(emails).to.have.lengthOf(0)
@@ -128,7 +125,7 @@ describe('Test user notifications', function () {
     })
 
     it('Should not send a notification before the video is published', async function () {
-      this.timeout(50000)
+      this.timeout(150000)
 
       const updateAt = new Date(new Date().getTime() + 1000000)
 
@@ -237,12 +234,12 @@ describe('Test user notifications', function () {
     })
 
     it('Should not send a notification if the wait transcoding is false', async function () {
-      this.timeout(50000)
+      this.timeout(100_000)
 
       await uploadRandomVideoOnServers(servers, 2, { waitTranscoding: false })
       await waitJobs(servers)
 
-      const notification = await servers[0].notifications.getLastest({ token: userAccessToken })
+      const notification = await servers[0].notifications.getLatest({ token: userAccessToken })
       if (notification) {
         expect(notification.type).to.not.equal(UserNotificationType.MY_VIDEO_PUBLISHED)
       }
@@ -267,7 +264,7 @@ describe('Test user notifications', function () {
     })
 
     it('Should send a notification when an imported video is transcoded', async function () {
-      this.timeout(50000)
+      this.timeout(120000)
 
       const name = 'video import ' + buildUUID()