diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-15 10:02:54 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-20 15:27:18 +0200 |
commit | d23dd9fbfc4d26026352c10f81d2795ceaf2908a (patch) | |
tree | da82286d423c5e834a1ee2dcd5970076b8263cf1 /server/tests/api/check-params/video-playlists.ts | |
parent | 7926c5f9b3ffcabb1ffb0dcfa5e48b8e0b88fbc0 (diff) | |
download | PeerTube-d23dd9fbfc4d26026352c10f81d2795ceaf2908a.tar.gz PeerTube-d23dd9fbfc4d26026352c10f81d2795ceaf2908a.tar.zst PeerTube-d23dd9fbfc4d26026352c10f81d2795ceaf2908a.zip |
Introduce videos command
Diffstat (limited to 'server/tests/api/check-params/video-playlists.ts')
-rw-r--r-- | server/tests/api/check-params/video-playlists.ts | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/server/tests/api/check-params/video-playlists.ts b/server/tests/api/check-params/video-playlists.ts index 46c09bb11..ebd7e2413 100644 --- a/server/tests/api/check-params/video-playlists.ts +++ b/server/tests/api/check-params/video-playlists.ts | |||
@@ -3,15 +3,6 @@ | |||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import { HttpStatusCode } from '@shared/core-utils' | 4 | import { HttpStatusCode } from '@shared/core-utils' |
5 | import { | 5 | import { |
6 | VideoPlaylistCreate, | ||
7 | VideoPlaylistCreateResult, | ||
8 | VideoPlaylistElementCreate, | ||
9 | VideoPlaylistElementUpdate, | ||
10 | VideoPlaylistPrivacy, | ||
11 | VideoPlaylistReorder, | ||
12 | VideoPlaylistType | ||
13 | } from '@shared/models' | ||
14 | import { | ||
15 | checkBadCountPagination, | 6 | checkBadCountPagination, |
16 | checkBadSortPagination, | 7 | checkBadSortPagination, |
17 | checkBadStartPagination, | 8 | checkBadStartPagination, |
@@ -21,9 +12,17 @@ import { | |||
21 | PlaylistsCommand, | 12 | PlaylistsCommand, |
22 | ServerInfo, | 13 | ServerInfo, |
23 | setAccessTokensToServers, | 14 | setAccessTokensToServers, |
24 | setDefaultVideoChannel, | 15 | setDefaultVideoChannel |
25 | uploadVideoAndGetId | 16 | } from '@shared/extra-utils' |
26 | } from '../../../../shared/extra-utils' | 17 | import { |
18 | VideoPlaylistCreate, | ||
19 | VideoPlaylistCreateResult, | ||
20 | VideoPlaylistElementCreate, | ||
21 | VideoPlaylistElementUpdate, | ||
22 | VideoPlaylistPrivacy, | ||
23 | VideoPlaylistReorder, | ||
24 | VideoPlaylistType | ||
25 | } from '@shared/models' | ||
27 | 26 | ||
28 | describe('Test video playlists API validator', function () { | 27 | describe('Test video playlists API validator', function () { |
29 | let server: ServerInfo | 28 | let server: ServerInfo |
@@ -49,7 +48,7 @@ describe('Test video playlists API validator', function () { | |||
49 | await setDefaultVideoChannel([ server ]) | 48 | await setDefaultVideoChannel([ server ]) |
50 | 49 | ||
51 | userAccessToken = await server.usersCommand.generateUserAndToken('user1') | 50 | userAccessToken = await server.usersCommand.generateUserAndToken('user1') |
52 | videoId = (await uploadVideoAndGetId({ server, videoName: 'video 1' })).id | 51 | videoId = (await server.videosCommand.quickUpload({ name: 'video 1' })).id |
53 | 52 | ||
54 | command = server.playlistsCommand | 53 | command = server.playlistsCommand |
55 | 54 | ||
@@ -486,8 +485,8 @@ describe('Test video playlists API validator', function () { | |||
486 | } | 485 | } |
487 | 486 | ||
488 | before(async function () { | 487 | before(async function () { |
489 | videoId3 = (await uploadVideoAndGetId({ server, videoName: 'video 3' })).id | 488 | videoId3 = (await server.videosCommand.quickUpload({ name: 'video 3' })).id |
490 | videoId4 = (await uploadVideoAndGetId({ server, videoName: 'video 4' })).id | 489 | videoId4 = (await server.videosCommand.quickUpload({ name: 'video 4' })).id |
491 | 490 | ||
492 | for (const id of [ videoId3, videoId4 ]) { | 491 | for (const id of [ videoId3, videoId4 ]) { |
493 | await command.addElement({ playlistId: playlist.shortUUID, attributes: { videoId: id } }) | 492 | await command.addElement({ playlistId: playlist.shortUUID, attributes: { videoId: id } }) |