]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/client.ts
Translated using Weblate (French (France))
[github/Chocobozzz/PeerTube.git] / server / tests / client.ts
index 48f2ee4fcefc4b57a4acaf08985f94e49dcf16c0..d61724e5116f0b5d9081316b66375f10f96bf926 100644 (file)
@@ -1,21 +1,20 @@
-/* tslint:disable:no-unused-expression */
+/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
 
 import 'mocha'
 import * as chai from 'chai'
 import * as request from 'supertest'
 import {
-  flushTests,
+  cleanupTests,
+  flushAndRunServer,
   getCustomConfig,
   getVideosList,
-  killallServers,
   makeHTMLRequest,
-  runServer,
   ServerInfo,
   serverLogin,
   updateCustomConfig,
   updateCustomSubConfig,
   uploadVideo
-} from './utils'
+} from '../../shared/extra-utils'
 
 const expect = chai.expect
 
@@ -31,9 +30,7 @@ describe('Test a client controllers', function () {
   before(async function () {
     this.timeout(120000)
 
-    await flushTests()
-
-    server = await runServer(1)
+    server = await flushAndRunServer(1)
     server.accessToken = await serverLogin(server)
 
     const videoAttributes = {
@@ -123,6 +120,12 @@ describe('Test a client controllers', function () {
   it('Should update the customized configuration and have the correct index html tags', async function () {
     await updateCustomSubConfig(server.url, server.accessToken, {
       instance: {
+        name: 'PeerTube updated',
+        shortDescription: 'my short description',
+        description: 'my super description',
+        terms: 'my super terms',
+        defaultClientRoute: '/videos/recently-added',
+        defaultNSFWPolicy: 'blur',
         customizations: {
           javascript: 'alert("coucou")',
           css: 'body { background-color: red; }'
@@ -142,6 +145,6 @@ describe('Test a client controllers', function () {
   })
 
   after(async function () {
-    killallServers([ server ])
+    await cleanupTests([ server ])
   })
 })