aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/plugins/video-constants.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/plugins/video-constants.ts')
-rw-r--r--server/tests/plugins/video-constants.ts28
1 files changed, 13 insertions, 15 deletions
diff --git a/server/tests/plugins/video-constants.ts b/server/tests/plugins/video-constants.ts
index eb014c596..4124e8a52 100644
--- a/server/tests/plugins/video-constants.ts
+++ b/server/tests/plugins/video-constants.ts
@@ -1,22 +1,24 @@
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 * as chai from 'chai'
4import 'mocha' 3import 'mocha'
5import { cleanupTests, flushAndRunServer, ServerInfo } from '../../../shared/extra-utils/server/servers' 4import * as chai from 'chai'
5import { HttpStatusCode } from '@shared/core-utils'
6import { 6import {
7 cleanupTests,
7 createVideoPlaylist, 8 createVideoPlaylist,
8 getPluginTestPath, 9 flushAndRunServer,
9 getVideo, 10 getVideo,
10 getVideoCategories, 11 getVideoCategories,
11 getVideoLanguages, 12 getVideoLanguages,
12 getVideoLicences, getVideoPlaylistPrivacies, getVideoPrivacies, 13 getVideoLicences,
13 installPlugin, 14 getVideoPlaylistPrivacies,
15 getVideoPrivacies,
16 PluginsCommand,
17 ServerInfo,
14 setAccessTokensToServers, 18 setAccessTokensToServers,
15 uninstallPlugin,
16 uploadVideo 19 uploadVideo
17} from '../../../shared/extra-utils' 20} from '@shared/extra-utils'
18import { VideoDetails, VideoPlaylistPrivacy } from '../../../shared/models/videos' 21import { VideoDetails, VideoPlaylistPrivacy } from '@shared/models'
19import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes'
20 22
21const expect = chai.expect 23const expect = chai.expect
22 24
@@ -29,11 +31,7 @@ describe('Test plugin altering video constants', function () {
29 server = await flushAndRunServer(1) 31 server = await flushAndRunServer(1)
30 await setAccessTokensToServers([ server ]) 32 await setAccessTokensToServers([ server ])
31 33
32 await installPlugin({ 34 await server.pluginsCommand.install({ path: PluginsCommand.getPluginTestPath('-video-constants') })
33 url: server.url,
34 accessToken: server.accessToken,
35 path: getPluginTestPath('-video-constants')
36 })
37 }) 35 })
38 36
39 it('Should have updated languages', async function () { 37 it('Should have updated languages', async function () {
@@ -117,7 +115,7 @@ describe('Test plugin altering video constants', function () {
117 }) 115 })
118 116
119 it('Should uninstall the plugin and reset languages, categories, licences and privacies', async function () { 117 it('Should uninstall the plugin and reset languages, categories, licences and privacies', async function () {
120 await uninstallPlugin({ url: server.url, accessToken: server.accessToken, npmName: 'peertube-plugin-test-video-constants' }) 118 await server.pluginsCommand.uninstall({ npmName: 'peertube-plugin-test-video-constants' })
121 119
122 { 120 {
123 const res = await getVideoLanguages(server.url) 121 const res = await getVideoLanguages(server.url)