+ const firstChild = tree.children[0]
+ expect(firstChild.comment.text).to.equal('comment 1-1')
+ expect(firstChild.children).to.have.lengthOf(1)
+
+ const childOfFirstChild = firstChild.children[0]
+ expect(childOfFirstChild.comment.text).to.equal('comment 1-2')
+ expect(childOfFirstChild.children).to.have.lengthOf(1)
+
+ const childOfChildFirstChild = childOfFirstChild.children[0]
+ expect(childOfChildFirstChild.comment.text).to.equal('comment 1-3')
+ expect(childOfChildFirstChild.children).to.have.lengthOf(0)
+
+ commentIdServer2 = childOfChildFirstChild.comment.id
+ }
+ })
+
+ it('Should correctly reply to the comment', async function () {
+ this.timeout(15000)
+
+ await addVideoCommentReply(servers[2].url, servers[2].accessToken, missedVideo2.uuid, commentIdServer2, 'comment 1-4')
+
+ await waitJobs(servers)
+
+ {
+ const resComment = await getVideoThreadComments(servers[0].url, missedVideo2.uuid, threadIdServer1)
+
+ const tree: VideoCommentThreadTree = resComment.body
+ expect(tree.comment.text).equal('thread 1')
+ expect(tree.children).to.have.lengthOf(1)
+
+ const firstChild = tree.children[0]
+ expect(firstChild.comment.text).to.equal('comment 1-1')
+ expect(firstChild.children).to.have.lengthOf(1)
+
+ const childOfFirstChild = firstChild.children[0]
+ expect(childOfFirstChild.comment.text).to.equal('comment 1-2')
+ expect(childOfFirstChild.children).to.have.lengthOf(1)
+
+ const childOfChildFirstChild = childOfFirstChild.children[0]
+ expect(childOfChildFirstChild.comment.text).to.equal('comment 1-3')
+ expect(childOfChildFirstChild.children).to.have.lengthOf(1)
+
+ const childOfChildOfChildOfFirstChild = childOfChildFirstChild.children[0]
+ expect(childOfChildOfChildOfFirstChild.comment.text).to.equal('comment 1-4')
+ expect(childOfChildOfChildOfFirstChild.children).to.have.lengthOf(0)
+ }
+ })
+
+ it('Should upload many videos on server 1', async function () {
+ this.timeout(120000)
+
+ for (let i = 0; i < 10; i++) {
+ const uuid = (await uploadVideoAndGetId({ server: servers[0], videoName: 'video ' + i })).uuid
+ videoIdsServer1.push(uuid)