]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/videos/video-playlists.ts
Add new player string to custom translations
[github/Chocobozzz/PeerTube.git] / server / tests / api / videos / video-playlists.ts
index 0dc53d4c0470213bf3a6f443474a821e6b46265c..c33a63df08aa0bc8655537121f20df66e1c46f26 100644 (file)
@@ -2,21 +2,10 @@
 
 import 'mocha'
 import * as chai from 'chai'
-import { HttpStatusCode } from '@shared/core-utils'
-import {
-  checkPlaylistFilesWereRemoved,
-  cleanupTests,
-  doubleFollow,
-  flushAndRunMultipleServers,
-  PlaylistsCommand,
-  ServerInfo,
-  setAccessTokensToServers,
-  setDefaultVideoChannel,
-  testImage,
-  wait,
-  waitJobs
-} from '@shared/extra-utils'
+import { checkPlaylistFilesWereRemoved, testImage } from '@server/tests/shared'
+import { wait } from '@shared/core-utils'
 import {
+  HttpStatusCode,
   VideoPlaylist,
   VideoPlaylistCreateResult,
   VideoPlaylistElementType,
@@ -24,11 +13,22 @@ import {
   VideoPlaylistType,
   VideoPrivacy
 } from '@shared/models'
+import {
+  cleanupTests,
+  createMultipleServers,
+  doubleFollow,
+  PeerTubeServer,
+  PlaylistsCommand,
+  setAccessTokensToServers,
+  setDefaultAccountAvatar,
+  setDefaultVideoChannel,
+  waitJobs
+} from '@shared/server-commands'
 
 const expect = chai.expect
 
 async function checkPlaylistElementType (
-  servers: ServerInfo[],
+  servers: PeerTubeServer[],
   playlistId: string,
   type: VideoPlaylistElementType,
   position: number,
@@ -52,7 +52,7 @@ async function checkPlaylistElementType (
 }
 
 describe('Test video playlists', function () {
-  let servers: ServerInfo[] = []
+  let servers: PeerTubeServer[] = []
 
   let playlistServer2Id1: number
   let playlistServer2Id2: number
@@ -75,11 +75,16 @@ describe('Test video playlists', function () {
   before(async function () {
     this.timeout(120000)
 
-    servers = await flushAndRunMultipleServers(3, { transcoding: { enabled: false } })
+    servers = await createMultipleServers(3)
 
     // Get the access tokens
     await setAccessTokensToServers(servers)
     await setDefaultVideoChannel(servers)
+    await setDefaultAccountAvatar(servers)
+
+    for (const server of servers) {
+      await server.config.disableTranscoding()
+    }
 
     // Server 1 and server 2 follow each other
     await doubleFollow(servers[0], servers[1])
@@ -584,10 +589,10 @@ describe('Test video playlists', function () {
   })
 
   describe('Element type', function () {
-    let groupUser1: ServerInfo[]
-    let groupWithoutToken1: ServerInfo[]
-    let group1: ServerInfo[]
-    let group2: ServerInfo[]
+    let groupUser1: PeerTubeServer[]
+    let groupWithoutToken1: PeerTubeServer[]
+    let group1: PeerTubeServer[]
+    let group2: PeerTubeServer[]
 
     let video1: string
     let video2: string