X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fe2e%2Fsrc%2Fpo%2Fvideo-upload.po.ts;h=38395ea2f0b4ed81d44184a5aef24461f4ea924a;hb=3c065fe3b3e1385d59ad1980251d14b712648155;hp=2206b56c3faebdfcd8d96f3abc17838e76ab12c8;hpb=61cc1c03bf6f12af7c1b2e2a7d2fdaa563c37b59;p=github%2FChocobozzz%2FPeerTube.git 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' export class VideoUploadPage { async navigateTo () { - await $('.header .publish-button').click() + const publishButton = await $('.header .publish-button') + + await publishButton.waitForClickable() + await publishButton.click() await $('.upload-video-container').waitForDisplayed() } @@ -24,15 +27,17 @@ export class VideoUploadPage { // Wait for the upload to finish await browser.waitUntil(async () => { - const actionButton = this.getSecondStepSubmitButton().$('.action-button') + const warning = await $('=Publish will be available when upload is finished').isDisplayed() + const progress = await $('.progress-bar=100%').isDisplayed() - const klass = await actionButton.getAttribute('class') - return !klass.includes('disabled') + return !warning && progress }) } - setAsNSFW () { - return getCheckbox('nsfw').click() + async setAsNSFW () { + const checkbox = await getCheckbox('nsfw') + + return checkbox.click() } async validSecondUploadStep (videoName: string) { @@ -51,6 +56,10 @@ export class VideoUploadPage { return selectCustomSelect('privacy', 'Public') } + setAsPrivate () { + return selectCustomSelect('privacy', 'Private') + } + private getSecondStepSubmitButton () { return $('.submit-container my-button') }