From a5896799f169d3313b63165fe6a79d4149fa6df1 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 30 Apr 2020 09:28:39 +0200 Subject: Add plugin settings change watcher --- server/tests/api/server/plugins.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'server/tests/api') 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 { 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({ -- cgit v1.2.3