uploadVideo,
viewVideo,
wait
-} from '../../utils'
+} from '../../../../shared/utils'
const expect = chai.expect
tags: [ 'tag1', 'tag2', 'tag3' ],
privacy: VideoPrivacy.PUBLIC,
commentsEnabled: true,
+ downloadEnabled: true,
channel: {
displayName: 'Main root channel',
name: 'root_channel',
privacy: VideoPrivacy.PUBLIC,
duration: 5,
commentsEnabled: false,
+ downloadEnabled: false,
channel: {
name: 'root_channel',
displayName: 'Main root channel',
const categories = res.body
expect(Object.keys(categories)).to.have.length.above(10)
- expect(categories[11]).to.equal('News')
+ expect(categories[11]).to.equal('News & Politics')
})
it('Should list video licences', async function () {
videoId = videos[3].uuid
})
+ it('Should list and sort by trending in descending order', async function () {
+ const res = await getVideosListPagination(server.url, 0, 2, '-trending')
+
+ const videos = res.body.data
+ expect(res.body.total).to.equal(6)
+ expect(videos.length).to.equal(2)
+ })
+
it('Should update a video', async function () {
const attributes = {
name: 'my super video updated',
nsfw: false,
description: 'my super description updated',
commentsEnabled: false,
+ downloadEnabled: false,
tags: [ 'tagup1', 'tagup2' ]
}
await updateVideo(server.url, server.accessToken, videoId, attributes)