X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fclient.ts;h=4f0d052c8abef28f1f5386571bb9de36f77efff8;hb=421ff4618da64f0849353383f690a014024c40da;hp=9c27a7aae0d17de25e7d28981112d93a4209ea85;hpb=a24bd1ed41b43790bab6ba789580bb4e85f07d85;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/client.ts b/server/tests/client.ts index 9c27a7aae..4f0d052c8 100644 --- a/server/tests/client.ts +++ b/server/tests/client.ts @@ -119,7 +119,7 @@ describe('Test a client controllers', function () { const port = servers[0].port const expectedLink = '` expect(res.text).to.contain(expectedLink) @@ -140,7 +140,7 @@ describe('Test a client controllers', function () { const port = servers[0].port const expectedLink = '` expect(res.text).to.contain(expectedLink) @@ -178,7 +178,7 @@ describe('Test a client controllers', function () { expect(text).to.contain(``) expect(text).to.contain(``) expect(text).to.contain('') - expect(text).to.contain(``) + expect(text).to.contain(``) } async function watchPlaylistPageTest (path: string) { @@ -188,7 +188,7 @@ describe('Test a client controllers', function () { expect(text).to.contain(``) expect(text).to.contain(``) expect(text).to.contain('') - expect(text).to.contain(``) + expect(text).to.contain(``) } it('Should have valid Open Graph tags on the account page', async function () { @@ -445,6 +445,40 @@ describe('Test a client controllers', function () { } } }) + + it('Should add noindex meta tag for remote accounts', async function () { + const handle = 'root@' + servers[0].host + const paths = [ '/accounts/', '/a/', '/@' ] + + for (const path of paths) { + { + const { text } = await makeHTMLRequest(servers[1].url, path + handle) + expect(text).to.contain('') + } + + { + const { text } = await makeHTMLRequest(servers[0].url, path + handle) + expect(text).to.not.contain('') + } + } + }) + + it('Should add noindex meta tag for remote accounts', async function () { + const handle = 'root_channel@' + servers[0].host + const paths = [ '/video-channels/', '/c/', '/@' ] + + for (const path of paths) { + { + const { text } = await makeHTMLRequest(servers[1].url, path + handle) + expect(text).to.contain('') + } + + { + const { text } = await makeHTMLRequest(servers[0].url, path + handle) + expect(text).to.not.contain('') + } + } + }) }) describe('Embed HTML', function () {