mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 19:42:24 +02:00
Introduce blacklist command
This commit is contained in:
parent
a1637fa1e2
commit
e3d15a6a9a
13 changed files with 173 additions and 226 deletions
|
@ -4,7 +4,6 @@ import 'mocha'
|
|||
import { buildUUID } from '@server/helpers/uuid'
|
||||
import {
|
||||
addVideoCommentThread,
|
||||
addVideoToBlacklist,
|
||||
checkAbuseStateChange,
|
||||
checkAutoInstanceFollowing,
|
||||
CheckerBaseParams,
|
||||
|
@ -28,7 +27,6 @@ import {
|
|||
MockSmtpServer,
|
||||
prepareNotificationsTest,
|
||||
registerUser,
|
||||
removeVideoFromBlacklist,
|
||||
ServerInfo,
|
||||
uploadVideo,
|
||||
wait,
|
||||
|
@ -297,7 +295,7 @@ describe('Test moderation notifications', function () {
|
|||
const resVideo = await uploadVideo(servers[0].url, userAccessToken, { name })
|
||||
const uuid = resVideo.body.video.uuid
|
||||
|
||||
await addVideoToBlacklist(servers[0].url, servers[0].accessToken, uuid)
|
||||
await servers[0].blacklistCommand.add({ videoId: uuid })
|
||||
|
||||
await waitJobs(servers)
|
||||
await checkNewBlacklistOnMyVideo(baseParams, uuid, name, 'blacklist')
|
||||
|
@ -310,10 +308,10 @@ describe('Test moderation notifications', function () {
|
|||
const resVideo = await uploadVideo(servers[0].url, userAccessToken, { name })
|
||||
const uuid = resVideo.body.video.uuid
|
||||
|
||||
await addVideoToBlacklist(servers[0].url, servers[0].accessToken, uuid)
|
||||
await servers[0].blacklistCommand.add({ videoId: uuid })
|
||||
|
||||
await waitJobs(servers)
|
||||
await removeVideoFromBlacklist(servers[0].url, servers[0].accessToken, uuid)
|
||||
await servers[0].blacklistCommand.remove({ videoId: uuid })
|
||||
await waitJobs(servers)
|
||||
|
||||
await wait(500)
|
||||
|
@ -517,7 +515,7 @@ describe('Test moderation notifications', function () {
|
|||
it('Should send video published and unblacklist after video unblacklisted', async function () {
|
||||
this.timeout(40000)
|
||||
|
||||
await removeVideoFromBlacklist(servers[0].url, servers[0].accessToken, videoUUID)
|
||||
await servers[0].blacklistCommand.remove({ videoId: videoUUID })
|
||||
|
||||
await waitJobs(servers)
|
||||
|
||||
|
@ -554,7 +552,7 @@ describe('Test moderation notifications', function () {
|
|||
const resVideo = await uploadVideo(servers[0].url, userAccessToken, data)
|
||||
const uuid = resVideo.body.video.uuid
|
||||
|
||||
await removeVideoFromBlacklist(servers[0].url, servers[0].accessToken, uuid)
|
||||
await servers[0].blacklistCommand.remove({ videoId: uuid })
|
||||
|
||||
await waitJobs(servers)
|
||||
await checkNewBlacklistOnMyVideo(userBaseParams, uuid, name, 'unblacklist')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue