X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fserver%2Ffollows.ts;h=520442c6e08ba02afb1643dd92c78845c064e7d3;hb=a2470c9f4bfc7f49f4b94de935bacdd53fd54f29;hp=466932d6314ed9bc245af6ab3af5cf3d7ef330b5;hpb=e3d15a6a9aed97a004d9dac1b7a6499d794e080a;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/server/follows.ts b/server/tests/api/server/follows.ts index 466932d63..520442c6e 100644 --- a/server/tests/api/server/follows.ts +++ b/server/tests/api/server/follows.ts @@ -8,7 +8,6 @@ import { cleanupTests, completeVideoCheck, createUser, - createVideoCaption, dateIsValid, deleteVideoComment, expectAccountFollows, @@ -17,7 +16,6 @@ import { getVideoCommentThreads, getVideosList, getVideoThreadComments, - listVideoCaptions, rateVideo, ServerInfo, setAccessTokensToServers, @@ -26,7 +24,7 @@ import { userLogin, waitJobs } from '@shared/extra-utils' -import { Video, VideoCaption, VideoComment, VideoCommentThreadTree, VideoPrivacy } from '@shared/models' +import { Video, VideoComment, VideoCommentThreadTree, VideoPrivacy } from '@shared/models' const expect = chai.expect @@ -385,9 +383,7 @@ describe('Test follows', function () { } { - await createVideoCaption({ - url: servers[2].url, - accessToken: servers[2].accessToken, + await servers[2].captionsCommand.createVideoCaption({ language: 'ar', videoId: video4.id, fixture: 'subtitle-good2.vtt' @@ -543,11 +539,11 @@ describe('Test follows', function () { }) it('Should have propagated captions', async function () { - const res = await listVideoCaptions(servers[0].url, video4.id) - expect(res.body.total).to.equal(1) - expect(res.body.data).to.have.lengthOf(1) + const body = await servers[0].captionsCommand.listVideoCaptions({ videoId: video4.id }) + expect(body.total).to.equal(1) + expect(body.data).to.have.lengthOf(1) - const caption1: VideoCaption = res.body.data[0] + const caption1 = body.data[0] expect(caption1.language.id).to.equal('ar') expect(caption1.language.label).to.equal('Arabic') expect(caption1.captionPath).to.match(new RegExp('^/lazy-static/video-captions/.+-ar.vtt$'))