]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/client.ts
Merge branch 'release/5.1.0' into develop
[github/Chocobozzz/PeerTube.git] / server / tests / client.ts
index 39ba5fdf69a25105b2ea337c5e145205dfa5b0a8..9a20c2a10361b29b52264b423d30e7993df04c57 100644 (file)
@@ -134,11 +134,9 @@ describe('Test a client controllers', function () {
             expectedStatus: HttpStatusCode.OK_200
           })
 
-          const port = servers[0].port
-
-          const expectedLink = '<link rel="alternate" type="application/json+oembed" href="http://localhost:' + port + '/services/oembed?' +
-            `url=http%3A%2F%2Flocalhost%3A${port}%2Fw%2F${servers[0].store.video.shortUUID}" ` +
-            `title="${servers[0].store.video.name}" />`
+          const expectedLink = `<link rel="alternate" type="application/json+oembed" href="${servers[0].url}/services/oembed?` +
+          `url=http%3A%2F%2F${servers[0].hostname}%3A${servers[0].port}%2Fw%2F${servers[0].store.video.shortUUID}" ` +
+          `title="${servers[0].store.video.name}" />`
 
           expect(res.text).to.contain(expectedLink)
         }
@@ -155,10 +153,8 @@ describe('Test a client controllers', function () {
             expectedStatus: HttpStatusCode.OK_200
           })
 
-          const port = servers[0].port
-
-          const expectedLink = '<link rel="alternate" type="application/json+oembed" href="http://localhost:' + port + '/services/oembed?' +
-            `url=http%3A%2F%2Flocalhost%3A${port}%2Fw%2Fp%2F${playlist.shortUUID}" ` +
+          const expectedLink = `<link rel="alternate" type="application/json+oembed" href="${servers[0].url}/services/oembed?` +
+            `url=http%3A%2F%2F${servers[0].hostname}%3A${servers[0].port}%2Fw%2Fp%2F${playlist.shortUUID}" ` +
             `title="${playlistName}" />`
 
           expect(res.text).to.contain(expectedLink)
@@ -229,6 +225,14 @@ describe('Test a client controllers', function () {
       }
     })
 
+    it('Should have valid Open Graph tags on the watch page with thread id Angular param', async function () {
+      for (const path of watchVideoBasePaths) {
+        for (const id of videoIds) {
+          await watchVideoPageTest(path + id + ';threadId=1')
+        }
+      }
+    })
+
     it('Should have valid Open Graph tags on the watch playlist page', async function () {
       for (const path of watchPlaylistBasePaths) {
         for (const id of playlistIds) {