aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2021-04-12 11:43:29 +0200
committerChocobozzz <chocobozzz@cpy.re>2021-04-13 15:45:09 +0200
commita073c912700e1ecda70a463f334f316dc62db7a4 (patch)
tree46dfa8d014765ef8baba9251c15485a545082f91 /server/tests
parent84bced652cd72aad852914a4a734c47dd0002fef (diff)
downloadPeerTube-a073c912700e1ecda70a463f334f316dc62db7a4.tar.gz
PeerTube-a073c912700e1ecda70a463f334f316dc62db7a4.tar.zst
PeerTube-a073c912700e1ecda70a463f334f316dc62db7a4.zip
modify tests to support current behaviour regarding plaintext description
Diffstat (limited to 'server/tests')
-rw-r--r--server/tests/client.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/server/tests/client.ts b/server/tests/client.ts
index d608764ee..3c99bcd1f 100644
--- a/server/tests/client.ts
+++ b/server/tests/client.ts
@@ -39,7 +39,8 @@ describe('Test a client controllers', function () {
39 let account: Account 39 let account: Account
40 40
41 const videoName = 'my super name for server 1' 41 const videoName = 'my super name for server 1'
42 const videoDescription = 'my super description for server 1' 42 const videoDescription = 'my<br> super __description__ for *server* 1<p></p>'
43 const videoDescriptionPlainText = 'my super description for server 1'
43 44
44 const playlistName = 'super playlist name' 45 const playlistName = 'super playlist name'
45 const playlistDescription = 'super playlist description' 46 const playlistDescription = 'super playlist description'
@@ -169,7 +170,7 @@ describe('Test a client controllers', function () {
169 .expect(HttpStatusCode.OK_200) 170 .expect(HttpStatusCode.OK_200)
170 171
171 expect(res.text).to.contain(`<meta property="og:title" content="${videoName}" />`) 172 expect(res.text).to.contain(`<meta property="og:title" content="${videoName}" />`)
172 expect(res.text).to.contain(`<meta property="og:description" content="${videoDescription}" />`) 173 expect(res.text).to.contain(`<meta property="og:description" content="${videoDescriptionPlainText}" />`)
173 expect(res.text).to.contain('<meta property="og:type" content="video" />') 174 expect(res.text).to.contain('<meta property="og:type" content="video" />')
174 expect(res.text).to.contain(`<meta property="og:url" content="${servers[0].url}/videos/watch/${servers[0].video.uuid}" />`) 175 expect(res.text).to.contain(`<meta property="og:url" content="${servers[0].url}/videos/watch/${servers[0].video.uuid}" />`)
175 }) 176 })
@@ -181,7 +182,7 @@ describe('Test a client controllers', function () {
181 .expect(HttpStatusCode.OK_200) 182 .expect(HttpStatusCode.OK_200)
182 183
183 expect(res.text).to.contain(`<meta property="og:title" content="${videoName}" />`) 184 expect(res.text).to.contain(`<meta property="og:title" content="${videoName}" />`)
184 expect(res.text).to.contain(`<meta property="og:description" content="${videoDescription}" />`) 185 expect(res.text).to.contain(`<meta property="og:description" content="${videoDescriptionPlainText}" />`)
185 expect(res.text).to.contain('<meta property="og:type" content="video" />') 186 expect(res.text).to.contain('<meta property="og:type" content="video" />')
186 expect(res.text).to.contain(`<meta property="og:url" content="${servers[0].url}/videos/watch/${servers[0].video.uuid}" />`) 187 expect(res.text).to.contain(`<meta property="og:url" content="${servers[0].url}/videos/watch/${servers[0].video.uuid}" />`)
187 }) 188 })
@@ -210,7 +211,7 @@ describe('Test a client controllers', function () {
210 expect(res.text).to.contain('<meta property="twitter:card" content="summary_large_image" />') 211 expect(res.text).to.contain('<meta property="twitter:card" content="summary_large_image" />')
211 expect(res.text).to.contain('<meta property="twitter:site" content="@Chocobozzz" />') 212 expect(res.text).to.contain('<meta property="twitter:site" content="@Chocobozzz" />')
212 expect(res.text).to.contain(`<meta property="twitter:title" content="${videoName}" />`) 213 expect(res.text).to.contain(`<meta property="twitter:title" content="${videoName}" />`)
213 expect(res.text).to.contain(`<meta property="twitter:description" content="${videoDescription}" />`) 214 expect(res.text).to.contain(`<meta property="twitter:description" content="${videoDescriptionPlainText}" />`)
214 }) 215 })
215 216
216 it('Should have valid twitter card on the watch playlist page', async function () { 217 it('Should have valid twitter card on the watch playlist page', async function () {