From d23dd9fbfc4d26026352c10f81d2795ceaf2908a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 15 Jul 2021 10:02:54 +0200 Subject: Introduce videos command --- server/tests/api/videos/video-captions.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'server/tests/api/videos/video-captions.ts') diff --git a/server/tests/api/videos/video-captions.ts b/server/tests/api/videos/video-captions.ts index d4a5385ab..4c67e96f7 100644 --- a/server/tests/api/videos/video-captions.ts +++ b/server/tests/api/videos/video-captions.ts @@ -7,11 +7,9 @@ import { cleanupTests, doubleFollow, flushAndRunMultipleServers, - removeVideo, ServerInfo, setAccessTokensToServers, testCaptionFile, - uploadVideo, wait, waitJobs } from '@shared/extra-utils' @@ -34,8 +32,8 @@ describe('Test video captions', function () { await waitJobs(servers) - const res = await uploadVideo(servers[0].url, servers[0].accessToken, { name: 'my video name' }) - videoUUID = res.body.video.uuid + const { uuid } = await servers[0].videosCommand.upload({ attributes: { name: 'my video name' } }) + videoUUID = uuid await waitJobs(servers) }) @@ -180,7 +178,7 @@ describe('Test video captions', function () { }) it('Should remove the video, and thus all video captions', async function () { - await removeVideo(servers[0].url, servers[0].accessToken, videoUUID) + await servers[0].videosCommand.remove({ id: videoUUID }) await checkVideoFilesWereRemoved(videoUUID, servers[0]) }) -- cgit v1.2.3