Fix tests
This commit is contained in:
parent
d2adf1faff
commit
8a0269f4eb
|
@ -948,7 +948,7 @@ instance:
|
||||||
# - 17 # Kids
|
# - 17 # Kids
|
||||||
# - 18 # Food
|
# - 18 # Food
|
||||||
|
|
||||||
default_client_route: '/videos/trending'
|
default_client_route: '/videos/browse'
|
||||||
|
|
||||||
# Whether or not the instance is dedicated to NSFW content
|
# Whether or not the instance is dedicated to NSFW content
|
||||||
# Enabling it will allow other administrators to know that you are mainly federating sensitive content
|
# Enabling it will allow other administrators to know that you are mainly federating sensitive content
|
||||||
|
|
|
@ -34,7 +34,7 @@ function checkInitialConfig (server: PeerTubeServer, data: CustomConfig) {
|
||||||
expect(data.instance.languages).to.have.lengthOf(0)
|
expect(data.instance.languages).to.have.lengthOf(0)
|
||||||
expect(data.instance.categories).to.have.lengthOf(0)
|
expect(data.instance.categories).to.have.lengthOf(0)
|
||||||
|
|
||||||
expect(data.instance.defaultClientRoute).to.equal('/videos/trending')
|
expect(data.instance.defaultClientRoute).to.equal('/videos/browse')
|
||||||
expect(data.instance.isNSFW).to.be.false
|
expect(data.instance.isNSFW).to.be.false
|
||||||
expect(data.instance.defaultNSFWPolicy).to.equal('display')
|
expect(data.instance.defaultNSFWPolicy).to.equal('display')
|
||||||
expect(data.instance.customizations.css).to.be.empty
|
expect(data.instance.customizations.css).to.be.empty
|
||||||
|
|
|
@ -47,7 +47,7 @@ describe('Test index HTML generation', function () {
|
||||||
|
|
||||||
it('Should have valid index html tags (title, description...)', async function () {
|
it('Should have valid index html tags (title, description...)', async function () {
|
||||||
const config = await servers[0].config.getConfig()
|
const config = await servers[0].config.getConfig()
|
||||||
const res = await makeHTMLRequest(servers[0].url, '/videos/trending')
|
const res = await makeHTMLRequest(servers[0].url, '/videos/browse')
|
||||||
|
|
||||||
checkIndexTags(res.text, instanceConfig.name, instanceConfig.shortDescription, '', config)
|
checkIndexTags(res.text, instanceConfig.name, instanceConfig.shortDescription, '', config)
|
||||||
})
|
})
|
||||||
|
@ -71,14 +71,14 @@ describe('Test index HTML generation', function () {
|
||||||
})
|
})
|
||||||
|
|
||||||
const config = await servers[0].config.getConfig()
|
const config = await servers[0].config.getConfig()
|
||||||
const res = await makeHTMLRequest(servers[0].url, '/videos/trending')
|
const res = await makeHTMLRequest(servers[0].url, '/videos/browse')
|
||||||
|
|
||||||
checkIndexTags(res.text, 'PeerTube updated', 'my short description', 'body { background-color: red; }', config)
|
checkIndexTags(res.text, 'PeerTube updated', 'my short description', 'body { background-color: red; }', config)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Should have valid index html updated tags (title, description...)', async function () {
|
it('Should have valid index html updated tags (title, description...)', async function () {
|
||||||
const config = await servers[0].config.getConfig()
|
const config = await servers[0].config.getConfig()
|
||||||
const res = await makeHTMLRequest(servers[0].url, '/videos/trending')
|
const res = await makeHTMLRequest(servers[0].url, '/videos/browse')
|
||||||
|
|
||||||
checkIndexTags(res.text, 'PeerTube updated', 'my short description', 'body { background-color: red; }', config)
|
checkIndexTags(res.text, 'PeerTube updated', 'my short description', 'body { background-color: red; }', config)
|
||||||
})
|
})
|
||||||
|
|
|
@ -93,7 +93,7 @@ describe('Whisper CTranslate2 transcriber', function () {
|
||||||
expect(levenshteinDistance(
|
expect(levenshteinDistance(
|
||||||
(await transcript.read()).toString(),
|
(await transcript.read()).toString(),
|
||||||
'December 1965, is that all it has been since I inherited the world only three years, seems like a hundred million.'
|
'December 1965, is that all it has been since I inherited the world only three years, seems like a hundred million.'
|
||||||
)).to.be.below(5)
|
)).to.be.below(6)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('May transcribe a media file using a local CTranslate2 model', async function () {
|
it('May transcribe a media file using a local CTranslate2 model', async function () {
|
||||||
|
|
Loading…
Reference in New Issue