aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/notifications
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/notifications')
-rw-r--r--server/tests/api/notifications/admin-notifications.ts9
-rw-r--r--server/tests/api/notifications/comments-notifications.ts8
-rw-r--r--server/tests/api/notifications/moderation-notifications.ts11
-rw-r--r--server/tests/api/notifications/notifications-api.ts8
-rw-r--r--server/tests/api/notifications/user-notifications.ts11
5 files changed, 18 insertions, 29 deletions
diff --git a/server/tests/api/notifications/admin-notifications.ts b/server/tests/api/notifications/admin-notifications.ts
index 18962a71e..f037e7aae 100644
--- a/server/tests/api/notifications/admin-notifications.ts
+++ b/server/tests/api/notifications/admin-notifications.ts
@@ -6,14 +6,13 @@ import {
6 CheckerBaseParams, 6 CheckerBaseParams,
7 checkNewPeerTubeVersion, 7 checkNewPeerTubeVersion,
8 checkNewPluginVersion, 8 checkNewPluginVersion,
9 cleanupTests,
10 MockJoinPeerTubeVersions, 9 MockJoinPeerTubeVersions,
11 MockSmtpServer, 10 MockSmtpServer,
12 PeerTubeServer, 11 prepareNotificationsTest
13 prepareNotificationsTest, 12} from '@server/tests/shared'
14 wait 13import { wait } from '@shared/core-utils'
15} from '@shared/server-commands'
16import { PluginType, UserNotification, UserNotificationType } from '@shared/models' 14import { PluginType, UserNotification, UserNotificationType } from '@shared/models'
15import { cleanupTests, PeerTubeServer } from '@shared/server-commands'
17 16
18describe('Test admin notifications', function () { 17describe('Test admin notifications', function () {
19 let server: PeerTubeServer 18 let server: PeerTubeServer
diff --git a/server/tests/api/notifications/comments-notifications.ts b/server/tests/api/notifications/comments-notifications.ts
index 919be4bca..b82f1712a 100644
--- a/server/tests/api/notifications/comments-notifications.ts
+++ b/server/tests/api/notifications/comments-notifications.ts
@@ -6,13 +6,11 @@ import {
6 checkCommentMention, 6 checkCommentMention,
7 CheckerBaseParams, 7 CheckerBaseParams,
8 checkNewCommentOnMyVideo, 8 checkNewCommentOnMyVideo,
9 cleanupTests,
10 MockSmtpServer, 9 MockSmtpServer,
11 PeerTubeServer, 10 prepareNotificationsTest
12 prepareNotificationsTest, 11} from '@server/tests/shared'
13 waitJobs
14} from '@shared/server-commands'
15import { UserNotification } from '@shared/models' 12import { UserNotification } from '@shared/models'
13import { cleanupTests, PeerTubeServer, waitJobs } from '@shared/server-commands'
16 14
17const expect = chai.expect 15const expect = chai.expect
18 16
diff --git a/server/tests/api/notifications/moderation-notifications.ts b/server/tests/api/notifications/moderation-notifications.ts
index 4da9d2684..e6e1d5f7b 100644
--- a/server/tests/api/notifications/moderation-notifications.ts
+++ b/server/tests/api/notifications/moderation-notifications.ts
@@ -1,7 +1,6 @@
1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ 1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
2 2
3import 'mocha' 3import 'mocha'
4import { buildUUID } from '@shared/core-utils/uuid'
5import { 4import {
6 checkAbuseStateChange, 5 checkAbuseStateChange,
7 checkAutoInstanceFollowing, 6 checkAutoInstanceFollowing,
@@ -16,15 +15,13 @@ import {
16 checkUserRegistered, 15 checkUserRegistered,
17 checkVideoAutoBlacklistForModerators, 16 checkVideoAutoBlacklistForModerators,
18 checkVideoIsPublished, 17 checkVideoIsPublished,
19 cleanupTests,
20 MockInstancesIndex, 18 MockInstancesIndex,
21 MockSmtpServer, 19 MockSmtpServer,
22 PeerTubeServer, 20 prepareNotificationsTest
23 prepareNotificationsTest, 21} from '@server/tests/shared'
24 wait, 22import { buildUUID, wait } from '@shared/core-utils'
25 waitJobs
26} from '@shared/server-commands'
27import { AbuseState, CustomConfig, UserNotification, UserRole, VideoPrivacy } from '@shared/models' 23import { AbuseState, CustomConfig, UserNotification, UserRole, VideoPrivacy } from '@shared/models'
24import { cleanupTests, PeerTubeServer, waitJobs } from '@shared/server-commands'
28 25
29describe('Test moderation notifications', function () { 26describe('Test moderation notifications', function () {
30 let servers: PeerTubeServer[] = [] 27 let servers: PeerTubeServer[] = []
diff --git a/server/tests/api/notifications/notifications-api.ts b/server/tests/api/notifications/notifications-api.ts
index aeb73350b..ac08449f8 100644
--- a/server/tests/api/notifications/notifications-api.ts
+++ b/server/tests/api/notifications/notifications-api.ts
@@ -5,14 +5,12 @@ import * as chai from 'chai'
5import { 5import {
6 CheckerBaseParams, 6 CheckerBaseParams,
7 checkNewVideoFromSubscription, 7 checkNewVideoFromSubscription,
8 cleanupTests,
9 getAllNotificationsSettings, 8 getAllNotificationsSettings,
10 MockSmtpServer, 9 MockSmtpServer,
11 PeerTubeServer, 10 prepareNotificationsTest
12 prepareNotificationsTest, 11} from '@server/tests/shared'
13 waitJobs
14} from '@shared/server-commands'
15import { UserNotification, UserNotificationSettingValue } from '@shared/models' 12import { UserNotification, UserNotificationSettingValue } from '@shared/models'
13import { cleanupTests, PeerTubeServer, waitJobs } from '@shared/server-commands'
16 14
17const expect = chai.expect 15const expect = chai.expect
18 16
diff --git a/server/tests/api/notifications/user-notifications.ts b/server/tests/api/notifications/user-notifications.ts
index a2fcdf2ef..bb3024617 100644
--- a/server/tests/api/notifications/user-notifications.ts
+++ b/server/tests/api/notifications/user-notifications.ts
@@ -2,23 +2,20 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { buildUUID } from '@shared/core-utils/uuid'
6import { 5import {
7 CheckerBaseParams, 6 CheckerBaseParams,
8 checkMyVideoImportIsFinished, 7 checkMyVideoImportIsFinished,
9 checkNewActorFollow, 8 checkNewActorFollow,
10 checkNewVideoFromSubscription, 9 checkNewVideoFromSubscription,
11 checkVideoIsPublished, 10 checkVideoIsPublished,
12 cleanupTests,
13 FIXTURE_URLS, 11 FIXTURE_URLS,
14 MockSmtpServer, 12 MockSmtpServer,
15 PeerTubeServer,
16 prepareNotificationsTest, 13 prepareNotificationsTest,
17 uploadRandomVideoOnServers, 14 uploadRandomVideoOnServers
18 wait, 15} from '@server/tests/shared'
19 waitJobs 16import { buildUUID, wait } from '@shared/core-utils'
20} from '@shared/server-commands'
21import { UserNotification, UserNotificationType, VideoPrivacy } from '@shared/models' 17import { UserNotification, UserNotificationType, VideoPrivacy } from '@shared/models'
18import { cleanupTests, PeerTubeServer, waitJobs } from '@shared/server-commands'
22 19
23const expect = chai.expect 20const expect = chai.expect
24 21