]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/search/search-videos.ts
Introduce captions command
[github/Chocobozzz/PeerTube.git] / server / tests / api / search / search-videos.ts
index af74b26a7ebd1d57738c83c7a083a815ad5abfa3..513538917c1f7e4b4374ac448cc9ca8b1d5cc47c 100644 (file)
@@ -4,7 +4,6 @@ import 'mocha'
 import * as chai from 'chai'
 import {
   cleanupTests,
-  createVideoCaption,
   flushAndRunServer,
   immutableAssign,
   SearchCommand,
@@ -54,18 +53,14 @@ describe('Test videos search', function () {
         const videoId = res.body.video.id
         videoUUID = res.body.video.uuid
 
-        await createVideoCaption({
-          url: server.url,
-          accessToken: server.accessToken,
+        await server.captionsCommand.createVideoCaption({
           language: 'en',
           videoId,
           fixture: 'subtitle-good2.vtt',
           mimeType: 'application/octet-stream'
         })
 
-        await createVideoCaption({
-          url: server.url,
-          accessToken: server.accessToken,
+        await server.captionsCommand.createVideoCaption({
           language: 'aa',
           videoId,
           fixture: 'subtitle-good2.vtt',
@@ -502,10 +497,10 @@ describe('Test videos search', function () {
       const liveCommand = server.liveCommand
 
       const liveAttributes = { name: 'live', privacy: VideoPrivacy.PUBLIC, channelId: server.videoChannel.id }
-      const live = await liveCommand.createLive({ fields: liveAttributes })
+      const live = await liveCommand.create({ fields: liveAttributes })
 
       const ffmpegCommand = await liveCommand.sendRTMPStreamInVideo({ videoId: live.id })
-      await liveCommand.waitUntilLivePublished({ videoId: live.id })
+      await liveCommand.waitUntilPublished({ videoId: live.id })
 
       const body = await command.advancedVideoSearch({ search: { isLive: true } })