X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fvideos%2Fsingle-server.ts;h=e3d62b7a0df4c1dfa41ccf40f47557c514624256;hb=0b74c74abe5a44e9f564ab6adb5177ab17d28e91;hp=a757ad9da809fb19b913072b05e5941b0c9633d3;hpb=f6eebcb336c067e160a62020a5140d8d992ba384;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/videos/single-server.ts b/server/tests/api/videos/single-server.ts index a757ad9da..e3d62b7a0 100644 --- a/server/tests/api/videos/single-server.ts +++ b/server/tests/api/videos/single-server.ts @@ -196,7 +196,7 @@ describe('Test a single server', function () { }) it('Should have the views updated', async function () { - this.timeout(10000) + this.timeout(20000) await viewVideo(server.url, videoId) await viewVideo(server.url, videoId) @@ -212,6 +212,9 @@ describe('Test a single server', function () { await viewVideo(server.url, videoId) await viewVideo(server.url, videoId) + // Wait the repeatable job + await wait(8000) + const res = await getVideo(server.url, videoId) const video = res.body @@ -336,6 +339,14 @@ describe('Test a single server', function () { videoId = videos[3].uuid }) + it('Should list and sort by trending in descending order', async function () { + const res = await getVideosListPagination(server.url, 0, 2, '-trending') + + const videos = res.body.data + expect(res.body.total).to.equal(6) + expect(videos.length).to.equal(2) + }) + it('Should update a video', async function () { const attributes = { name: 'my super video updated',