+ const body = await command.advancedVideoSearch({ search: { search } })
+
+ expect(body.total).to.equal(1)
+ expect(body.data[0].name).to.equal('1111 2222 3333 - 3')
+ })
+
+ it('Should search by live', async function () {
+ this.timeout(30000)
+
+ {
+ const newConfig = {
+ search: {
+ searchIndex: { enabled: false }
+ },
+ live: { enabled: true }
+ }
+ await server.configCommand.updateCustomSubConfig({ newConfig })
+ }
+
+ {
+ const body = await command.advancedVideoSearch({ search: { isLive: true } })
+
+ expect(body.total).to.equal(0)
+ expect(body.data).to.have.lengthOf(0)
+ }
+
+ {
+ const liveCommand = server.liveCommand
+
+ const liveAttributes = { name: 'live', privacy: VideoPrivacy.PUBLIC, channelId: server.videoChannel.id }
+ const live = await liveCommand.create({ fields: liveAttributes })
+
+ const ffmpegCommand = await liveCommand.sendRTMPStreamInVideo({ videoId: live.id })
+ await liveCommand.waitUntilPublished({ videoId: live.id })