aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/notifications/user-notifications.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-16 10:19:16 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:18 +0200
commit59bbcced37005dd511daca9bd58ae2998cb931b1 (patch)
tree60d1ba7a8b2eac691f27c25cb5e2d0ae3a510c9d /server/tests/api/notifications/user-notifications.ts
parent254d3579f5338f5fd775c17d15cdfc37078bcfb4 (diff)
downloadPeerTube-59bbcced37005dd511daca9bd58ae2998cb931b1.tar.gz
PeerTube-59bbcced37005dd511daca9bd58ae2998cb931b1.tar.zst
PeerTube-59bbcced37005dd511daca9bd58ae2998cb931b1.zip
Centralize test URLs
Diffstat (limited to 'server/tests/api/notifications/user-notifications.ts')
-rw-r--r--server/tests/api/notifications/user-notifications.ts16
1 files changed, 8 insertions, 8 deletions
diff --git a/server/tests/api/notifications/user-notifications.ts b/server/tests/api/notifications/user-notifications.ts
index b7c22d118..ca592d466 100644
--- a/server/tests/api/notifications/user-notifications.ts
+++ b/server/tests/api/notifications/user-notifications.ts
@@ -10,10 +10,10 @@ import {
10 checkNewVideoFromSubscription, 10 checkNewVideoFromSubscription,
11 checkVideoIsPublished, 11 checkVideoIsPublished,
12 cleanupTests, 12 cleanupTests,
13 ImportsCommand, 13 FIXTURE_URLS,
14 MockSmtpServer, 14 MockSmtpServer,
15 prepareNotificationsTest,
16 PeerTubeServer, 15 PeerTubeServer,
16 prepareNotificationsTest,
17 uploadRandomVideoOnServers, 17 uploadRandomVideoOnServers,
18 wait, 18 wait,
19 waitJobs 19 waitJobs
@@ -205,7 +205,7 @@ describe('Test user notifications', function () {
205 name, 205 name,
206 channelId, 206 channelId,
207 privacy: VideoPrivacy.PUBLIC, 207 privacy: VideoPrivacy.PUBLIC,
208 targetUrl: ImportsCommand.getGoodVideoUrl() 208 targetUrl: FIXTURE_URLS.goodVideo
209 } 209 }
210 const { video } = await servers[0].imports.importVideo({ attributes }) 210 const { video } = await servers[0].imports.importVideo({ attributes })
211 211
@@ -275,7 +275,7 @@ describe('Test user notifications', function () {
275 name, 275 name,
276 channelId, 276 channelId,
277 privacy: VideoPrivacy.PUBLIC, 277 privacy: VideoPrivacy.PUBLIC,
278 targetUrl: ImportsCommand.getGoodVideoUrl(), 278 targetUrl: FIXTURE_URLS.goodVideo,
279 waitTranscoding: true 279 waitTranscoding: true
280 } 280 }
281 const { video } = await servers[1].imports.importVideo({ attributes }) 281 const { video } = await servers[1].imports.importVideo({ attributes })
@@ -343,12 +343,12 @@ describe('Test user notifications', function () {
343 name, 343 name,
344 channelId, 344 channelId,
345 privacy: VideoPrivacy.PRIVATE, 345 privacy: VideoPrivacy.PRIVATE,
346 targetUrl: ImportsCommand.getBadVideoUrl() 346 targetUrl: FIXTURE_URLS.badVideo
347 } 347 }
348 const { video } = await servers[0].imports.importVideo({ attributes }) 348 const { video } = await servers[0].imports.importVideo({ attributes })
349 349
350 await waitJobs(servers) 350 await waitJobs(servers)
351 await checkMyVideoImportIsFinished(baseParams, name, video.uuid, ImportsCommand.getBadVideoUrl(), false, 'presence') 351 await checkMyVideoImportIsFinished(baseParams, name, video.uuid, FIXTURE_URLS.badVideo, false, 'presence')
352 }) 352 })
353 353
354 it('Should send a notification when the video import succeeded', async function () { 354 it('Should send a notification when the video import succeeded', async function () {
@@ -360,12 +360,12 @@ describe('Test user notifications', function () {
360 name, 360 name,
361 channelId, 361 channelId,
362 privacy: VideoPrivacy.PRIVATE, 362 privacy: VideoPrivacy.PRIVATE,
363 targetUrl: ImportsCommand.getGoodVideoUrl() 363 targetUrl: FIXTURE_URLS.goodVideo
364 } 364 }
365 const { video } = await servers[0].imports.importVideo({ attributes }) 365 const { video } = await servers[0].imports.importVideo({ attributes })
366 366
367 await waitJobs(servers) 367 await waitJobs(servers)
368 await checkMyVideoImportIsFinished(baseParams, name, video.uuid, ImportsCommand.getGoodVideoUrl(), true, 'presence') 368 await checkMyVideoImportIsFinished(baseParams, name, video.uuid, FIXTURE_URLS.goodVideo, true, 'presence')
369 }) 369 })
370 }) 370 })
371 371