aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/plugins/filter-hooks.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/plugins/filter-hooks.ts')
-rw-r--r--server/tests/plugins/filter-hooks.ts24
1 files changed, 23 insertions, 1 deletions
diff --git a/server/tests/plugins/filter-hooks.ts b/server/tests/plugins/filter-hooks.ts
index a947283c2..644b41dea 100644
--- a/server/tests/plugins/filter-hooks.ts
+++ b/server/tests/plugins/filter-hooks.ts
@@ -8,6 +8,7 @@ import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-code
8import { 8import {
9 addVideoCommentReply, 9 addVideoCommentReply,
10 addVideoCommentThread, 10 addVideoCommentThread,
11 advancedVideoPlaylistSearch,
11 advancedVideosSearch, 12 advancedVideosSearch,
12 createLive, 13 createLive,
13 createVideoPlaylist, 14 createVideoPlaylist,
@@ -71,7 +72,7 @@ describe('Test plugin filter hooks', function () {
71 await installPlugin({ 72 await installPlugin({
72 url: servers[0].url, 73 url: servers[0].url,
73 accessToken: servers[0].accessToken, 74 accessToken: servers[0].accessToken,
74 path: getPluginTestPath('-two') 75 path: getPluginTestPath('-filter-translations')
75 }) 76 })
76 77
77 for (let i = 0; i < 10; i++) { 78 for (let i = 0; i < 10; i++) {
@@ -525,6 +526,27 @@ describe('Test plugin filter hooks', function () {
525 await waitUntilLog(servers[0], 'Run hook filter:api.search.video-channels.index.list.params', 1) 526 await waitUntilLog(servers[0], 'Run hook filter:api.search.video-channels.index.list.params', 1)
526 await waitUntilLog(servers[0], 'Run hook filter:api.search.video-channels.index.list.result', 1) 527 await waitUntilLog(servers[0], 'Run hook filter:api.search.video-channels.index.list.result', 1)
527 }) 528 })
529
530 it('Should run filter:api.search.video-playlists.local.list.{params,result}', async function () {
531 await advancedVideoPlaylistSearch(servers[0].url, {
532 search: 'Sun Jian'
533 })
534
535 await waitUntilLog(servers[0], 'Run hook filter:api.search.video-playlists.local.list.params', 1)
536 await waitUntilLog(servers[0], 'Run hook filter:api.search.video-playlists.local.list.result', 1)
537 })
538
539 it('Should run filter:api.search.video-playlists.index.list.{params,result}', async function () {
540 await advancedVideoPlaylistSearch(servers[0].url, {
541 search: 'Sun Jian',
542 searchTarget: 'search-index'
543 })
544
545 await waitUntilLog(servers[0], 'Run hook filter:api.search.video-playlists.local.list.params', 1)
546 await waitUntilLog(servers[0], 'Run hook filter:api.search.video-playlists.local.list.result', 1)
547 await waitUntilLog(servers[0], 'Run hook filter:api.search.video-playlists.index.list.params', 1)
548 await waitUntilLog(servers[0], 'Run hook filter:api.search.video-playlists.index.list.result', 1)
549 })
528 }) 550 })
529 551
530 after(async function () { 552 after(async function () {