import {
areHttpImportTestsDisabled,
cleanupTests,
- doubleFollow,
createMultipleServers,
- ImportsCommand,
+ doubleFollow,
+ FIXTURE_URLS,
PeerTubeServer,
setAccessTokensToServers,
testCaptionFile,
expect(videoTorrent.name).to.contain('你好 世界 720p.mp4')
expect(videoMagnet.name).to.contain('super peertube2 video')
- const bodyCaptions = await server.captions.listVideoCaptions({ videoId: idHttp })
+ const bodyCaptions = await server.captions.list({ videoId: idHttp })
expect(bodyCaptions.total).to.equal(2)
}
expect(video.files).to.have.lengthOf(1)
- const bodyCaptions = await server.captions.listVideoCaptions({ videoId: id })
+ const bodyCaptions = await server.captions.list({ videoId: id })
expect(bodyCaptions.total).to.equal(2)
}
}
{
- const attributes = { ...baseAttributes, targetUrl: ImportsCommand.getYoutubeVideoUrl() }
+ const attributes = { ...baseAttributes, targetUrl: FIXTURE_URLS.youtube }
const { video } = await servers[0].imports.importVideo({ attributes })
expect(video.name).to.equal('small video - youtube')
await testImage(servers[0].url, 'video_import_thumbnail', video.thumbnailPath)
await testImage(servers[0].url, 'video_import_preview', video.previewPath)
- const bodyCaptions = await servers[0].captions.listVideoCaptions({ videoId: video.id })
+ const bodyCaptions = await servers[0].captions.list({ videoId: video.id })
const videoCaptions = bodyCaptions.data
expect(videoCaptions).to.have.lengthOf(2)
{
const attributes = {
...baseAttributes,
- magnetUri: ImportsCommand.getMagnetURI(),
+ magnetUri: FIXTURE_URLS.magnet,
description: 'this is a super torrent description',
tags: [ 'tag_torrent1', 'tag_torrent2' ]
}
expect(videoImports).to.have.lengthOf(3)
- expect(videoImports[2].targetUrl).to.equal(ImportsCommand.getYoutubeVideoUrl())
+ expect(videoImports[2].targetUrl).to.equal(FIXTURE_URLS.youtube)
expect(videoImports[2].magnetUri).to.be.null
expect(videoImports[2].torrentName).to.be.null
expect(videoImports[2].video.name).to.equal('small video - youtube')
expect(videoImports[1].targetUrl).to.be.null
- expect(videoImports[1].magnetUri).to.equal(ImportsCommand.getMagnetURI())
+ expect(videoImports[1].magnetUri).to.equal(FIXTURE_URLS.magnet)
expect(videoImports[1].torrentName).to.be.null
expect(videoImports[1].video.name).to.equal('super peertube2 video')
this.timeout(60_000)
const attributes = {
- targetUrl: ImportsCommand.getYoutubeVideoUrl(),
+ targetUrl: FIXTURE_URLS.youtube,
channelId: channelIdServer2,
privacy: VideoPrivacy.PUBLIC,
category: 10,
const attributes = {
name: 'transcoded video',
- magnetUri: ImportsCommand.getMagnetURI(),
+ magnetUri: FIXTURE_URLS.magnet,
channelId: channelIdServer2,
privacy: VideoPrivacy.PUBLIC
}
const attributes = {
name: 'hdr video',
- targetUrl: ImportsCommand.getYoutubeHDRVideoUrl(),
+ targetUrl: FIXTURE_URLS.youtubeHDR,
channelId: channelIdServer1,
privacy: VideoPrivacy.PUBLIC
}