]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/moderation/video-blacklist.ts
Merge branch 'release/4.1.0' into develop
[github/Chocobozzz/PeerTube.git] / server / tests / api / moderation / video-blacklist.ts
index 62cbf2e0790d52333c4df6852c2b3b3c036423f1..1790210ffb2ddf4cafd9735c039564cd4674e0c3 100644 (file)
@@ -3,18 +3,19 @@
 import 'mocha'
 import * as chai from 'chai'
 import { orderBy } from 'lodash'
+import { FIXTURE_URLS } from '@server/tests/shared'
+import { UserAdminFlag, UserRole, VideoBlacklist, VideoBlacklistType } from '@shared/models'
 import {
   BlacklistCommand,
   cleanupTests,
-  doubleFollow,
   createMultipleServers,
-  ImportsCommand,
+  doubleFollow,
   killallServers,
   PeerTubeServer,
   setAccessTokensToServers,
+  setDefaultChannelAvatar,
   waitJobs
-} from '@shared/extra-utils'
-import { UserAdminFlag, UserRole, VideoBlacklist, VideoBlacklistType } from '@shared/models'
+} from '@shared/server-commands'
 
 const expect = chai.expect
 
@@ -32,7 +33,7 @@ describe('Test video blacklist', function () {
   }
 
   before(async function () {
-    this.timeout(50000)
+    this.timeout(120000)
 
     // Run servers
     servers = await createMultipleServers(2)
@@ -42,6 +43,7 @@ describe('Test video blacklist', function () {
 
     // Server 1 and server 2 follow each other
     await doubleFollow(servers[0], servers[1])
+    await setDefaultChannelAvatar(servers[0])
 
     // Upload 2 videos on server 2
     await servers[1].videos.upload({ attributes: { name: 'My 1st video', description: 'A video on server 2' } })
@@ -387,7 +389,7 @@ describe('Test video blacklist', function () {
       this.timeout(15000)
 
       const attributes = {
-        targetUrl: ImportsCommand.getGoodVideoUrl(),
+        targetUrl: FIXTURE_URLS.goodVideo,
         name: 'URL import',
         channelId: channelOfUserWithoutFlag
       }
@@ -400,7 +402,7 @@ describe('Test video blacklist', function () {
 
     it('Should auto blacklist a video on torrent import', async function () {
       const attributes = {
-        magnetUri: ImportsCommand.getMagnetURI(),
+        magnetUri: FIXTURE_URLS.magnet,
         name: 'Torrent import',
         channelId: channelOfUserWithoutFlag
       }