aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos/videos-overview.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-16 09:04:35 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:18 +0200
commit89d241a79c262b9775c233b73cff080043ebb5e6 (patch)
treecb3b6cb431d25d891ef4e02f66c61d252d17048f /server/tests/api/videos/videos-overview.ts
parentd23dd9fbfc4d26026352c10f81d2795ceaf2908a (diff)
downloadPeerTube-89d241a79c262b9775c233b73cff080043ebb5e6.tar.gz
PeerTube-89d241a79c262b9775c233b73cff080043ebb5e6.tar.zst
PeerTube-89d241a79c262b9775c233b73cff080043ebb5e6.zip
Shorter server command names
Diffstat (limited to 'server/tests/api/videos/videos-overview.ts')
-rw-r--r--server/tests/api/videos/videos-overview.ts24
1 files changed, 12 insertions, 12 deletions
diff --git a/server/tests/api/videos/videos-overview.ts b/server/tests/api/videos/videos-overview.ts
index 969393842..f0657b334 100644
--- a/server/tests/api/videos/videos-overview.ts
+++ b/server/tests/api/videos/videos-overview.ts
@@ -25,7 +25,7 @@ describe('Test a videos overview', function () {
25 }) 25 })
26 26
27 it('Should send empty overview', async function () { 27 it('Should send empty overview', async function () {
28 const body = await server.overviewsCommand.getVideos({ page: 1 }) 28 const body = await server.overviews.getVideos({ page: 1 })
29 29
30 testOverviewCount(body, 0) 30 testOverviewCount(body, 0)
31 }) 31 })
@@ -35,7 +35,7 @@ describe('Test a videos overview', function () {
35 35
36 await wait(3000) 36 await wait(3000)
37 37
38 await server.videosCommand.upload({ 38 await server.videos.upload({
39 attributes: { 39 attributes: {
40 name: 'video 0', 40 name: 'video 0',
41 category: 3, 41 category: 3,
@@ -43,7 +43,7 @@ describe('Test a videos overview', function () {
43 } 43 }
44 }) 44 })
45 45
46 const body = await server.overviewsCommand.getVideos({ page: 1 }) 46 const body = await server.overviews.getVideos({ page: 1 })
47 47
48 testOverviewCount(body, 0) 48 testOverviewCount(body, 0)
49 }) 49 })
@@ -53,7 +53,7 @@ describe('Test a videos overview', function () {
53 53
54 { 54 {
55 for (let i = 1; i < 6; i++) { 55 for (let i = 1; i < 6; i++) {
56 await server.videosCommand.upload({ 56 await server.videos.upload({
57 attributes: { 57 attributes: {
58 name: 'video ' + i, 58 name: 'video ' + i,
59 category: 3, 59 category: 3,
@@ -66,13 +66,13 @@ describe('Test a videos overview', function () {
66 } 66 }
67 67
68 { 68 {
69 const body = await server.overviewsCommand.getVideos({ page: 1 }) 69 const body = await server.overviews.getVideos({ page: 1 })
70 70
71 testOverviewCount(body, 1) 71 testOverviewCount(body, 1)
72 } 72 }
73 73
74 { 74 {
75 const overview = await server.overviewsCommand.getVideos({ page: 2 }) 75 const overview = await server.overviews.getVideos({ page: 2 })
76 76
77 expect(overview.tags).to.have.lengthOf(1) 77 expect(overview.tags).to.have.lengthOf(1)
78 expect(overview.categories).to.have.lengthOf(0) 78 expect(overview.categories).to.have.lengthOf(0)
@@ -81,8 +81,8 @@ describe('Test a videos overview', function () {
81 }) 81 })
82 82
83 it('Should have the correct overview', async function () { 83 it('Should have the correct overview', async function () {
84 const overview1 = await server.overviewsCommand.getVideos({ page: 1 }) 84 const overview1 = await server.overviews.getVideos({ page: 1 })
85 const overview2 = await server.overviewsCommand.getVideos({ page: 2 }) 85 const overview2 = await server.overviews.getVideos({ page: 2 })
86 86
87 for (const arr of [ overview1.tags, overview1.categories, overview1.channels, overview2.tags ]) { 87 for (const arr of [ overview1.tags, overview1.categories, overview1.channels, overview2.tags ]) {
88 expect(arr).to.have.lengthOf(1) 88 expect(arr).to.have.lengthOf(1)
@@ -108,18 +108,18 @@ describe('Test a videos overview', function () {
108 }) 108 })
109 109
110 it('Should hide muted accounts', async function () { 110 it('Should hide muted accounts', async function () {
111 const token = await server.usersCommand.generateUserAndToken('choco') 111 const token = await server.users.generateUserAndToken('choco')
112 112
113 await server.blocklistCommand.addToMyBlocklist({ token, account: 'root@' + server.host }) 113 await server.blocklist.addToMyBlocklist({ token, account: 'root@' + server.host })
114 114
115 { 115 {
116 const body = await server.overviewsCommand.getVideos({ page: 1 }) 116 const body = await server.overviews.getVideos({ page: 1 })
117 117
118 testOverviewCount(body, 1) 118 testOverviewCount(body, 1)
119 } 119 }
120 120
121 { 121 {
122 const body = await server.overviewsCommand.getVideos({ page: 1, token }) 122 const body = await server.overviews.getVideos({ page: 1, token })
123 123
124 testOverviewCount(body, 0) 124 testOverviewCount(body, 0)
125 } 125 }