]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/server/plugins.ts
Add plugin settings change watcher
[github/Chocobozzz/PeerTube.git] / server / tests / api / server / plugins.ts
index 452d050125e153a3c87d14e0d0b829691c4dc10e..9885be4e84bc3b19f8bb97646e0af59db0422a5b 100644 (file)
@@ -27,7 +27,8 @@ import {
   updatePlugin,
   updatePluginPackageJSON,
   updatePluginSettings,
-  wait
+  wait,
+  waitUntilLog
 } from '../../../../shared/extra-utils'
 import { PluginType } from '../../../../shared/models/plugins/plugin.type'
 import { PeerTubePluginIndex } from '../../../../shared/models/plugins/peertube-plugin-index.model'
@@ -142,7 +143,7 @@ describe('Test plugins', function () {
   it('Should have the correct global css', async function () {
     const res = await getPluginsCSS(server.url)
 
-    expect(res.text).to.contain('--mainBackgroundColor')
+    expect(res.text).to.contain('background-color: red')
   })
 
   it('Should have the plugin loaded in the configuration', async function () {
@@ -258,6 +259,12 @@ describe('Test plugins', function () {
     })
   })
 
+  it('Should have watched settings changes', async function () {
+    this.timeout(10000)
+
+    await waitUntilLog(server, 'Settings changed!')
+  })
+
   it('Should get a plugin and a theme', async function () {
     {
       const res = await getPlugin({