+
+ it('Should not display waiting live videos', async function () {
+ const { uuid } = await servers[0].live.create({
+ fields: {
+ name: 'live',
+ privacy: VideoPrivacy.PUBLIC,
+ channelId: rootChannelId
+ }
+ })
+ liveId = uuid
+
+ const json = await servers[0].feed.getJSON({ feed: 'videos', ignoreCache: true })
+
+ const jsonObj = JSON.parse(json)
+ expect(jsonObj.items.length).to.be.equal(2)
+ expect(jsonObj.items[0].title).to.equal('my super name for server 1')
+ expect(jsonObj.items[1].title).to.equal('user video')
+ })
+
+ it('Should display published live videos', async function () {
+ this.timeout(120000)
+
+ const ffmpeg = await servers[0].live.sendRTMPStreamInVideo({ videoId: liveId, copyCodecs: true, fixtureName: 'video_short.mp4' })
+ await servers[0].live.waitUntilPublished({ videoId: liveId })
+
+ const json = await servers[0].feed.getJSON({ feed: 'videos', ignoreCache: true })
+
+ const jsonObj = JSON.parse(json)
+ expect(jsonObj.items.length).to.be.equal(3)
+ expect(jsonObj.items[0].title).to.equal('live')
+ expect(jsonObj.items[1].title).to.equal('my super name for server 1')
+ expect(jsonObj.items[2].title).to.equal('user video')
+
+ await stopFfmpeg(ffmpeg)
+ })
+
+ it('Should have the channel avatar as feed icon', async function () {
+ const json = await servers[0].feed.getJSON({ feed: 'videos', query: { videoChannelId: rootChannelId }, ignoreCache: true })
+
+ const jsonObj = JSON.parse(json)
+ const imageUrl = jsonObj.icon
+ expect(imageUrl).to.include('/lazy-static/avatars/')
+ await makeRawRequest({ url: imageUrl, expectedStatus: HttpStatusCode.OK_200 })
+ })