From 0d8ecb7592577f54012413a2b5a9b159cfc90399 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 13 Jul 2021 08:33:02 +0200 Subject: Fix NSFW tests --- server/tests/api/videos/multiple-servers.ts | 1 + server/tests/api/videos/video-nsfw.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'server/tests') diff --git a/server/tests/api/videos/multiple-servers.ts b/server/tests/api/videos/multiple-servers.ts index 2148d8e1c..1b6f0f48a 100644 --- a/server/tests/api/videos/multiple-servers.ts +++ b/server/tests/api/videos/multiple-servers.ts @@ -582,6 +582,7 @@ describe('Test multiple servers', function () { await waitJobs(servers) await wait(5000) + await waitJobs(servers) let baseVideos = null for (const server of servers) { diff --git a/server/tests/api/videos/video-nsfw.ts b/server/tests/api/videos/video-nsfw.ts index 5f30939cc..c9c3792eb 100644 --- a/server/tests/api/videos/video-nsfw.ts +++ b/server/tests/api/videos/video-nsfw.ts @@ -43,7 +43,7 @@ describe('Test video NSFW policy', function () { if (token) { promises = [ getVideosListWithToken(server.url, token, query).then(res => res.body), - server.searchCommand.advancedVideoSearch({ token, search: { search: 'n', ...query } }), + server.searchCommand.advancedVideoSearch({ token, search: { search: 'n', sort: '-publishedAt', ...query } }), getAccountVideos(server.url, token, accountName, 0, 5, undefined, query).then(res => res.body), getVideoChannelVideos(server.url, token, videoChannelName, 0, 5, undefined, query).then(res => res.body) ] @@ -60,7 +60,7 @@ describe('Test video NSFW policy', function () { promises = [ getVideosList(server.url).then(res => res.body), - server.searchCommand.searchVideos({ search: 'n' }), + server.searchCommand.searchVideos({ search: 'n', sort: '-publishedAt' }), getAccountVideos(server.url, undefined, accountName, 0, 5).then(res => res.body), getVideoChannelVideos(server.url, undefined, videoChannelName, 0, 5).then(res => res.body) ] -- cgit v1.2.3