aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-07 09:16:40 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:17 +0200
commitc3d29f694bf8c910f917be655626d0f80871124f (patch)
treec90dfdc1245c8a9aca49e9ea9c71ed8e6b9dd35f /server/tests/api/videos
parent883a9019085ff9013079d6b1539b86f2f519175a (diff)
downloadPeerTube-c3d29f694bf8c910f917be655626d0f80871124f.tar.gz
PeerTube-c3d29f694bf8c910f917be655626d0f80871124f.tar.zst
PeerTube-c3d29f694bf8c910f917be655626d0f80871124f.zip
Introduce follows command
Diffstat (limited to 'server/tests/api/videos')
-rw-r--r--server/tests/api/videos/video-description.ts2
-rw-r--r--server/tests/api/videos/video-playlists.ts41
2 files changed, 22 insertions, 21 deletions
diff --git a/server/tests/api/videos/video-description.ts b/server/tests/api/videos/video-description.ts
index b8e98e45f..e1c9afe79 100644
--- a/server/tests/api/videos/video-description.ts
+++ b/server/tests/api/videos/video-description.ts
@@ -1,7 +1,7 @@
1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ 1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
2 2
3import * as chai from 'chai'
4import 'mocha' 3import 'mocha'
4import * as chai from 'chai'
5import { 5import {
6 cleanupTests, 6 cleanupTests,
7 flushAndRunMultipleServers, 7 flushAndRunMultipleServers,
diff --git a/server/tests/api/videos/video-playlists.ts b/server/tests/api/videos/video-playlists.ts
index da8de054b..28f68dcfe 100644
--- a/server/tests/api/videos/video-playlists.ts
+++ b/server/tests/api/videos/video-playlists.ts
@@ -2,8 +2,12 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' 5import { HttpStatusCode } from '@shared/core-utils'
6import { 6import {
7 addAccountToAccountBlocklist,
8 addAccountToServerBlocklist,
9 addServerToAccountBlocklist,
10 addServerToServerBlocklist,
7 addVideoChannel, 11 addVideoChannel,
8 addVideoInPlaylist, 12 addVideoInPlaylist,
9 addVideoToBlacklist, 13 addVideoToBlacklist,
@@ -27,6 +31,10 @@ import {
27 getVideoPlaylistPrivacies, 31 getVideoPlaylistPrivacies,
28 getVideoPlaylistsList, 32 getVideoPlaylistsList,
29 getVideoPlaylistWithToken, 33 getVideoPlaylistWithToken,
34 removeAccountFromAccountBlocklist,
35 removeAccountFromServerBlocklist,
36 removeServerFromAccountBlocklist,
37 removeServerFromServerBlocklist,
30 removeUser, 38 removeUser,
31 removeVideoFromBlacklist, 39 removeVideoFromBlacklist,
32 removeVideoFromPlaylist, 40 removeVideoFromPlaylist,
@@ -35,7 +43,6 @@ import {
35 setAccessTokensToServers, 43 setAccessTokensToServers,
36 setDefaultVideoChannel, 44 setDefaultVideoChannel,
37 testImage, 45 testImage,
38 unfollow,
39 updateVideo, 46 updateVideo,
40 updateVideoPlaylist, 47 updateVideoPlaylist,
41 updateVideoPlaylistElement, 48 updateVideoPlaylistElement,
@@ -44,24 +51,18 @@ import {
44 userLogin, 51 userLogin,
45 wait, 52 wait,
46 waitJobs 53 waitJobs
47} from '../../../../shared/extra-utils' 54} from '@shared/extra-utils'
48import { 55import {
49 addAccountToAccountBlocklist, 56 User,
50 addAccountToServerBlocklist, 57 VideoExistInPlaylist,
51 addServerToAccountBlocklist, 58 VideoPlaylist,
52 addServerToServerBlocklist, 59 VideoPlaylistCreateResult,
53 removeAccountFromAccountBlocklist, 60 VideoPlaylistElement,
54 removeAccountFromServerBlocklist, 61 VideoPlaylistElementType,
55 removeServerFromAccountBlocklist, 62 VideoPlaylistPrivacy,
56 removeServerFromServerBlocklist 63 VideoPlaylistType,
57} from '../../../../shared/extra-utils/users/blocklist' 64 VideoPrivacy
58import { User } from '../../../../shared/models/users' 65} from '@shared/models'
59import { VideoPlaylistCreateResult, VideoPrivacy } from '../../../../shared/models/videos'
60import { VideoExistInPlaylist } from '../../../../shared/models/videos/playlist/video-exist-in-playlist.model'
61import { VideoPlaylistElement, VideoPlaylistElementType } from '../../../../shared/models/videos/playlist/video-playlist-element.model'
62import { VideoPlaylistPrivacy } from '../../../../shared/models/videos/playlist/video-playlist-privacy.model'
63import { VideoPlaylistType } from '../../../../shared/models/videos/playlist/video-playlist-type.model'
64import { VideoPlaylist } from '../../../../shared/models/videos/playlist/video-playlist.model'
65 66
66const expect = chai.expect 67const expect = chai.expect
67 68
@@ -1171,7 +1172,7 @@ describe('Test video playlists', function () {
1171 expect(finder(res.body.data)).to.not.be.undefined 1172 expect(finder(res.body.data)).to.not.be.undefined
1172 } 1173 }
1173 1174
1174 await unfollow(servers[2].url, servers[2].accessToken, servers[0]) 1175 await servers[2].followsCommand.unfollow({ target: servers[0] })
1175 1176
1176 { 1177 {
1177 const res = await getVideoPlaylistsList(servers[2].url, 0, 5) 1178 const res = await getVideoPlaylistsList(servers[2].url, 0, 5)