getMyUserInformation,
getPlugin,
getPluginPackageJSON,
- getPluginRegisteredSettings,
- getPluginsCSS,
getPublicSettings,
installPlugin,
killallServers,
ServerInfo,
setAccessTokensToServers,
setPluginVersion,
+ testHelloWorldRegisteredSettings,
uninstallPlugin,
updateCustomSubConfig,
updateMyUser,
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'
-import { ServerConfig } from '../../../../shared/models/server'
import { PeerTubePlugin } from '../../../../shared/models/plugins/peertube-plugin.model'
-import { User } from '../../../../shared/models/users'
import { PluginPackageJson } from '../../../../shared/models/plugins/plugin-package-json.model'
-import { RegisteredServerSettings } from '../../../../shared/models/plugins/register-server-setting.model'
+import { PluginType } from '../../../../shared/models/plugins/plugin.type'
import { PublicServerSetting } from '../../../../shared/models/plugins/public-server.setting'
+import { ServerConfig } from '../../../../shared/models/server'
+import { User } from '../../../../shared/models/users'
const expect = chai.expect
}
})
- it('Should have an empty global css', async function () {
- const res = await getPluginsCSS(server.url)
-
- expect(res.text).to.be.empty
- })
-
it('Should install a plugin and a theme', async function () {
this.timeout(30000)
})
})
- it('Should have the correct global css', async function () {
- const res = await getPluginsCSS(server.url)
-
- expect(res.text).to.contain('--mainBackgroundColor')
- })
-
it('Should have the plugin loaded in the configuration', async function () {
const res = await getConfig(server.url)
const config: ServerConfig = res.body
})
it('Should get registered settings', async function () {
- const res = await getPluginRegisteredSettings({
- url: server.url,
- accessToken: server.accessToken,
- npmName: 'peertube-plugin-hello-world'
- })
-
- const registeredSettings = (res.body as RegisteredServerSettings).registeredSettings
-
- expect(registeredSettings).to.have.length.at.least(1)
-
- const adminNameSettings = registeredSettings.find(s => s.name === 'admin-name')
- expect(adminNameSettings).to.not.be.undefined
+ await testHelloWorldRegisteredSettings(server)
})
it('Should get public settings', async 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({
expect(res.body.data).to.have.lengthOf(0)
})
- it('Should have an empty global css', async function () {
- const res = await getPluginsCSS(server.url)
-
- expect(res.text).to.be.empty
- })
-
it('Should list uninstalled plugins', async function () {
const res = await listPlugins({
url: server.url,