aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos/single-server.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-02-23 16:39:51 +0100
committerChocobozzz <me@florianbigard.com>2018-02-23 16:44:37 +0100
commitb5c0e95544cec5a33cee3df41c1607d2a0cd5403 (patch)
tree38a5db1faed107f7b75583c32125152812594821 /server/tests/api/videos/single-server.ts
parente3bb78a2134a5e5755b6dbd8987894572ca31269 (diff)
downloadPeerTube-b5c0e95544cec5a33cee3df41c1607d2a0cd5403.tar.gz
PeerTube-b5c0e95544cec5a33cee3df41c1607d2a0cd5403.tar.zst
PeerTube-b5c0e95544cec5a33cee3df41c1607d2a0cd5403.zip
Avoids easy cheating on vidoe views
Diffstat (limited to 'server/tests/api/videos/single-server.ts')
-rw-r--r--server/tests/api/videos/single-server.ts20
1 files changed, 15 insertions, 5 deletions
diff --git a/server/tests/api/videos/single-server.ts b/server/tests/api/videos/single-server.ts
index 83b6a0e9a..cf2721838 100644
--- a/server/tests/api/videos/single-server.ts
+++ b/server/tests/api/videos/single-server.ts
@@ -8,7 +8,7 @@ import {
8 checkVideoFilesWereRemoved, completeVideoCheck, flushTests, getVideo, getVideoCategories, getVideoLanguages, getVideoLicences, 8 checkVideoFilesWereRemoved, completeVideoCheck, flushTests, getVideo, getVideoCategories, getVideoLanguages, getVideoLicences,
9 getVideoPrivacies, getVideosList, getVideosListPagination, getVideosListSort, killallServers, rateVideo, removeVideo, runServer, 9 getVideoPrivacies, getVideosList, getVideosListPagination, getVideosListSort, killallServers, rateVideo, removeVideo, runServer,
10 searchVideo, searchVideoWithPagination, searchVideoWithSort, ServerInfo, setAccessTokensToServers, testImage, updateVideo, uploadVideo, 10 searchVideo, searchVideoWithPagination, searchVideoWithSort, ServerInfo, setAccessTokensToServers, testImage, updateVideo, uploadVideo,
11 viewVideo 11 viewVideo, wait
12} from '../../utils' 12} from '../../utils'
13 13
14const expect = chai.expect 14const expect = chai.expect
@@ -149,8 +149,7 @@ describe('Test a single server', function () {
149 }) 149 })
150 150
151 it('Should get and seed the uploaded video', async function () { 151 it('Should get and seed the uploaded video', async function () {
152 // Yes, this could be long 152 this.timeout(5000)
153 this.timeout(60000)
154 153
155 const res = await getVideosList(server.url) 154 const res = await getVideosList(server.url)
156 155
@@ -163,8 +162,7 @@ describe('Test a single server', function () {
163 }) 162 })
164 163
165 it('Should get the video by UUID', async function () { 164 it('Should get the video by UUID', async function () {
166 // Yes, this could be long 165 this.timeout(5000)
167 this.timeout(60000)
168 166
169 const res = await getVideo(server.url, videoUUID) 167 const res = await getVideo(server.url, videoUUID)
170 168
@@ -173,10 +171,22 @@ describe('Test a single server', function () {
173 }) 171 })
174 172
175 it('Should have the views updated', async function () { 173 it('Should have the views updated', async function () {
174 this.timeout(10000)
175
176 await viewVideo(server.url, videoId) 176 await viewVideo(server.url, videoId)
177 await viewVideo(server.url, videoId) 177 await viewVideo(server.url, videoId)
178 await viewVideo(server.url, videoId) 178 await viewVideo(server.url, videoId)
179 179
180 await wait(1500)
181
182 await viewVideo(server.url, videoId)
183 await viewVideo(server.url, videoId)
184
185 await wait(1500)
186
187 await viewVideo(server.url, videoId)
188 await viewVideo(server.url, videoId)
189
180 const res = await getVideo(server.url, videoId) 190 const res = await getVideo(server.url, videoId)
181 191
182 const video = res.body 192 const video = res.body