X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fmoderation%2Fblocklist.ts;h=b767d38c7a1d6109145d86a977cca3342385ba61;hb=5ec3cbdf22fc88ebe57f370fc0bc0e3df7453458;hp=8c9107a509c3c216aa04ec3410468b920ce5ab0d;hpb=2291a412d25bd139398ca9e7a5131d0c1e4ffd7d;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/moderation/blocklist.ts b/server/tests/api/moderation/blocklist.ts index 8c9107a50..b767d38c7 100644 --- a/server/tests/api/moderation/blocklist.ts +++ b/server/tests/api/moderation/blocklist.ts @@ -1,46 +1,50 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import * as chai from 'chai' import 'mocha' -import { AccountBlock, ServerBlock, Video, UserNotification, UserNotificationType } from '../../../../shared/index' +import * as chai from 'chai' import { + addAccountToAccountBlocklist, + addAccountToServerBlocklist, + addServerToAccountBlocklist, + addServerToServerBlocklist, + addVideoCommentReply, + addVideoCommentThread, cleanupTests, createUser, deleteVideoComment, doubleFollow, + findCommentId, flushAndRunMultipleServers, - ServerInfo, - uploadVideo, - userLogin, follow, - unfollow -} from '../../../../shared/extra-utils/index' -import { setAccessTokensToServers } from '../../../../shared/extra-utils/users/login' -import { getVideosList, getVideosListWithToken } from '../../../../shared/extra-utils/videos/videos' -import { - addVideoCommentReply, - addVideoCommentThread, - getVideoCommentThreads, - getVideoThreadComments, - findCommentId -} from '../../../../shared/extra-utils/videos/video-comments' -import { waitJobs } from '../../../../shared/extra-utils/server/jobs' -import { VideoComment, VideoCommentThreadTree } from '../../../../shared/models/videos/video-comment.model' -import { - addAccountToAccountBlocklist, - addAccountToServerBlocklist, - addServerToAccountBlocklist, - addServerToServerBlocklist, getAccountBlocklistByAccount, getAccountBlocklistByServer, getServerBlocklistByAccount, getServerBlocklistByServer, + getUserNotifications, + getVideoCommentThreads, + getVideosList, + getVideosListWithToken, + getVideoThreadComments, removeAccountFromAccountBlocklist, removeAccountFromServerBlocklist, removeServerFromAccountBlocklist, - removeServerFromServerBlocklist -} from '../../../../shared/extra-utils/users/blocklist' -import { getUserNotifications } from '../../../../shared/extra-utils/users/user-notifications' + removeServerFromServerBlocklist, + ServerInfo, + setAccessTokensToServers, + unfollow, + uploadVideo, + userLogin, + waitJobs +} from '@shared/extra-utils' +import { + AccountBlock, + ServerBlock, + UserNotification, + UserNotificationType, + Video, + VideoComment, + VideoCommentThreadTree +} from '@shared/models' const expect = chai.expect @@ -107,7 +111,7 @@ describe('Test blocklist', function () { let userToken2: string before(async function () { - this.timeout(60000) + this.timeout(120000) servers = await flushAndRunMultipleServers(3) await setAccessTokensToServers(servers)