]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/server/follow-constraints.ts
Fix E2E tests
[github/Chocobozzz/PeerTube.git] / server / tests / api / server / follow-constraints.ts
index a73440286560505063abc97a5cef58e72aec3c62..8a91fbba30901a0bd67d9ef178cccee7245fc75f 100644 (file)
@@ -17,6 +17,7 @@ import {
 import { unfollow } from '../../../../shared/extra-utils/server/follows'
 import { userLogin } from '../../../../shared/extra-utils/users/login'
 import { createUser } from '../../../../shared/extra-utils/users/users'
+import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
 
 const expect = chai.expect
 
@@ -27,7 +28,7 @@ describe('Test follow constraints', function () {
   let userAccessToken: string
 
   before(async function () {
-    this.timeout(60000)
+    this.timeout(90000)
 
     servers = await flushAndRunMultipleServers(2)
 
@@ -58,11 +59,11 @@ describe('Test follow constraints', function () {
     describe('With an unlogged user', function () {
 
       it('Should get the local video', async function () {
-        await getVideo(servers[0].url, video1UUID, 200)
+        await getVideo(servers[0].url, video1UUID, HttpStatusCode.OK_200)
       })
 
       it('Should get the remote video', async function () {
-        await getVideo(servers[0].url, video2UUID, 200)
+        await getVideo(servers[0].url, video2UUID, HttpStatusCode.OK_200)
       })
 
       it('Should list local account videos', async function () {
@@ -98,11 +99,11 @@ describe('Test follow constraints', function () {
 
     describe('With a logged user', function () {
       it('Should get the local video', async function () {
-        await getVideoWithToken(servers[0].url, userAccessToken, video1UUID, 200)
+        await getVideoWithToken(servers[0].url, userAccessToken, video1UUID, HttpStatusCode.OK_200)
       })
 
       it('Should get the remote video', async function () {
-        await getVideoWithToken(servers[0].url, userAccessToken, video2UUID, 200)
+        await getVideoWithToken(servers[0].url, userAccessToken, video2UUID, HttpStatusCode.OK_200)
       })
 
       it('Should list local account videos', async function () {
@@ -148,11 +149,11 @@ describe('Test follow constraints', function () {
     describe('With an unlogged user', function () {
 
       it('Should get the local video', async function () {
-        await getVideo(servers[0].url, video1UUID, 200)
+        await getVideo(servers[0].url, video1UUID, HttpStatusCode.OK_200)
       })
 
       it('Should not get the remote video', async function () {
-        await getVideo(servers[0].url, video2UUID, 403)
+        await getVideo(servers[0].url, video2UUID, HttpStatusCode.FORBIDDEN_403)
       })
 
       it('Should list local account videos', async function () {
@@ -188,11 +189,11 @@ describe('Test follow constraints', function () {
 
     describe('With a logged user', function () {
       it('Should get the local video', async function () {
-        await getVideoWithToken(servers[0].url, userAccessToken, video1UUID, 200)
+        await getVideoWithToken(servers[0].url, userAccessToken, video1UUID, HttpStatusCode.OK_200)
       })
 
       it('Should get the remote video', async function () {
-        await getVideoWithToken(servers[0].url, userAccessToken, video2UUID, 200)
+        await getVideoWithToken(servers[0].url, userAccessToken, video2UUID, HttpStatusCode.OK_200)
       })
 
       it('Should list local account videos', async function () {