aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos/videos-overview.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-15 10:02:54 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:18 +0200
commitd23dd9fbfc4d26026352c10f81d2795ceaf2908a (patch)
treeda82286d423c5e834a1ee2dcd5970076b8263cf1 /server/tests/api/videos/videos-overview.ts
parent7926c5f9b3ffcabb1ffb0dcfa5e48b8e0b88fbc0 (diff)
downloadPeerTube-d23dd9fbfc4d26026352c10f81d2795ceaf2908a.tar.gz
PeerTube-d23dd9fbfc4d26026352c10f81d2795ceaf2908a.tar.zst
PeerTube-d23dd9fbfc4d26026352c10f81d2795ceaf2908a.zip
Introduce videos command
Diffstat (limited to 'server/tests/api/videos/videos-overview.ts')
-rw-r--r--server/tests/api/videos/videos-overview.ts22
1 files changed, 13 insertions, 9 deletions
diff --git a/server/tests/api/videos/videos-overview.ts b/server/tests/api/videos/videos-overview.ts
index a2da2eaef..969393842 100644
--- a/server/tests/api/videos/videos-overview.ts
+++ b/server/tests/api/videos/videos-overview.ts
@@ -2,7 +2,7 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { cleanupTests, flushAndRunServer, ServerInfo, setAccessTokensToServers, uploadVideo, wait } from '@shared/extra-utils' 5import { cleanupTests, flushAndRunServer, ServerInfo, setAccessTokensToServers, wait } from '@shared/extra-utils'
6import { VideosOverview } from '@shared/models' 6import { VideosOverview } from '@shared/models'
7 7
8const expect = chai.expect 8const expect = chai.expect
@@ -35,10 +35,12 @@ describe('Test a videos overview', function () {
35 35
36 await wait(3000) 36 await wait(3000)
37 37
38 await uploadVideo(server.url, server.accessToken, { 38 await server.videosCommand.upload({
39 name: 'video 0', 39 attributes: {
40 category: 3, 40 name: 'video 0',
41 tags: [ 'coucou1', 'coucou2' ] 41 category: 3,
42 tags: [ 'coucou1', 'coucou2' ]
43 }
42 }) 44 })
43 45
44 const body = await server.overviewsCommand.getVideos({ page: 1 }) 46 const body = await server.overviewsCommand.getVideos({ page: 1 })
@@ -51,10 +53,12 @@ describe('Test a videos overview', function () {
51 53
52 { 54 {
53 for (let i = 1; i < 6; i++) { 55 for (let i = 1; i < 6; i++) {
54 await uploadVideo(server.url, server.accessToken, { 56 await server.videosCommand.upload({
55 name: 'video ' + i, 57 attributes: {
56 category: 3, 58 name: 'video ' + i,
57 tags: [ 'coucou1', 'coucou2' ] 59 category: 3,
60 tags: [ 'coucou1', 'coucou2' ]
61 }
58 }) 62 })
59 } 63 }
60 64