aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/notifications
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-04-25 14:23:15 +0200
committerChocobozzz <me@florianbigard.com>2019-04-25 14:23:15 +0200
commitc0e71e849a40871ed8eea3dacd8608d380bdb490 (patch)
tree0b6529213077acaafadbc5906e9de15855bcd920 /server/tests/api/notifications
parent2b4dd7e26d93c2d9bef4f365cb03c511eff4ca8f (diff)
downloadPeerTube-c0e71e849a40871ed8eea3dacd8608d380bdb490.tar.gz
PeerTube-c0e71e849a40871ed8eea3dacd8608d380bdb490.tar.zst
PeerTube-c0e71e849a40871ed8eea3dacd8608d380bdb490.zip
Fix user notifications tests
Diffstat (limited to 'server/tests/api/notifications')
-rw-r--r--server/tests/api/notifications/user-notifications.ts22
1 files changed, 13 insertions, 9 deletions
diff --git a/server/tests/api/notifications/user-notifications.ts b/server/tests/api/notifications/user-notifications.ts
index 3874b0aab..f479e1785 100644
--- a/server/tests/api/notifications/user-notifications.ts
+++ b/server/tests/api/notifications/user-notifications.ts
@@ -4,24 +4,27 @@ import * as chai from 'chai'
4import 'mocha' 4import 'mocha'
5import { 5import {
6 addVideoToBlacklist, 6 addVideoToBlacklist,
7 cleanupTests,
7 createUser, 8 createUser,
8 doubleFollow, 9 doubleFollow,
9 flushAndRunMultipleServers, 10 flushAndRunMultipleServers,
10 flushTests, 11 follow,
12 getCustomConfig,
11 getMyUserInformation, 13 getMyUserInformation,
14 getVideoCommentThreads,
15 getVideoThreadComments,
12 immutableAssign, 16 immutableAssign,
13 registerUser, 17 registerUser,
14 removeVideoFromBlacklist, 18 removeVideoFromBlacklist,
15 reportVideoAbuse, 19 reportVideoAbuse,
20 updateCustomConfig,
16 updateMyUser, 21 updateMyUser,
17 updateVideo, 22 updateVideo,
18 updateVideoChannel, 23 updateVideoChannel,
19 userLogin, 24 userLogin,
20 wait, 25 wait
21 getCustomConfig,
22 updateCustomConfig, getVideoThreadComments, getVideoCommentThreads, follow, cleanupTests
23} from '../../../../shared/extra-utils' 26} from '../../../../shared/extra-utils'
24import { killallServers, ServerInfo, uploadVideo } from '../../../../shared/extra-utils/index' 27import { ServerInfo, uploadVideo } from '../../../../shared/extra-utils/index'
25import { setAccessTokensToServers } from '../../../../shared/extra-utils/users/login' 28import { setAccessTokensToServers } from '../../../../shared/extra-utils/users/login'
26import { waitJobs } from '../../../../shared/extra-utils/server/jobs' 29import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
27import { getUserNotificationSocket } from '../../../../shared/extra-utils/socket/socket-io' 30import { getUserNotificationSocket } from '../../../../shared/extra-utils/socket/socket-io'
@@ -32,16 +35,17 @@ import {
32 checkNewActorFollow, 35 checkNewActorFollow,
33 checkNewBlacklistOnMyVideo, 36 checkNewBlacklistOnMyVideo,
34 checkNewCommentOnMyVideo, 37 checkNewCommentOnMyVideo,
38 checkNewInstanceFollower,
35 checkNewVideoAbuseForModerators, 39 checkNewVideoAbuseForModerators,
36 checkVideoAutoBlacklistForModerators,
37 checkNewVideoFromSubscription, 40 checkNewVideoFromSubscription,
38 checkUserRegistered, 41 checkUserRegistered,
42 checkVideoAutoBlacklistForModerators,
39 checkVideoIsPublished, 43 checkVideoIsPublished,
40 getLastNotification, 44 getLastNotification,
41 getUserNotifications, 45 getUserNotifications,
46 markAsReadAllNotifications,
42 markAsReadNotifications, 47 markAsReadNotifications,
43 updateMyNotificationSettings, 48 updateMyNotificationSettings
44 markAsReadAllNotifications, checkNewInstanceFollower
45} from '../../../../shared/extra-utils/users/user-notifications' 49} from '../../../../shared/extra-utils/users/user-notifications'
46import { 50import {
47 User, 51 User,
@@ -879,7 +883,7 @@ describe('Test users notifications', function () {
879 }) 883 })
880 884
881 it('Should send a notification only to admin when there is a new instance follower', async function () { 885 it('Should send a notification only to admin when there is a new instance follower', async function () {
882 this.timeout(10000) 886 this.timeout(20000)
883 887
884 await follow(servers[2].url, [ servers[0].url ], servers[2].accessToken) 888 await follow(servers[2].url, [ servers[0].url ], servers[2].accessToken)
885 889