+ it('Should list predefined reasons as well as timestamps for the reported video', async function () {
+ this.timeout(10000)
+
+ const reason5 = 'my super bad reason 5'
+ const predefinedReasons5: AbusePredefinedReasonsString[] = [ 'violentOrRepulsive', 'captions' ]
+ const createdAbuse = (await reportVideoAbuse(
+ servers[0].url,
+ servers[0].accessToken,
+ servers[0].video.id,
+ reason5,
+ predefinedReasons5,
+ 1,
+ 5
+ )).body.abuse
+
+ const res = await getVideoAbusesList({ url: servers[0].url, token: servers[0].accessToken })
+
+ {
+ const abuse = (res.body.data as Abuse[]).find(a => a.id === createdAbuse.id)
+ expect(abuse.reason).to.equals(reason5)
+ expect(abuse.predefinedReasons).to.deep.equals(predefinedReasons5, "predefined reasons do not match the one reported")
+ expect(abuse.video.startAt).to.equal(1, "starting timestamp doesn't match the one reported")
+ expect(abuse.video.endAt).to.equal(5, "ending timestamp doesn't match the one reported")
+ }
+ })
+