diff options
author | Chocobozzz <me@florianbigard.com> | 2023-01-19 15:04:10 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-01-19 15:04:10 +0100 |
commit | a68ccaead667f1b976e0fb10c8b1087af25547f2 (patch) | |
tree | b23ef1915c1b8bdb6b88c10d0dee5749fa874133 /server/tests | |
parent | 789ba349318e7ff012590491e76087a1204cccd4 (diff) | |
download | PeerTube-a68ccaead667f1b976e0fb10c8b1087af25547f2.tar.gz PeerTube-a68ccaead667f1b976e0fb10c8b1087af25547f2.tar.zst PeerTube-a68ccaead667f1b976e0fb10c8b1087af25547f2.zip |
(breaking): Always list nsfw videos in playlists
Keep the same behaviour as unlisted videos
The frontend is in charge to blur the video element if the nsfw setting
is "hide" or "blur"
Diffstat (limited to 'server/tests')
-rw-r--r-- | server/tests/api/videos/video-playlists.ts | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/server/tests/api/videos/video-playlists.ts b/server/tests/api/videos/video-playlists.ts index 6a18cf26a..e8e653382 100644 --- a/server/tests/api/videos/video-playlists.ts +++ b/server/tests/api/videos/video-playlists.ts | |||
@@ -3,6 +3,7 @@ | |||
3 | import { expect } from 'chai' | 3 | import { expect } from 'chai' |
4 | import { checkPlaylistFilesWereRemoved, testImage } from '@server/tests/shared' | 4 | import { checkPlaylistFilesWereRemoved, testImage } from '@server/tests/shared' |
5 | import { wait } from '@shared/core-utils' | 5 | import { wait } from '@shared/core-utils' |
6 | import { uuidToShort } from '@shared/extra-utils' | ||
6 | import { | 7 | import { |
7 | HttpStatusCode, | 8 | HttpStatusCode, |
8 | VideoPlaylist, | 9 | VideoPlaylist, |
@@ -23,7 +24,6 @@ import { | |||
23 | setDefaultVideoChannel, | 24 | setDefaultVideoChannel, |
24 | waitJobs | 25 | waitJobs |
25 | } from '@shared/server-commands' | 26 | } from '@shared/server-commands' |
26 | import { uuidToShort } from '@shared/extra-utils' | ||
27 | 27 | ||
28 | async function checkPlaylistElementType ( | 28 | async function checkPlaylistElementType ( |
29 | servers: PeerTubeServer[], | 29 | servers: PeerTubeServer[], |
@@ -752,19 +752,6 @@ describe('Test video playlists', function () { | |||
752 | await checkPlaylistElementType(group2, playlistServer1UUID2, VideoPlaylistElementType.REGULAR, position, name, 3) | 752 | await checkPlaylistElementType(group2, playlistServer1UUID2, VideoPlaylistElementType.REGULAR, position, name, 3) |
753 | } | 753 | } |
754 | }) | 754 | }) |
755 | |||
756 | it('Should hide the video if it is NSFW', async function () { | ||
757 | const body = await commands[0].listVideos({ token: userTokenServer1, playlistId: playlistServer1UUID2, query: { nsfw: 'false' } }) | ||
758 | expect(body.total).to.equal(3) | ||
759 | |||
760 | const elements = body.data | ||
761 | const element = elements.find(e => e.position === 3) | ||
762 | |||
763 | expect(element).to.exist | ||
764 | expect(element.video).to.be.null | ||
765 | expect(element.type).to.equal(VideoPlaylistElementType.UNAVAILABLE) | ||
766 | }) | ||
767 | |||
768 | }) | 755 | }) |
769 | 756 | ||
770 | describe('Managing playlist elements', function () { | 757 | describe('Managing playlist elements', function () { |