- it('Should list jobs with sort and pagination', async function () {
- const res = await getJobsListPaginationAndSort(servers[1].url, servers[1].accessToken, 4, 1, 'createdAt')
- expect(res.body.total).to.be.above(2)
- expect(res.body.data).to.have.lengthOf(1)
-
- const job = res.body.data[0]
- expect(job.state).to.equal('success')
- expect(job.category).to.equal('transcoding')
- expect(job.handlerName).to.have.length.above(3)
- expect(dateIsValid(job.createdAt)).to.be.true
- expect(dateIsValid(job.updatedAt)).to.be.true
- })
+ it('Should list jobs with sort, pagination and job type', async function () {
+ {
+ const res = await getJobsListPaginationAndSort({
+ url: servers[1].url,
+ accessToken: servers[1].accessToken,
+ state: 'completed',
+ start: 1,
+ count: 2,
+ sort: 'createdAt'
+ })
+ expect(res.body.total).to.be.above(2)
+ expect(res.body.data).to.have.lengthOf(2)