]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/video-transcoder.ts
Fix video full description
[github/Chocobozzz/PeerTube.git] / server / tests / api / video-transcoder.ts
index 22d89724bc75b541436b210f557b1a4f3a476777..e80b099d10b36b75b146baca78387b107d6b0b4c 100644 (file)
@@ -13,7 +13,8 @@ import {
   setAccessTokensToServers,
   flushAndRunMultipleServers,
   killallServers,
-  webtorrentAdd
+  webtorrentAdd,
+  getVideo
 } from '../utils'
 
 describe('Test video transcoding', function () {
@@ -32,8 +33,8 @@ describe('Test video transcoding', function () {
     this.timeout(60000)
 
     const videoAttributes = {
-      name: 'my super name for pod 1',
-      description: 'my super description for pod 1',
+      name: 'my super name for server 1',
+      description: 'my super description for server 1',
       fixture: 'video_short.webm'
     }
     await uploadVideo(servers[0].url, servers[0].accessToken, videoAttributes)
@@ -42,9 +43,12 @@ describe('Test video transcoding', function () {
 
     const res = await getVideosList(servers[0].url)
     const video = res.body.data[0]
-    expect(video.files).to.have.lengthOf(1)
 
-    const magnetUri = video.files[0].magnetUri
+    const res2 = await getVideo(servers[0].url, video.id)
+    const videoDetails = res2.body
+    expect(videoDetails.files).to.have.lengthOf(1)
+
+    const magnetUri = videoDetails.files[0].magnetUri
     expect(magnetUri).to.match(/\.webm/)
 
     const torrent = await webtorrentAdd(magnetUri)
@@ -57,8 +61,8 @@ describe('Test video transcoding', function () {
     this.timeout(60000)
 
     const videoAttributes = {
-      name: 'my super name for pod 2',
-      description: 'my super description for pod 2',
+      name: 'my super name for server 2',
+      description: 'my super description for server 2',
       fixture: 'video_short.webm'
     }
     await uploadVideo(servers[1].url, servers[1].accessToken, videoAttributes)
@@ -68,9 +72,12 @@ describe('Test video transcoding', function () {
     const res = await getVideosList(servers[1].url)
 
     const video = res.body.data[0]
-    expect(video.files).to.have.lengthOf(4)
+    const res2 = await getVideo(servers[1].url, video.id)
+    const videoDetails = res2.body
+
+    expect(videoDetails.files).to.have.lengthOf(4)
 
-    const magnetUri = video.files[0].magnetUri
+    const magnetUri = videoDetails.files[0].magnetUri
     expect(magnetUri).to.match(/\.mp4/)
 
     const torrent = await webtorrentAdd(magnetUri)