From e6346d59e63135cf012ed18c102d3b0179ef565f Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 8 Jul 2021 15:54:39 +0200 Subject: Introduce playlist command --- server/tests/client.ts | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'server/tests/client.ts') diff --git a/server/tests/client.ts b/server/tests/client.ts index 60df878d7..129f1e1c0 100644 --- a/server/tests/client.ts +++ b/server/tests/client.ts @@ -6,9 +6,7 @@ import { omit } from 'lodash' import { HttpStatusCode } from '@shared/core-utils/miscs/http-error-codes' import { Account, HTMLServerConfig, ServerConfig, VideoPlaylistCreateResult, VideoPlaylistPrivacy } from '@shared/models' import { - addVideoInPlaylist, cleanupTests, - createVideoPlaylist, doubleFollow, flushAndRunMultipleServers, getVideosList, @@ -82,23 +80,17 @@ describe('Test a client controllers', function () { // Playlist - const playlistAttrs = { + const attributes = { displayName: playlistName, description: playlistDescription, privacy: VideoPlaylistPrivacy.PUBLIC, videoChannelId: servers[0].videoChannel.id } - const resVideoPlaylistRequest = await createVideoPlaylist({ url: servers[0].url, token: servers[0].accessToken, playlistAttrs }) - playlist = resVideoPlaylistRequest.body.videoPlaylist + playlist = await servers[0].playlistsCommand.create({ attributes }) playlistIds = [ playlist.id, playlist.shortUUID, playlist.uuid ] - await addVideoInPlaylist({ - url: servers[0].url, - token: servers[0].accessToken, - playlistId: playlist.shortUUID, - elementAttrs: { videoId: video.id } - }) + await servers[0].playlistsCommand.addElement({ playlistId: playlist.shortUUID, attributes: { videoId: video.id } }) // Account -- cgit v1.2.3