aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api')
-rw-r--r--server/tests/api/notifications/comments-notifications.ts22
1 files changed, 22 insertions, 0 deletions
diff --git a/server/tests/api/notifications/comments-notifications.ts b/server/tests/api/notifications/comments-notifications.ts
index dfe846cc4..fd009e9d9 100644
--- a/server/tests/api/notifications/comments-notifications.ts
+++ b/server/tests/api/notifications/comments-notifications.ts
@@ -165,6 +165,28 @@ describe('Test comments notifications', function () {
165 165
166 await checkNewCommentOnMyVideo(baseParams, uuid, commentId, threadId, 'presence') 166 await checkNewCommentOnMyVideo(baseParams, uuid, commentId, threadId, 'presence')
167 }) 167 })
168
169 it('Should convert markdown in comment to html', async function () {
170 this.timeout(10000)
171
172 const resVideo = await uploadVideo(servers[0].url, userAccessToken, { name: 'cool video' })
173 const uuid = resVideo.body.video.uuid
174
175 const commentText = '**hello** <a href="https://joinpeertube.org">world</a>, <h1>what do you think about peertube?</h1>'
176 const resComment = await addVideoCommentThread(servers[0].url, servers[0].accessToken, uuid, commentText)
177 const commentId = resComment.body.comment.id
178
179 await waitJobs(servers)
180 await checkNewCommentOnMyVideo(baseParams, uuid, commentId, commentId, 'presence')
181
182 const latestEmail = emails[emails.length - 1]
183
184 const expected = '<strong style="-ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;">hello</strong> ' +
185 '<a href="https://joinpeertube.org" target="_blank" rel="noopener noreferrer" style="-ms-text-size-adjust: 100%; ' +
186 '-webkit-text-size-adjust: 100%; text-decoration: none; color: #f2690d;">world</a>, </p>what do you think about peertube?'
187
188 expect(latestEmail['html']).to.contain(expected)
189 })
168 }) 190 })
169 191
170 describe('Mention notifications', function () { 192 describe('Mention notifications', function () {