describe('Test services', function () {
let server: ServerInfo = null
let playlistUUID: string
+ let playlistDisplayName: string
let video: Video
before(async function () {
})
playlistUUID = res.body.videoPlaylist.uuid
+ playlistDisplayName = 'The Life and Times of Scrooge McDuck'
await addVideoInPlaylist({
url: server.url,
const res = await getOEmbed(server.url, oembedUrl)
const expectedHtml = '<iframe width="560" height="315" sandbox="allow-same-origin allow-scripts" ' +
- `src="http://localhost:${server.port}/videos/embed/${video.uuid}" ` +
+ `title="${video.name}" src="http://localhost:${server.port}/videos/embed/${video.uuid}" ` +
'frameborder="0" allowfullscreen></iframe>'
const expectedThumbnailUrl = 'http://localhost:' + server.port + video.previewPath
const res = await getOEmbed(server.url, oembedUrl)
const expectedHtml = '<iframe width="560" height="315" sandbox="allow-same-origin allow-scripts" ' +
- `src="http://localhost:${server.port}/video-playlists/embed/${playlistUUID}" ` +
+ `title="${playlistDisplayName}" src="http://localhost:${server.port}/video-playlists/embed/${playlistUUID}" ` +
'frameborder="0" allowfullscreen></iframe>'
expect(res.body.html).to.equal(expectedHtml)
const res = await getOEmbed(server.url, oembedUrl, format, maxHeight, maxWidth)
const expectedHtml = '<iframe width="50" height="50" sandbox="allow-same-origin allow-scripts" ' +
- `src="http://localhost:${server.port}/videos/embed/${video.uuid}" ` +
+ `title="${video.name}" src="http://localhost:${server.port}/videos/embed/${video.uuid}" ` +
'frameborder="0" allowfullscreen></iframe>'
expect(res.body.html).to.equal(expectedHtml)