From 814e9e07ba65446af8446dbbd2f0d70c85fd1b33 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 28 Oct 2022 11:19:54 +0200 Subject: Improve E2E tests Add tests for private video static endpoints Fix tests for local firefox --- client/e2e/src/po/video-upload.po.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'client/e2e/src/po/video-upload.po.ts') diff --git a/client/e2e/src/po/video-upload.po.ts b/client/e2e/src/po/video-upload.po.ts index 8605139c9..7e7989763 100644 --- a/client/e2e/src/po/video-upload.po.ts +++ b/client/e2e/src/po/video-upload.po.ts @@ -11,8 +11,8 @@ export class VideoUploadPage { await $('.upload-video-container').waitForDisplayed() } - async uploadVideo () { - const fileToUpload = join(__dirname, '../../fixtures/video.mp4') + async uploadVideo (fixtureName: 'video.mp4' | 'video2.mp4' | 'video3.mp4') { + const fileToUpload = join(__dirname, '../../fixtures/' + fixtureName) const fileInputSelector = '.upload-video-container input[type=file]' const parentFileInput = '.upload-video-container .button-file' @@ -36,6 +36,7 @@ export class VideoUploadPage { async setAsNSFW () { const checkbox = await getCheckbox('nsfw') + await checkbox.waitForClickable() return checkbox.click() } @@ -45,7 +46,10 @@ export class VideoUploadPage { await nameInput.clearValue() await nameInput.setValue(videoName) - await this.getSecondStepSubmitButton().click() + const button = this.getSecondStepSubmitButton() + await button.waitForClickable() + + await button.click() return browser.waitUntil(async () => { return (await browser.getUrl()).includes('/w/') -- cgit v1.2.3