diff options
Diffstat (limited to 'server/tests/api/videos/multiple-servers.ts')
-rw-r--r-- | server/tests/api/videos/multiple-servers.ts | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/server/tests/api/videos/multiple-servers.ts b/server/tests/api/videos/multiple-servers.ts index e3029f1ae..d7b04373f 100644 --- a/server/tests/api/videos/multiple-servers.ts +++ b/server/tests/api/videos/multiple-servers.ts | |||
@@ -37,7 +37,8 @@ import { | |||
37 | addVideoCommentThread, | 37 | addVideoCommentThread, |
38 | deleteVideoComment, | 38 | deleteVideoComment, |
39 | getVideoCommentThreads, | 39 | getVideoCommentThreads, |
40 | getVideoThreadComments | 40 | getVideoThreadComments, |
41 | findCommentId | ||
41 | } from '../../../../shared/extra-utils/videos/video-comments' | 42 | } from '../../../../shared/extra-utils/videos/video-comments' |
42 | import { waitJobs } from '../../../../shared/extra-utils/server/jobs' | 43 | import { waitJobs } from '../../../../shared/extra-utils/server/jobs' |
43 | 44 | ||
@@ -773,8 +774,7 @@ describe('Test multiple servers', function () { | |||
773 | await waitJobs(servers) | 774 | await waitJobs(servers) |
774 | 775 | ||
775 | { | 776 | { |
776 | const res = await getVideoCommentThreads(servers[1].url, videoUUID, 0, 5) | 777 | const threadId = await findCommentId(servers[1].url, videoUUID, 'my super first comment') |
777 | const threadId = res.body.data.find(c => c.text === 'my super first comment').id | ||
778 | 778 | ||
779 | const text = 'my super answer to thread 1' | 779 | const text = 'my super answer to thread 1' |
780 | await addVideoCommentReply(servers[1].url, servers[1].accessToken, videoUUID, threadId, text) | 780 | await addVideoCommentReply(servers[1].url, servers[1].accessToken, videoUUID, threadId, text) |
@@ -783,8 +783,7 @@ describe('Test multiple servers', function () { | |||
783 | await waitJobs(servers) | 783 | await waitJobs(servers) |
784 | 784 | ||
785 | { | 785 | { |
786 | const res1 = await getVideoCommentThreads(servers[2].url, videoUUID, 0, 5) | 786 | const threadId = await findCommentId(servers[2].url, videoUUID, 'my super first comment') |
787 | const threadId = res1.body.data.find(c => c.text === 'my super first comment').id | ||
788 | 787 | ||
789 | const res2 = await getVideoThreadComments(servers[2].url, videoUUID, threadId) | 788 | const res2 = await getVideoThreadComments(servers[2].url, videoUUID, threadId) |
790 | const childCommentId = res2.body.children[0].comment.id | 789 | const childCommentId = res2.body.children[0].comment.id |