]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/extra-utils/videos/videos.ts
Fix e2e tests
[github/Chocobozzz/PeerTube.git] / shared / extra-utils / videos / videos.ts
index 9dec12703d0080720850288424e0788b01c19462..d1ac48292887fdb9b0edde0bac66572fe89a8ba9 100644 (file)
@@ -587,19 +587,17 @@ async function completeVideoCheck (
            'File size for resolution ' + file.resolution.label + ' outside confidence interval (' + minSize + '> size <' + maxSize + ')')
       .to.be.above(minSize).and.below(maxSize)
 
-    {
-      await testImage(url, attributes.thumbnailfile || attributes.fixture, videoDetails.thumbnailPath)
-    }
-
-    if (attributes.previewfile) {
-      await testImage(url, attributes.previewfile, videoDetails.previewPath)
-    }
-
     const torrent = await webtorrentAdd(file.magnetUri, true)
     expect(torrent.files).to.be.an('array')
     expect(torrent.files.length).to.equal(1)
     expect(torrent.files[0].path).to.exist.and.to.not.equal('')
   }
+
+  await testImage(url, attributes.thumbnailfile || attributes.fixture, videoDetails.thumbnailPath)
+
+  if (attributes.previewfile) {
+    await testImage(url, attributes.previewfile, videoDetails.previewPath)
+  }
 }
 
 async function videoUUIDToId (url: string, id: number | string) {