X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fvideos%2Fvideo-imports.ts;h=878452ed2c988315d66bf842ad6e0936cba81ef1;hb=cffef25313bdf7a6c435f56ac6715fdd91acf7b3;hp=5636de45f7144c55be37deeaf6c6fc62c1686344;hpb=a2be43f5700460d3afdc194abc788690b79e66cd;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/videos/video-imports.ts b/server/tests/api/videos/video-imports.ts index 5636de45f..878452ed2 100644 --- a/server/tests/api/videos/video-imports.ts +++ b/server/tests/api/videos/video-imports.ts @@ -23,9 +23,8 @@ async function checkVideosServer1 (server: PeerTubeServer, idHttp: string, idMag const videoHttp = await server.videos.get({ id: idHttp }) expect(videoHttp.name).to.equal('small video - youtube') - // FIXME: youtube-dl seems broken - // expect(videoHttp.category.label).to.equal('News & Politics') - // expect(videoHttp.licence.label).to.equal('Attribution') + expect(videoHttp.category.label).to.equal('News & Politics') + expect(videoHttp.licence.label).to.equal('Attribution') expect(videoHttp.language.label).to.equal('Unknown') expect(videoHttp.nsfw).to.be.false expect(videoHttp.description).to.equal('this is a super description') @@ -68,6 +67,8 @@ async function checkVideoServer2 (server: PeerTubeServer, id: number | string) { expect(video.description).to.equal('my super description') expect(video.tags).to.deep.equal([ 'supertag1', 'supertag2' ]) + await testImage(server.url, 'thumbnail', video.thumbnailPath) + expect(video.files).to.have.lengthOf(1) const bodyCaptions = await server.captions.list({ videoId: id }) @@ -254,18 +255,20 @@ describe('Test video imports', function () { it('Should import a video on server 2 with some fields', async function () { this.timeout(60_000) - const attributes = { - targetUrl: FIXTURE_URLS.youtube, - channelId: servers[1].store.channel.id, - privacy: VideoPrivacy.PUBLIC, - category: 10, - licence: 7, - language: 'en', - name: 'my super name', - description: 'my super description', - tags: [ 'supertag1', 'supertag2' ] - } - const { video } = await servers[1].imports.importVideo({ attributes }) + const { video } = await servers[1].imports.importVideo({ + attributes: { + targetUrl: FIXTURE_URLS.youtube, + channelId: servers[1].store.channel.id, + privacy: VideoPrivacy.PUBLIC, + category: 10, + licence: 7, + language: 'en', + name: 'my super name', + description: 'my super description', + tags: [ 'supertag1', 'supertag2' ], + thumbnailfile: 'thumbnail.jpg' + } + }) expect(video.name).to.equal('my super name') }) @@ -456,7 +459,8 @@ describe('Test video imports', function () { }) } - runSuite('youtube-dl') + // FIXME: youtube-dl seems broken + // runSuite('youtube-dl') runSuite('yt-dlp')