]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/notifications/moderation-notifications.ts
Allow admins to disable two factor auth
[github/Chocobozzz/PeerTube.git] / server / tests / api / notifications / moderation-notifications.ts
index 6d8e5359bd7dd16f937ddb8f8e17f7e9cc6fd8e6..fc953f144cd87e70e1a99ebdd829d4dc87a8f2ed 100644 (file)
@@ -1,7 +1,5 @@
 /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
 
-import 'mocha'
-import { buildUUID } from '@shared/core-utils/uuid'
 import {
   checkAbuseStateChange,
   checkAutoInstanceFollowing,
@@ -16,15 +14,14 @@ import {
   checkUserRegistered,
   checkVideoAutoBlacklistForModerators,
   checkVideoIsPublished,
-  cleanupTests,
   MockInstancesIndex,
   MockSmtpServer,
-  PeerTubeServer,
-  prepareNotificationsTest,
-  wait,
-  waitJobs
-} from '@shared/extra-utils'
+  prepareNotificationsTest
+} from '@server/tests/shared'
+import { wait } from '@shared/core-utils'
+import { buildUUID } from '@shared/extra-utils'
 import { AbuseState, CustomConfig, UserNotification, UserRole, VideoPrivacy } from '@shared/models'
+import { cleanupTests, PeerTubeServer, waitJobs } from '@shared/server-commands'
 
 describe('Test moderation notifications', function () {
   let servers: PeerTubeServer[] = []
@@ -385,7 +382,7 @@ describe('Test moderation notifications', function () {
     })
 
     it('Should send a notification only to admin when there is a new instance follower', async function () {
-      this.timeout(20000)
+      this.timeout(60000)
 
       await servers[2].follows.follow({ hosts: [ servers[0].url ] })
 
@@ -604,7 +601,7 @@ describe('Test moderation notifications', function () {
     })
 
     it('Should not send a notification to moderators on new video without auto-blacklist', async function () {
-      this.timeout(60000)
+      this.timeout(120000)
 
       const name = 'video without auto-blacklist ' + buildUUID()