aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/notifications/admin-notifications.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-07 10:33:49 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:17 +0200
commitae2abfd3aed3e75d39a316b49b914d187faa7475 (patch)
tree4d5060dc310f3d8cdcd5829779522f49b3d10e71 /server/tests/api/notifications/admin-notifications.ts
parent9c6327f803aaf4200672f1fc40b2f43786daca47 (diff)
downloadPeerTube-ae2abfd3aed3e75d39a316b49b914d187faa7475.tar.gz
PeerTube-ae2abfd3aed3e75d39a316b49b914d187faa7475.tar.zst
PeerTube-ae2abfd3aed3e75d39a316b49b914d187faa7475.zip
Introduce plugins command
Diffstat (limited to 'server/tests/api/notifications/admin-notifications.ts')
-rw-r--r--server/tests/api/notifications/admin-notifications.ts31
1 files changed, 12 insertions, 19 deletions
diff --git a/server/tests/api/notifications/admin-notifications.ts b/server/tests/api/notifications/admin-notifications.ts
index 91681c9d6..da9767b74 100644
--- a/server/tests/api/notifications/admin-notifications.ts
+++ b/server/tests/api/notifications/admin-notifications.ts
@@ -2,18 +2,20 @@
2 2
3import 'mocha' 3import 'mocha'
4import { expect } from 'chai' 4import { expect } from 'chai'
5import { MockJoinPeerTubeVersions } from '@shared/extra-utils'
6import { PluginType } from '@shared/models'
7import { cleanupTests, installPlugin, setPluginLatestVersion, setPluginVersion, wait } from '../../../../shared/extra-utils'
8import { ServerInfo } from '../../../../shared/extra-utils/index'
9import { MockSmtpServer } from '../../../../shared/extra-utils/mock-servers/mock-email'
10import { 5import {
11 CheckerBaseParams, 6 CheckerBaseParams,
12 checkNewPeerTubeVersion, 7 checkNewPeerTubeVersion,
13 checkNewPluginVersion, 8 checkNewPluginVersion,
14 prepareNotificationsTest 9 cleanupTests,
15} from '../../../../shared/extra-utils/users/user-notifications' 10 MockJoinPeerTubeVersions,
16import { UserNotification, UserNotificationType } from '../../../../shared/models/users' 11 MockSmtpServer,
12 prepareNotificationsTest,
13 ServerInfo,
14 setPluginLatestVersion,
15 setPluginVersion,
16 wait
17} from '@shared/extra-utils'
18import { PluginType, UserNotification, UserNotificationType } from '@shared/models'
17 19
18describe('Test admin notifications', function () { 20describe('Test admin notifications', function () {
19 let server: ServerInfo 21 let server: ServerInfo
@@ -58,17 +60,8 @@ describe('Test admin notifications', function () {
58 token: server.accessToken 60 token: server.accessToken
59 } 61 }
60 62
61 await installPlugin({ 63 await server.pluginsCommand.install({ npmName: 'peertube-plugin-hello-world' })
62 url: server.url, 64 await server.pluginsCommand.install({ npmName: 'peertube-theme-background-red' })
63 accessToken: server.accessToken,
64 npmName: 'peertube-plugin-hello-world'
65 })
66
67 await installPlugin({
68 url: server.url,
69 accessToken: server.accessToken,
70 npmName: 'peertube-theme-background-red'
71 })
72 }) 65 })
73 66
74 describe('Latest PeerTube version notification', function () { 67 describe('Latest PeerTube version notification', function () {