X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fvideos%2Fvideo-captions.ts;h=b7f26c35fcf60c3d676e4347085024b50451b389;hb=c6f8ca4d6596572de981162983bd02eb2613791d;hp=4c8e28adf25a0ae5e4be22c0ea19eb7cc6e71d6e;hpb=c4fa01f7c45b66b112ebd08abce744b7c4041feb;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/videos/video-captions.ts b/server/tests/api/videos/video-captions.ts index 4c8e28adf..b7f26c35f 100644 --- a/server/tests/api/videos/video-captions.ts +++ b/server/tests/api/videos/video-captions.ts @@ -2,17 +2,16 @@ import 'mocha' import * as chai from 'chai' +import { checkVideoFilesWereRemoved, testCaptionFile } from '@server/tests/shared' +import { wait } from '@shared/core-utils' import { - checkVideoFilesWereRemoved, cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, - testCaptionFile, - wait, waitJobs -} from '@shared/extra-utils' +} from '@shared/server-commands' const expect = chai.expect @@ -178,9 +177,12 @@ describe('Test video captions', function () { }) it('Should remove the video, and thus all video captions', async function () { + const video = await servers[0].videos.get({ id: videoUUID }) + const { data: captions } = await servers[0].captions.list({ videoId: videoUUID }) + await servers[0].videos.remove({ id: videoUUID }) - await checkVideoFilesWereRemoved(videoUUID, servers[0]) + await checkVideoFilesWereRemoved({ server: servers[0], video, captions }) }) after(async function () {