X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fclient.ts;h=9a20c2a10361b29b52264b423d30e7993df04c57;hb=47d883de2efbc2e8b5f6f94ae18c15224cbe982b;hp=a8a697f99bebbf91521d65e6731f8701f314ed84;hpb=1159c4a600ce4f2b86973fe88ae8827a06f523c7;p=github%2FChocobozzz%2FPeerTube.git
diff --git a/server/tests/client.ts b/server/tests/client.ts
index a8a697f99..9a20c2a10 100644
--- a/server/tests/client.ts
+++ b/server/tests/client.ts
@@ -1,8 +1,7 @@
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
-import 'mocha'
-import * as chai from 'chai'
-import { omit } from 'lodash'
+import { expect } from 'chai'
+import { omit } from '@shared/core-utils'
import {
Account,
HTMLServerConfig,
@@ -24,14 +23,12 @@ import {
waitJobs
} from '../../shared/server-commands'
-const expect = chai.expect
-
function checkIndexTags (html: string, title: string, description: string, css: string, config: ServerConfig) {
expect(html).to.contain('
' + title + '')
expect(html).to.contain('')
expect(html).to.contain('')
- const htmlConfig: HTMLServerConfig = omit(config, 'signup')
+ const htmlConfig: HTMLServerConfig = omit(config, [ 'signup' ])
const configObjectString = JSON.stringify(htmlConfig)
const configEscapedString = JSON.stringify(configObjectString)
@@ -137,11 +134,9 @@ describe('Test a client controllers', function () {
expectedStatus: HttpStatusCode.OK_200
})
- const port = servers[0].port
-
- const expectedLink = '`
+ const expectedLink = ``
expect(res.text).to.contain(expectedLink)
}
@@ -158,10 +153,8 @@ describe('Test a client controllers', function () {
expectedStatus: HttpStatusCode.OK_200
})
- const port = servers[0].port
-
- const expectedLink = '`
expect(res.text).to.contain(expectedLink)
@@ -232,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) {