1
0
Fork 0

Fix E2E tests

This commit is contained in:
Chocobozzz 2021-05-10 13:56:26 +02:00
parent 649e812947
commit 3ec535f72b
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
3 changed files with 7 additions and 3 deletions

View File

@ -26,7 +26,12 @@ export class VideoUploadPage {
await elem.sendKeys(fileToUpload)
// Wait for the upload to finish
await browser.wait(browser.ExpectedConditions.elementToBeClickable(this.getSecondStepSubmitButton()))
await browser.wait(async () => {
const actionButton = this.getSecondStepSubmitButton().element(by.css('.action-button'))
const klass = await actionButton.getAttribute('class')
return !klass.includes('disabled')
})
}
async validSecondUploadStep (videoName: string) {

View File

@ -3,7 +3,6 @@ import { NextFunction, Request, RequestHandler, Response } from 'express'
import { ValidationChain } from 'express-validator'
import { ExpressPromiseHandler } from '@server/types/express'
import { retryTransactionWrapper } from '../helpers/database-utils'
import { HttpMethod, HttpStatusCode } from '@shared/core-utils'
// Syntactic sugar to avoid try/catch in express controllers
// Thanks: https://medium.com/@Abazhenov/using-async-await-in-express-with-node-8-b8af872c0016

View File

@ -28,7 +28,7 @@ describe('Test follow constraints', function () {
let userAccessToken: string
before(async function () {
this.timeout(60000)
this.timeout(90000)
servers = await flushAndRunMultipleServers(2)