aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-04-30 09:28:39 +0200
committerChocobozzz <chocobozzz@cpy.re>2020-05-04 16:21:39 +0200
commita5896799f169d3313b63165fe6a79d4149fa6df1 (patch)
tree0151902e829dce13bbb22ff0fe6967ce6bee4058 /server/tests/api
parentdadc90bca257f2d785713a37949c3a1bf6a5243d (diff)
downloadPeerTube-a5896799f169d3313b63165fe6a79d4149fa6df1.tar.gz
PeerTube-a5896799f169d3313b63165fe6a79d4149fa6df1.tar.zst
PeerTube-a5896799f169d3313b63165fe6a79d4149fa6df1.zip
Add plugin settings change watcher
Diffstat (limited to 'server/tests/api')
-rw-r--r--server/tests/api/server/plugins.ts11
1 files changed, 9 insertions, 2 deletions
diff --git a/server/tests/api/server/plugins.ts b/server/tests/api/server/plugins.ts
index 452d05012..9885be4e8 100644
--- a/server/tests/api/server/plugins.ts
+++ b/server/tests/api/server/plugins.ts
@@ -27,7 +27,8 @@ import {
27 updatePlugin, 27 updatePlugin,
28 updatePluginPackageJSON, 28 updatePluginPackageJSON,
29 updatePluginSettings, 29 updatePluginSettings,
30 wait 30 wait,
31 waitUntilLog
31} from '../../../../shared/extra-utils' 32} from '../../../../shared/extra-utils'
32import { PluginType } from '../../../../shared/models/plugins/plugin.type' 33import { PluginType } from '../../../../shared/models/plugins/plugin.type'
33import { PeerTubePluginIndex } from '../../../../shared/models/plugins/peertube-plugin-index.model' 34import { PeerTubePluginIndex } from '../../../../shared/models/plugins/peertube-plugin-index.model'
@@ -142,7 +143,7 @@ describe('Test plugins', function () {
142 it('Should have the correct global css', async function () { 143 it('Should have the correct global css', async function () {
143 const res = await getPluginsCSS(server.url) 144 const res = await getPluginsCSS(server.url)
144 145
145 expect(res.text).to.contain('--mainBackgroundColor') 146 expect(res.text).to.contain('background-color: red')
146 }) 147 })
147 148
148 it('Should have the plugin loaded in the configuration', async function () { 149 it('Should have the plugin loaded in the configuration', async function () {
@@ -258,6 +259,12 @@ describe('Test plugins', function () {
258 }) 259 })
259 }) 260 })
260 261
262 it('Should have watched settings changes', async function () {
263 this.timeout(10000)
264
265 await waitUntilLog(server, 'Settings changed!')
266 })
267
261 it('Should get a plugin and a theme', async function () { 268 it('Should get a plugin and a theme', async function () {
262 { 269 {
263 const res = await getPlugin({ 270 const res = await getPlugin({