aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-05-10 13:56:26 +0200
committerChocobozzz <me@florianbigard.com>2021-05-10 13:58:09 +0200
commit3ec535f72be4fea5c6afa129d40b81b74431f1d2 (patch)
tree9baf40c35a1a125fea0c751d28afd7750d8703c2
parent649e812947b1afa1f025f2f3dc833a8cfb772e9c (diff)
downloadPeerTube-3ec535f72be4fea5c6afa129d40b81b74431f1d2.tar.gz
PeerTube-3ec535f72be4fea5c6afa129d40b81b74431f1d2.tar.zst
PeerTube-3ec535f72be4fea5c6afa129d40b81b74431f1d2.zip
Fix E2E tests
-rw-r--r--client/e2e/src/po/video-upload.po.ts7
-rw-r--r--server/middlewares/async.ts1
-rw-r--r--server/tests/api/server/follow-constraints.ts2
3 files changed, 7 insertions, 3 deletions
diff --git a/client/e2e/src/po/video-upload.po.ts b/client/e2e/src/po/video-upload.po.ts
index 942025b6b..ad2acee7f 100644
--- a/client/e2e/src/po/video-upload.po.ts
+++ b/client/e2e/src/po/video-upload.po.ts
@@ -26,7 +26,12 @@ export class VideoUploadPage {
26 await elem.sendKeys(fileToUpload) 26 await elem.sendKeys(fileToUpload)
27 27
28 // Wait for the upload to finish 28 // Wait for the upload to finish
29 await browser.wait(browser.ExpectedConditions.elementToBeClickable(this.getSecondStepSubmitButton())) 29 await browser.wait(async () => {
30 const actionButton = this.getSecondStepSubmitButton().element(by.css('.action-button'))
31
32 const klass = await actionButton.getAttribute('class')
33 return !klass.includes('disabled')
34 })
30 } 35 }
31 36
32 async validSecondUploadStep (videoName: string) { 37 async validSecondUploadStep (videoName: string) {
diff --git a/server/middlewares/async.ts b/server/middlewares/async.ts
index 0faa4fb8c..3d6e38809 100644
--- a/server/middlewares/async.ts
+++ b/server/middlewares/async.ts
@@ -3,7 +3,6 @@ import { NextFunction, Request, RequestHandler, Response } from 'express'
3import { ValidationChain } from 'express-validator' 3import { ValidationChain } from 'express-validator'
4import { ExpressPromiseHandler } from '@server/types/express' 4import { ExpressPromiseHandler } from '@server/types/express'
5import { retryTransactionWrapper } from '../helpers/database-utils' 5import { retryTransactionWrapper } from '../helpers/database-utils'
6import { HttpMethod, HttpStatusCode } from '@shared/core-utils'
7 6
8// Syntactic sugar to avoid try/catch in express controllers 7// Syntactic sugar to avoid try/catch in express controllers
9// Thanks: https://medium.com/@Abazhenov/using-async-await-in-express-with-node-8-b8af872c0016 8// Thanks: https://medium.com/@Abazhenov/using-async-await-in-express-with-node-8-b8af872c0016
diff --git a/server/tests/api/server/follow-constraints.ts b/server/tests/api/server/follow-constraints.ts
index 0846b04f4..8a91fbba3 100644
--- a/server/tests/api/server/follow-constraints.ts
+++ b/server/tests/api/server/follow-constraints.ts
@@ -28,7 +28,7 @@ describe('Test follow constraints', function () {
28 let userAccessToken: string 28 let userAccessToken: string
29 29
30 before(async function () { 30 before(async function () {
31 this.timeout(60000) 31 this.timeout(90000)
32 32
33 servers = await flushAndRunMultipleServers(2) 33 servers = await flushAndRunMultipleServers(2)
34 34