]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/server/stats.ts
Merge branch 'release/4.2.0' into develop
[github/Chocobozzz/PeerTube.git] / server / tests / api / server / stats.ts
index efc80463cccf52dd8a24b40d118e0a9ebbb8f2b4..a9ae236fba03c247414f59ad99cbca0a380c080e 100644 (file)
@@ -2,16 +2,16 @@
 
 import 'mocha'
 import * as chai from 'chai'
+import { wait } from '@shared/core-utils'
+import { ActivityType, VideoPlaylistPrivacy } from '@shared/models'
 import {
   cleanupTests,
   createMultipleServers,
   doubleFollow,
   PeerTubeServer,
   setAccessTokensToServers,
-  wait,
   waitJobs
-} from '@shared/extra-utils'
-import { ActivityType, VideoPlaylistPrivacy } from '@shared/models'
+} from '@shared/server-commands'
 
 const expect = chai.expect
 
@@ -38,7 +38,7 @@ describe('Test stats (excluding redundancy)', function () {
 
     await servers[0].comments.createThread({ videoId: uuid, text: 'comment' })
 
-    await servers[0].videos.view({ id: uuid })
+    await servers[0].views.simulateView({ id: uuid })
 
     // Wait the video views repeatable job
     await wait(8000)
@@ -230,13 +230,7 @@ describe('Test stats (excluding redundancy)', function () {
   it('Should have the correct AP stats', async function () {
     this.timeout(60000)
 
-    await servers[0].config.updateCustomSubConfig({
-      newConfig: {
-        transcoding: {
-          enabled: false
-        }
-      }
-    })
+    await servers[0].config.disableTranscoding()
 
     const first = await servers[1].stats.get()