diff options
Diffstat (limited to 'server/tests/api')
-rw-r--r-- | server/tests/api/server/plugins.ts | 48 |
1 files changed, 5 insertions, 43 deletions
diff --git a/server/tests/api/server/plugins.ts b/server/tests/api/server/plugins.ts index ad0a5139b..ecf7c0d3f 100644 --- a/server/tests/api/server/plugins.ts +++ b/server/tests/api/server/plugins.ts | |||
@@ -11,7 +11,6 @@ import { | |||
11 | getPlugin, | 11 | getPlugin, |
12 | getPluginPackageJSON, | 12 | getPluginPackageJSON, |
13 | getPluginRegisteredSettings, | 13 | getPluginRegisteredSettings, |
14 | getPluginsCSS, | ||
15 | getPublicSettings, | 14 | getPublicSettings, |
16 | installPlugin, | 15 | installPlugin, |
17 | killallServers, | 16 | killallServers, |
@@ -28,17 +27,16 @@ import { | |||
28 | updatePluginPackageJSON, | 27 | updatePluginPackageJSON, |
29 | updatePluginSettings, | 28 | updatePluginSettings, |
30 | wait, | 29 | wait, |
31 | waitUntilLog, | 30 | waitUntilLog |
32 | makeHTMLRequest | ||
33 | } from '../../../../shared/extra-utils' | 31 | } from '../../../../shared/extra-utils' |
34 | import { PluginType } from '../../../../shared/models/plugins/plugin.type' | ||
35 | import { PeerTubePluginIndex } from '../../../../shared/models/plugins/peertube-plugin-index.model' | 32 | import { PeerTubePluginIndex } from '../../../../shared/models/plugins/peertube-plugin-index.model' |
36 | import { ServerConfig } from '../../../../shared/models/server' | ||
37 | import { PeerTubePlugin } from '../../../../shared/models/plugins/peertube-plugin.model' | 33 | import { PeerTubePlugin } from '../../../../shared/models/plugins/peertube-plugin.model' |
38 | import { User } from '../../../../shared/models/users' | ||
39 | import { PluginPackageJson } from '../../../../shared/models/plugins/plugin-package-json.model' | 34 | import { PluginPackageJson } from '../../../../shared/models/plugins/plugin-package-json.model' |
40 | import { RegisteredServerSettings } from '../../../../shared/models/plugins/register-server-setting.model' | 35 | import { PluginType } from '../../../../shared/models/plugins/plugin.type' |
41 | import { PublicServerSetting } from '../../../../shared/models/plugins/public-server.setting' | 36 | import { PublicServerSetting } from '../../../../shared/models/plugins/public-server.setting' |
37 | import { RegisteredServerSettings } from '../../../../shared/models/plugins/register-server-setting.model' | ||
38 | import { ServerConfig } from '../../../../shared/models/server' | ||
39 | import { User } from '../../../../shared/models/users' | ||
42 | 40 | ||
43 | const expect = chai.expect | 41 | const expect = chai.expect |
44 | 42 | ||
@@ -119,18 +117,6 @@ describe('Test plugins', function () { | |||
119 | } | 117 | } |
120 | }) | 118 | }) |
121 | 119 | ||
122 | it('Should have an empty global css', async function () { | ||
123 | { | ||
124 | const res = await getPluginsCSS(server.url) | ||
125 | expect(res.text).to.be.empty | ||
126 | } | ||
127 | |||
128 | for (const path of [ '/', '/videos/embed/1', '/video-playlists/embed/1' ]) { | ||
129 | const res = await makeHTMLRequest(server.url, path) | ||
130 | expect(res.text).to.not.include('link rel="stylesheet" href="/plugins/global.css') | ||
131 | } | ||
132 | }) | ||
133 | |||
134 | it('Should install a plugin and a theme', async function () { | 120 | it('Should install a plugin and a theme', async function () { |
135 | this.timeout(30000) | 121 | this.timeout(30000) |
136 | 122 | ||
@@ -147,18 +133,6 @@ describe('Test plugins', function () { | |||
147 | }) | 133 | }) |
148 | }) | 134 | }) |
149 | 135 | ||
150 | it('Should have the correct global css', async function () { | ||
151 | { | ||
152 | const res = await getPluginsCSS(server.url) | ||
153 | expect(res.text).to.contain('background-color: red') | ||
154 | } | ||
155 | |||
156 | for (const path of [ '/', '/videos/embed/1', '/video-playlists/embed/1' ]) { | ||
157 | const res = await makeHTMLRequest(server.url, path) | ||
158 | expect(res.text).to.include('link rel="stylesheet" href="/plugins/global.css') | ||
159 | } | ||
160 | }) | ||
161 | |||
162 | it('Should have the plugin loaded in the configuration', async function () { | 136 | it('Should have the plugin loaded in the configuration', async function () { |
163 | const res = await getConfig(server.url) | 137 | const res = await getConfig(server.url) |
164 | const config: ServerConfig = res.body | 138 | const config: ServerConfig = res.body |
@@ -400,18 +374,6 @@ describe('Test plugins', function () { | |||
400 | expect(res.body.data).to.have.lengthOf(0) | 374 | expect(res.body.data).to.have.lengthOf(0) |
401 | }) | 375 | }) |
402 | 376 | ||
403 | it('Should have an empty global css', async function () { | ||
404 | { | ||
405 | const res = await getPluginsCSS(server.url) | ||
406 | expect(res.text).to.be.empty | ||
407 | } | ||
408 | |||
409 | for (const path of [ '/', '/videos/embed/1', '/video-playlists/embed/1' ]) { | ||
410 | const res = await makeHTMLRequest(server.url, path) | ||
411 | expect(res.text).to.not.include('link rel="stylesheet" href="/plugins/global.css') | ||
412 | } | ||
413 | }) | ||
414 | |||
415 | it('Should list uninstalled plugins', async function () { | 377 | it('Should list uninstalled plugins', async function () { |
416 | const res = await listPlugins({ | 378 | const res = await listPlugins({ |
417 | url: server.url, | 379 | url: server.url, |