aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/e2e/src/po/video-upload.po.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-10-28 11:19:54 +0200
committerChocobozzz <me@florianbigard.com>2022-10-28 15:22:40 +0200
commit814e9e07ba65446af8446dbbd2f0d70c85fd1b33 (patch)
tree9c1f130d4a773208c5bdf33ec942be060e3c3ad2 /client/e2e/src/po/video-upload.po.ts
parent672e185bf3004b46552c227483ffd2802ebf6844 (diff)
downloadPeerTube-814e9e07ba65446af8446dbbd2f0d70c85fd1b33.tar.gz
PeerTube-814e9e07ba65446af8446dbbd2f0d70c85fd1b33.tar.zst
PeerTube-814e9e07ba65446af8446dbbd2f0d70c85fd1b33.zip
Improve E2E tests
Add tests for private video static endpoints Fix tests for local firefox
Diffstat (limited to 'client/e2e/src/po/video-upload.po.ts')
-rw-r--r--client/e2e/src/po/video-upload.po.ts10
1 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 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 {
11 await $('.upload-video-container').waitForDisplayed() 11 await $('.upload-video-container').waitForDisplayed()
12 } 12 }
13 13
14 async uploadVideo () { 14 async uploadVideo (fixtureName: 'video.mp4' | 'video2.mp4' | 'video3.mp4') {
15 const fileToUpload = join(__dirname, '../../fixtures/video.mp4') 15 const fileToUpload = join(__dirname, '../../fixtures/' + fixtureName)
16 const fileInputSelector = '.upload-video-container input[type=file]' 16 const fileInputSelector = '.upload-video-container input[type=file]'
17 const parentFileInput = '.upload-video-container .button-file' 17 const parentFileInput = '.upload-video-container .button-file'
18 18
@@ -36,6 +36,7 @@ export class VideoUploadPage {
36 36
37 async setAsNSFW () { 37 async setAsNSFW () {
38 const checkbox = await getCheckbox('nsfw') 38 const checkbox = await getCheckbox('nsfw')
39 await checkbox.waitForClickable()
39 40
40 return checkbox.click() 41 return checkbox.click()
41 } 42 }
@@ -45,7 +46,10 @@ export class VideoUploadPage {
45 await nameInput.clearValue() 46 await nameInput.clearValue()
46 await nameInput.setValue(videoName) 47 await nameInput.setValue(videoName)
47 48
48 await this.getSecondStepSubmitButton().click() 49 const button = this.getSecondStepSubmitButton()
50 await button.waitForClickable()
51
52 await button.click()
49 53
50 return browser.waitUntil(async () => { 54 return browser.waitUntil(async () => {
51 return (await browser.getUrl()).includes('/w/') 55 return (await browser.getUrl()).includes('/w/')