diff options
Diffstat (limited to 'client/e2e/src/po/video-upload.po.ts')
-rw-r--r-- | client/e2e/src/po/video-upload.po.ts | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/client/e2e/src/po/video-upload.po.ts b/client/e2e/src/po/video-upload.po.ts index 2206b56c3..38395ea2f 100644 --- a/client/e2e/src/po/video-upload.po.ts +++ b/client/e2e/src/po/video-upload.po.ts | |||
@@ -3,7 +3,10 @@ import { getCheckbox, selectCustomSelect } from '../utils' | |||
3 | 3 | ||
4 | export class VideoUploadPage { | 4 | export class VideoUploadPage { |
5 | async navigateTo () { | 5 | async navigateTo () { |
6 | await $('.header .publish-button').click() | 6 | const publishButton = await $('.header .publish-button') |
7 | |||
8 | await publishButton.waitForClickable() | ||
9 | await publishButton.click() | ||
7 | 10 | ||
8 | await $('.upload-video-container').waitForDisplayed() | 11 | await $('.upload-video-container').waitForDisplayed() |
9 | } | 12 | } |
@@ -24,15 +27,17 @@ export class VideoUploadPage { | |||
24 | 27 | ||
25 | // Wait for the upload to finish | 28 | // Wait for the upload to finish |
26 | await browser.waitUntil(async () => { | 29 | await browser.waitUntil(async () => { |
27 | const actionButton = this.getSecondStepSubmitButton().$('.action-button') | 30 | const warning = await $('=Publish will be available when upload is finished').isDisplayed() |
31 | const progress = await $('.progress-bar=100%').isDisplayed() | ||
28 | 32 | ||
29 | const klass = await actionButton.getAttribute('class') | 33 | return !warning && progress |
30 | return !klass.includes('disabled') | ||
31 | }) | 34 | }) |
32 | } | 35 | } |
33 | 36 | ||
34 | setAsNSFW () { | 37 | async setAsNSFW () { |
35 | return getCheckbox('nsfw').click() | 38 | const checkbox = await getCheckbox('nsfw') |
39 | |||
40 | return checkbox.click() | ||
36 | } | 41 | } |
37 | 42 | ||
38 | async validSecondUploadStep (videoName: string) { | 43 | async validSecondUploadStep (videoName: string) { |
@@ -51,6 +56,10 @@ export class VideoUploadPage { | |||
51 | return selectCustomSelect('privacy', 'Public') | 56 | return selectCustomSelect('privacy', 'Public') |
52 | } | 57 | } |
53 | 58 | ||
59 | setAsPrivate () { | ||
60 | return selectCustomSelect('privacy', 'Private') | ||
61 | } | ||
62 | |||
54 | private getSecondStepSubmitButton () { | 63 | private getSecondStepSubmitButton () { |
55 | return $('.submit-container my-button') | 64 | return $('.submit-container my-button') |
56 | } | 65 | } |