From ae2abfd3aed3e75d39a316b49b914d187faa7475 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 7 Jul 2021 10:33:49 +0200 Subject: Introduce plugins command --- .../tests/api/notifications/admin-notifications.ts | 31 +++++++++------------- 1 file changed, 12 insertions(+), 19 deletions(-) (limited to 'server/tests/api/notifications/admin-notifications.ts') 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 @@ import 'mocha' import { expect } from 'chai' -import { MockJoinPeerTubeVersions } from '@shared/extra-utils' -import { PluginType } from '@shared/models' -import { cleanupTests, installPlugin, setPluginLatestVersion, setPluginVersion, wait } from '../../../../shared/extra-utils' -import { ServerInfo } from '../../../../shared/extra-utils/index' -import { MockSmtpServer } from '../../../../shared/extra-utils/mock-servers/mock-email' import { CheckerBaseParams, checkNewPeerTubeVersion, checkNewPluginVersion, - prepareNotificationsTest -} from '../../../../shared/extra-utils/users/user-notifications' -import { UserNotification, UserNotificationType } from '../../../../shared/models/users' + cleanupTests, + MockJoinPeerTubeVersions, + MockSmtpServer, + prepareNotificationsTest, + ServerInfo, + setPluginLatestVersion, + setPluginVersion, + wait +} from '@shared/extra-utils' +import { PluginType, UserNotification, UserNotificationType } from '@shared/models' describe('Test admin notifications', function () { let server: ServerInfo @@ -58,17 +60,8 @@ describe('Test admin notifications', function () { token: server.accessToken } - await installPlugin({ - url: server.url, - accessToken: server.accessToken, - npmName: 'peertube-plugin-hello-world' - }) - - await installPlugin({ - url: server.url, - accessToken: server.accessToken, - npmName: 'peertube-theme-background-red' - }) + await server.pluginsCommand.install({ npmName: 'peertube-plugin-hello-world' }) + await server.pluginsCommand.install({ npmName: 'peertube-theme-background-red' }) }) describe('Latest PeerTube version notification', function () { -- cgit v1.2.3