aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/notifications
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-12-29 10:14:43 +0100
committerChocobozzz <me@florianbigard.com>2022-12-29 10:14:43 +0100
commit4fe7cde283b9b88a2917824e34e23356849b33b8 (patch)
tree2d22401d48bba04247bd99c791f1eee04e485d8b /server/tests/api/notifications
parentd97d36b486847689f6089a6877afc70ba4123e80 (diff)
downloadPeerTube-4fe7cde283b9b88a2917824e34e23356849b33b8.tar.gz
PeerTube-4fe7cde283b9b88a2917824e34e23356849b33b8.tar.zst
PeerTube-4fe7cde283b9b88a2917824e34e23356849b33b8.zip
Fix build
Diffstat (limited to 'server/tests/api/notifications')
-rw-r--r--server/tests/api/notifications/moderation-notifications.ts18
1 files changed, 13 insertions, 5 deletions
diff --git a/server/tests/api/notifications/moderation-notifications.ts b/server/tests/api/notifications/moderation-notifications.ts
index df239f92e..c7b9b5fb0 100644
--- a/server/tests/api/notifications/moderation-notifications.ts
+++ b/server/tests/api/notifications/moderation-notifications.ts
@@ -500,7 +500,7 @@ describe('Test moderation notifications', function () {
500 }) 500 })
501 501
502 it('Should send notification to moderators on new video with auto-blacklist', async function () { 502 it('Should send notification to moderators on new video with auto-blacklist', async function () {
503 this.timeout(50000) 503 this.timeout(120000)
504 504
505 videoName = 'video with auto-blacklist ' + buildUUID() 505 videoName = 'video with auto-blacklist ' + buildUUID()
506 const video = await servers[0].videos.upload({ token: userToken1, attributes: { name: videoName } }) 506 const video = await servers[0].videos.upload({ token: userToken1, attributes: { name: videoName } })
@@ -512,10 +512,14 @@ describe('Test moderation notifications', function () {
512 }) 512 })
513 513
514 it('Should not send video publish notification if auto-blacklisted', async function () { 514 it('Should not send video publish notification if auto-blacklisted', async function () {
515 this.timeout(120000)
516
515 await checkVideoIsPublished({ ...userBaseParams, videoName, shortUUID, checkType: 'absence' }) 517 await checkVideoIsPublished({ ...userBaseParams, videoName, shortUUID, checkType: 'absence' })
516 }) 518 })
517 519
518 it('Should not send a local user subscription notification if auto-blacklisted', async function () { 520 it('Should not send a local user subscription notification if auto-blacklisted', async function () {
521 this.timeout(120000)
522
519 await checkNewVideoFromSubscription({ ...adminBaseParamsServer1, videoName, shortUUID, checkType: 'absence' }) 523 await checkNewVideoFromSubscription({ ...adminBaseParamsServer1, videoName, shortUUID, checkType: 'absence' })
520 }) 524 })
521 525
@@ -524,7 +528,7 @@ describe('Test moderation notifications', function () {
524 }) 528 })
525 529
526 it('Should send video published and unblacklist after video unblacklisted', async function () { 530 it('Should send video published and unblacklist after video unblacklisted', async function () {
527 this.timeout(40000) 531 this.timeout(120000)
528 532
529 await servers[0].blacklist.remove({ videoId: uuid }) 533 await servers[0].blacklist.remove({ videoId: uuid })
530 534
@@ -537,15 +541,19 @@ describe('Test moderation notifications', function () {
537 }) 541 })
538 542
539 it('Should send a local user subscription notification after removed from blacklist', async function () { 543 it('Should send a local user subscription notification after removed from blacklist', async function () {
544 this.timeout(120000)
545
540 await checkNewVideoFromSubscription({ ...adminBaseParamsServer1, videoName, shortUUID, checkType: 'presence' }) 546 await checkNewVideoFromSubscription({ ...adminBaseParamsServer1, videoName, shortUUID, checkType: 'presence' })
541 }) 547 })
542 548
543 it('Should send a remote user subscription notification after removed from blacklist', async function () { 549 it('Should send a remote user subscription notification after removed from blacklist', async function () {
550 this.timeout(120000)
551
544 await checkNewVideoFromSubscription({ ...adminBaseParamsServer2, videoName, shortUUID, checkType: 'presence' }) 552 await checkNewVideoFromSubscription({ ...adminBaseParamsServer2, videoName, shortUUID, checkType: 'presence' })
545 }) 553 })
546 554
547 it('Should send unblacklist but not published/subscription notes after unblacklisted if scheduled update pending', async function () { 555 it('Should send unblacklist but not published/subscription notes after unblacklisted if scheduled update pending', async function () {
548 this.timeout(50000) 556 this.timeout(120000)
549 557
550 const updateAt = new Date(new Date().getTime() + 1000000) 558 const updateAt = new Date(new Date().getTime() + 1000000)
551 559
@@ -576,7 +584,7 @@ describe('Test moderation notifications', function () {
576 }) 584 })
577 585
578 it('Should not send publish/subscription notifications after scheduled update if video still auto-blacklisted', async function () { 586 it('Should not send publish/subscription notifications after scheduled update if video still auto-blacklisted', async function () {
579 this.timeout(40000) 587 this.timeout(120000)
580 588
581 // In 2 seconds 589 // In 2 seconds
582 const updateAt = new Date(new Date().getTime() + 2000) 590 const updateAt = new Date(new Date().getTime() + 2000)
@@ -601,7 +609,7 @@ describe('Test moderation notifications', function () {
601 }) 609 })
602 610
603 it('Should not send a notification to moderators on new video without auto-blacklist', async function () { 611 it('Should not send a notification to moderators on new video without auto-blacklist', async function () {
604 this.timeout(50000) 612 this.timeout(120000)
605 613
606 const name = 'video without auto-blacklist ' + buildUUID() 614 const name = 'video without auto-blacklist ' + buildUUID()
607 615