X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fvideos%2Fmultiple-servers.ts;h=dd50f905d2bca98ba36b78c393c662e63e8d7127;hb=9cc8d43e37a61709e7275c2a799bdf976dd940ca;hp=1b471ba799b36b5207abb1cb001186d6d825bba5;hpb=b718fd22374d64534bcfe69932cf562894abed6a;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/videos/multiple-servers.ts b/server/tests/api/videos/multiple-servers.ts index 1b471ba79..dd50f905d 100644 --- a/server/tests/api/videos/multiple-servers.ts +++ b/server/tests/api/videos/multiple-servers.ts @@ -32,15 +32,15 @@ import { viewVideo, wait, webtorrentAdd -} from '../../../../shared/utils' +} from '../../../../shared/extra-utils' import { addVideoCommentReply, addVideoCommentThread, deleteVideoComment, getVideoCommentThreads, getVideoThreadComments -} from '../../../../shared/utils/videos/video-comments' -import { waitJobs } from '../../../../shared/utils/server/jobs' +} from '../../../../shared/extra-utils/videos/video-comments' +import { waitJobs } from '../../../../shared/extra-utils/server/jobs' const expect = chai.expect @@ -98,6 +98,7 @@ describe('Test multiple servers', function () { nsfw: true, description: 'my super description for server 1', support: 'my super support text for server 1', + originallyPublishedAt: '2019-02-10T13:38:14.449Z', tags: [ 'tag1p1', 'tag2p1' ], channelId: videoChannelId, fixture: 'video_short1.webm' @@ -118,6 +119,7 @@ describe('Test multiple servers', function () { nsfw: true, description: 'my super description for server 1', support: 'my super support text for server 1', + originallyPublishedAt: '2019-02-10T13:38:14.449Z', account: { name: 'root', host: 'localhost:9001' @@ -162,7 +164,7 @@ describe('Test multiple servers', function () { username: 'user1', password: 'super_password' } - await createUser(servers[1].url, servers[1].accessToken, user.username, user.password) + await createUser({ url: servers[ 1 ].url, accessToken: servers[ 1 ].accessToken, username: user.username, password: user.password }) const userAccessToken = await userLogin(servers[1], user) const videoAttributes = { @@ -577,15 +579,15 @@ describe('Test multiple servers', function () { this.timeout(20000) await rateVideo(servers[0].url, servers[0].accessToken, remoteVideosServer1[0], 'like') - await wait(200) + await wait(500) await rateVideo(servers[0].url, servers[0].accessToken, remoteVideosServer1[0], 'dislike') - await wait(200) + await wait(500) await rateVideo(servers[0].url, servers[0].accessToken, remoteVideosServer1[0], 'like') await rateVideo(servers[2].url, servers[2].accessToken, localVideosServer3[1], 'like') - await wait(200) + await wait(500) await rateVideo(servers[2].url, servers[2].accessToken, localVideosServer3[1], 'dislike') await rateVideo(servers[2].url, servers[2].accessToken, remoteVideosServer3[1], 'dislike') - await wait(200) + await wait(500) await rateVideo(servers[2].url, servers[2].accessToken, remoteVideosServer3[0], 'like') await waitJobs(servers) @@ -625,6 +627,7 @@ describe('Test multiple servers', function () { support: 'my super support text updated', tags: [ 'tag_up_1', 'tag_up_2' ], thumbnailfile: 'thumbnail.jpg', + originallyPublishedAt: '2019-02-11T13:38:14.449Z', previewfile: 'preview.jpg' } @@ -652,6 +655,7 @@ describe('Test multiple servers', function () { nsfw: true, description: 'my super description updated', support: 'my super support text updated', + originallyPublishedAt: '2019-02-11T13:38:14.449Z', account: { name: 'root', host: 'localhost:9003' @@ -983,7 +987,7 @@ describe('Test multiple servers', function () { isLocal, duration: 5, commentsEnabled: false, - downloadEnabled: false, + downloadEnabled: true, tags: [ ], privacy: VideoPrivacy.PUBLIC, channel: {