- expect(video1.name).to.equal('my super name for server 3')
- expect(video1.category).to.equal(6)
- expect(video1.categoryLabel).to.equal('Travels')
- expect(video1.licence).to.equal(5)
- expect(video1.licenceLabel).to.equal('Attribution - Non Commercial - Share Alike')
- expect(video1.language).to.equal(11)
- expect(video1.languageLabel).to.equal('German')
- expect(video1.nsfw).to.be.ok
- expect(video1.description).to.equal('my super description for server 3')
- expect(video1.serverHost).to.equal('localhost:9003')
- expect(video1.duration).to.equal(5)
- expect(video1.accountName).to.equal('root')
- expect(dateIsValid(video1.createdAt)).to.be.true
- expect(dateIsValid(video1.updatedAt)).to.be.true
-
- const res2 = await getVideo(server.url, video1.id)
- const video1Details = res2.body
- expect(video1Details.files).to.have.lengthOf(1)
- expect(video1Details.tags).to.deep.equal([ 'tag1p3' ])
-
- const file1 = video1Details.files[0]
- expect(file1.magnetUri).to.have.lengthOf.above(2)
- expect(file1.resolution).to.equal(720)
- expect(file1.resolutionLabel).to.equal('720p')
- expect(file1.size).to.equal(292677)
-
- expect(video2.name).to.equal('my super name for server 3-2')
- expect(video2.category).to.equal(7)
- expect(video2.categoryLabel).to.equal('Gaming')
- expect(video2.licence).to.equal(6)
- expect(video2.licenceLabel).to.equal('Attribution - Non Commercial - No Derivatives')
- expect(video2.language).to.equal(12)
- expect(video2.languageLabel).to.equal('Korean')
- expect(video2.nsfw).to.be.false
- expect(video2.description).to.equal('my super description for server 3-2')
- expect(video2.serverHost).to.equal('localhost:9003')
- expect(video2.duration).to.equal(5)
- expect(video2.accountName).to.equal('root')
- expect(dateIsValid(video2.createdAt)).to.be.true
- expect(dateIsValid(video2.updatedAt)).to.be.true
-
- const res3 = await getVideo(server.url, video2.id)
- const video2Details = res3.body
- expect(video2Details.tags).to.deep.equal([ 'tag2p3', 'tag3p3', 'tag4p3' ])
-
- expect(video2Details.files).to.have.lengthOf(1)
-
- const file2 = video2Details.files[0]
- const magnetUri2 = file2.magnetUri
- expect(file2.magnetUri).to.have.lengthOf.above(2)
- expect(file2.resolution).to.equal(720)
- expect(file2.resolutionLabel).to.equal('720p')
- expect(file2.size).to.equal(218910)
-
- if (server.url !== 'http://localhost:9003') {
- expect(video1.isLocal).to.be.false
- expect(video2.isLocal).to.be.false
- } else {
- expect(video1.isLocal).to.be.true
- expect(video2.isLocal).to.be.true
+ const checkAttributesVideo1 = {
+ name: 'my super name for server 3',
+ category: 6,
+ licence: 5,
+ language: 'de',
+ nsfw: true,
+ description: 'my super description for server 3',
+ support: 'my super support text for server 3',
+ account: {
+ name: 'root',
+ host: 'localhost:9003'
+ },
+ isLocal,
+ duration: 5,
+ commentsEnabled: true,
+ tags: [ 'tag1p3' ],
+ privacy: VideoPrivacy.PUBLIC,
+ channel: {
+ name: 'Default root channel',
+ description: '',
+ isLocal
+ },
+ fixture: 'video_short3.webm',
+ files: [
+ {
+ resolution: 720,
+ size: 292677
+ }
+ ]