X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fserver%2Fstats.ts;h=a9ae236fba03c247414f59ad99cbca0a380c080e;hb=6d9ed0b6cb439f53e6df2aa1e751369bdc0f76ab;hp=5ec771429b41737e115b1701bf7cf293975b4dee;hpb=ac27887774e63d99f4e227fbe18846f143cc4b3c;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/server/stats.ts b/server/tests/api/server/stats.ts index 5ec771429..a9ae236fb 100644 --- a/server/tests/api/server/stats.ts +++ b/server/tests/api/server/stats.ts @@ -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) @@ -198,6 +198,7 @@ describe('Test stats (excluding redundancy)', function () { }, resolutions: { '0p': false, + '144p': false, '240p': false, '360p': false, '480p': false, @@ -229,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()