aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-06-02 20:50:42 +0200
committerRigel Kent <sendmemail@rigelk.eu>2020-06-10 21:12:05 +0200
commit5baee5fca418487e72ddcd6419d31bca8659b668 (patch)
tree6604cc16d42152f4929d888565d2d435e2480d47 /server/tests/api/videos
parentd840487fed32b4604b02030c0d7464afa925904f (diff)
downloadPeerTube-5baee5fca418487e72ddcd6419d31bca8659b668.tar.gz
PeerTube-5baee5fca418487e72ddcd6419d31bca8659b668.tar.zst
PeerTube-5baee5fca418487e72ddcd6419d31bca8659b668.zip
rename blacklist to block/blocklist, merge block and auto-block views
- also replace whitelist with allowlist - add advanced filters for video-block-list view - move icons in video-block-list and video-abuse-list to left side for visibility - add robot icon to depict automated nature of a block in video-block-list resolves #2790
Diffstat (limited to 'server/tests/api/videos')
-rw-r--r--server/tests/api/videos/video-blacklist.ts20
1 files changed, 10 insertions, 10 deletions
diff --git a/server/tests/api/videos/video-blacklist.ts b/server/tests/api/videos/video-blacklist.ts
index 67bc0114c..6e15893f3 100644
--- a/server/tests/api/videos/video-blacklist.ts
+++ b/server/tests/api/videos/video-blacklist.ts
@@ -25,7 +25,7 @@ import {
25} from '../../../../shared/extra-utils/index' 25} from '../../../../shared/extra-utils/index'
26import { doubleFollow } from '../../../../shared/extra-utils/server/follows' 26import { doubleFollow } from '../../../../shared/extra-utils/server/follows'
27import { waitJobs } from '../../../../shared/extra-utils/server/jobs' 27import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
28import { VideoBlacklist, VideoBlacklistType } from '../../../../shared/models/videos' 28import { VideoBlocklist, VideoBlockType } from '../../../../shared/models/videos'
29import { UserAdminFlag } from '../../../../shared/models/users/user-flag.model' 29import { UserAdminFlag } from '../../../../shared/models/users/user-flag.model'
30import { User, UserRole } from '../../../../shared/models/users' 30import { User, UserRole } from '../../../../shared/models/users'
31import { getMagnetURI, getYoutubeVideoUrl, importVideo } from '../../../../shared/extra-utils/videos/video-imports' 31import { getMagnetURI, getYoutubeVideoUrl, importVideo } from '../../../../shared/extra-utils/videos/video-imports'
@@ -127,7 +127,7 @@ describe('Test video blacklist', function () {
127 const res = await getBlacklistedVideosList({ 127 const res = await getBlacklistedVideosList({
128 url: servers[0].url, 128 url: servers[0].url,
129 token: servers[0].accessToken, 129 token: servers[0].accessToken,
130 type: VideoBlacklistType.MANUAL 130 type: VideoBlockType.MANUAL
131 }) 131 })
132 132
133 expect(res.body.total).to.equal(2) 133 expect(res.body.total).to.equal(2)
@@ -141,7 +141,7 @@ describe('Test video blacklist', function () {
141 const res = await getBlacklistedVideosList({ 141 const res = await getBlacklistedVideosList({
142 url: servers[0].url, 142 url: servers[0].url,
143 token: servers[0].accessToken, 143 token: servers[0].accessToken,
144 type: VideoBlacklistType.AUTO_BEFORE_PUBLISHED 144 type: VideoBlockType.AUTO_BEFORE_PUBLISHED
145 }) 145 })
146 146
147 expect(res.body.total).to.equal(0) 147 expect(res.body.total).to.equal(0)
@@ -219,7 +219,7 @@ describe('Test video blacklist', function () {
219 }) 219 })
220 220
221 describe('When removing a blacklisted video', function () { 221 describe('When removing a blacklisted video', function () {
222 let videoToRemove: VideoBlacklist 222 let videoToRemove: VideoBlocklist
223 let blacklist = [] 223 let blacklist = []
224 224
225 it('Should not have any video in videos list on server 1', async function () { 225 it('Should not have any video in videos list on server 1', async function () {
@@ -328,7 +328,7 @@ describe('Test video blacklist', function () {
328 it('Should have the correct video blacklist unfederate attribute', async function () { 328 it('Should have the correct video blacklist unfederate attribute', async function () {
329 const res = await getBlacklistedVideosList({ url: servers[0].url, token: servers[0].accessToken, sort: 'createdAt' }) 329 const res = await getBlacklistedVideosList({ url: servers[0].url, token: servers[0].accessToken, sort: 'createdAt' })
330 330
331 const blacklistedVideos: VideoBlacklist[] = res.body.data 331 const blacklistedVideos: VideoBlocklist[] = res.body.data
332 const video3Blacklisted = blacklistedVideos.find(b => b.video.uuid === video3UUID) 332 const video3Blacklisted = blacklistedVideos.find(b => b.video.uuid === video3UUID)
333 const video4Blacklisted = blacklistedVideos.find(b => b.video.uuid === video4UUID) 333 const video4Blacklisted = blacklistedVideos.find(b => b.video.uuid === video4UUID)
334 334
@@ -396,7 +396,7 @@ describe('Test video blacklist', function () {
396 url: servers[0].url, 396 url: servers[0].url,
397 accessToken: servers[0].accessToken, 397 accessToken: servers[0].accessToken,
398 username: user.username, 398 username: user.username,
399 adminFlags: UserAdminFlag.BY_PASS_VIDEO_AUTO_BLACKLIST, 399 adminFlags: UserAdminFlag.BYPASS_VIDEO_AUTO_BLOCK,
400 password: user.password, 400 password: user.password,
401 role: UserRole.USER 401 role: UserRole.USER
402 }) 402 })
@@ -413,7 +413,7 @@ describe('Test video blacklist', function () {
413 const res = await getBlacklistedVideosList({ 413 const res = await getBlacklistedVideosList({
414 url: servers[0].url, 414 url: servers[0].url,
415 token: servers[0].accessToken, 415 token: servers[0].accessToken,
416 type: VideoBlacklistType.AUTO_BEFORE_PUBLISHED 416 type: VideoBlockType.AUTO_BEFORE_PUBLISHED
417 }) 417 })
418 418
419 expect(res.body.total).to.equal(1) 419 expect(res.body.total).to.equal(1)
@@ -434,7 +434,7 @@ describe('Test video blacklist', function () {
434 url: servers[0].url, 434 url: servers[0].url,
435 token: servers[0].accessToken, 435 token: servers[0].accessToken,
436 sort: 'createdAt', 436 sort: 'createdAt',
437 type: VideoBlacklistType.AUTO_BEFORE_PUBLISHED 437 type: VideoBlockType.AUTO_BEFORE_PUBLISHED
438 }) 438 })
439 439
440 expect(res.body.total).to.equal(2) 440 expect(res.body.total).to.equal(2)
@@ -453,7 +453,7 @@ describe('Test video blacklist', function () {
453 url: servers[0].url, 453 url: servers[0].url,
454 token: servers[0].accessToken, 454 token: servers[0].accessToken,
455 sort: 'createdAt', 455 sort: 'createdAt',
456 type: VideoBlacklistType.AUTO_BEFORE_PUBLISHED 456 type: VideoBlockType.AUTO_BEFORE_PUBLISHED
457 }) 457 })
458 458
459 expect(res.body.total).to.equal(3) 459 expect(res.body.total).to.equal(3)
@@ -466,7 +466,7 @@ describe('Test video blacklist', function () {
466 const res = await getBlacklistedVideosList({ 466 const res = await getBlacklistedVideosList({
467 url: servers[0].url, 467 url: servers[0].url,
468 token: servers[0].accessToken, 468 token: servers[0].accessToken,
469 type: VideoBlacklistType.AUTO_BEFORE_PUBLISHED 469 type: VideoBlockType.AUTO_BEFORE_PUBLISHED
470 }) 470 })
471 471
472 expect(res.body.total).to.equal(3) 472 expect(res.body.total).to.equal(3)