aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/client.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-27 17:37:59 +0200
committerChocobozzz <me@florianbigard.com>2021-07-27 17:37:59 +0200
commita892c54a821ae030143b07ba99ee1e159b24d35b (patch)
tree4531ced7bae2ec6c983a0a85ef4cf47f6012f18d /server/tests/client.ts
parent29837f8885eb37fa300e4b80c90a6d03ab337084 (diff)
downloadPeerTube-a892c54a821ae030143b07ba99ee1e159b24d35b.tar.gz
PeerTube-a892c54a821ae030143b07ba99ee1e159b24d35b.tar.zst
PeerTube-a892c54a821ae030143b07ba99ee1e159b24d35b.zip
Fix oembed for playlists
Diffstat (limited to 'server/tests/client.ts')
-rw-r--r--server/tests/client.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/tests/client.ts b/server/tests/client.ts
index 9c27a7aae..4cbdb2cb3 100644
--- a/server/tests/client.ts
+++ b/server/tests/client.ts
@@ -119,7 +119,7 @@ describe('Test a client controllers', function () {
119 const port = servers[0].port 119 const port = servers[0].port
120 120
121 const expectedLink = '<link rel="alternate" type="application/json+oembed" href="http://localhost:' + port + '/services/oembed?' + 121 const expectedLink = '<link rel="alternate" type="application/json+oembed" href="http://localhost:' + port + '/services/oembed?' +
122 `url=http%3A%2F%2Flocalhost%3A${port}%2Fw%2F${servers[0].store.video.uuid}" ` + 122 `url=http%3A%2F%2Flocalhost%3A${port}%2Fw%2F${servers[0].store.video.shortUUID}" ` +
123 `title="${servers[0].store.video.name}" />` 123 `title="${servers[0].store.video.name}" />`
124 124
125 expect(res.text).to.contain(expectedLink) 125 expect(res.text).to.contain(expectedLink)
@@ -140,7 +140,7 @@ describe('Test a client controllers', function () {
140 const port = servers[0].port 140 const port = servers[0].port
141 141
142 const expectedLink = '<link rel="alternate" type="application/json+oembed" href="http://localhost:' + port + '/services/oembed?' + 142 const expectedLink = '<link rel="alternate" type="application/json+oembed" href="http://localhost:' + port + '/services/oembed?' +
143 `url=http%3A%2F%2Flocalhost%3A${port}%2Fw%2Fp%2F${playlist.uuid}" ` + 143 `url=http%3A%2F%2Flocalhost%3A${port}%2Fw%2Fp%2F${playlist.shortUUID}" ` +
144 `title="${playlistName}" />` 144 `title="${playlistName}" />`
145 145
146 expect(res.text).to.contain(expectedLink) 146 expect(res.text).to.contain(expectedLink)
@@ -178,7 +178,7 @@ describe('Test a client controllers', function () {
178 expect(text).to.contain(`<meta property="og:title" content="${videoName}" />`) 178 expect(text).to.contain(`<meta property="og:title" content="${videoName}" />`)
179 expect(text).to.contain(`<meta property="og:description" content="${videoDescriptionPlainText}" />`) 179 expect(text).to.contain(`<meta property="og:description" content="${videoDescriptionPlainText}" />`)
180 expect(text).to.contain('<meta property="og:type" content="video" />') 180 expect(text).to.contain('<meta property="og:type" content="video" />')
181 expect(text).to.contain(`<meta property="og:url" content="${servers[0].url}/w/${servers[0].store.video.uuid}" />`) 181 expect(text).to.contain(`<meta property="og:url" content="${servers[0].url}/w/${servers[0].store.video.shortUUID}" />`)
182 } 182 }
183 183
184 async function watchPlaylistPageTest (path: string) { 184 async function watchPlaylistPageTest (path: string) {
@@ -188,7 +188,7 @@ describe('Test a client controllers', function () {
188 expect(text).to.contain(`<meta property="og:title" content="${playlistName}" />`) 188 expect(text).to.contain(`<meta property="og:title" content="${playlistName}" />`)
189 expect(text).to.contain(`<meta property="og:description" content="${playlistDescription}" />`) 189 expect(text).to.contain(`<meta property="og:description" content="${playlistDescription}" />`)
190 expect(text).to.contain('<meta property="og:type" content="video" />') 190 expect(text).to.contain('<meta property="og:type" content="video" />')
191 expect(text).to.contain(`<meta property="og:url" content="${servers[0].url}/w/p/${playlist.uuid}" />`) 191 expect(text).to.contain(`<meta property="og:url" content="${servers[0].url}/w/p/${playlist.shortUUID}" />`)
192 } 192 }
193 193
194 it('Should have valid Open Graph tags on the account page', async function () { 194 it('Should have valid Open Graph tags on the account page', async function () {