From 3cf68b869decf07ff7435fe1436d4f3134df1bf4 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 14 Dec 2021 17:17:01 +0100 Subject: Ability for admins to set default upload values --- client/e2e/src/po/video-watch.po.ts | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) (limited to 'client/e2e/src/po') diff --git a/client/e2e/src/po/video-watch.po.ts b/client/e2e/src/po/video-watch.po.ts index 41425f4d7..1406c971a 100644 --- a/client/e2e/src/po/video-watch.po.ts +++ b/client/e2e/src/po/video-watch.po.ts @@ -21,6 +21,24 @@ export class VideoWatchPage { return this.getVideoNameElement().then(e => e.getText()) } + getPrivacy () { + return $('.attribute-privacy .attribute-value').getText() + } + + getLicence () { + return $('.attribute-licence .attribute-value').getText() + } + + async isDownloadEnabled () { + await this.clickOnMoreDropdownIcon() + + return $('.dropdown-item .icon-download').isExisting() + } + + areCommentsEnabled () { + return $('my-video-comment-add').isExisting() + } + async goOnAssociatedEmbed () { let url = await browser.getUrl() url = url.replace('/w/', '/videos/embed/') @@ -38,10 +56,8 @@ export class VideoWatchPage { } async clickOnUpdate () { - const dropdown = $('my-video-actions-dropdown .action-button') - await dropdown.click() + await this.clickOnMoreDropdownIcon() - await $('.dropdown-menu.show .dropdown-item').waitForDisplayed() const items = await $$('.dropdown-menu.show .dropdown-item') for (const item of items) { @@ -86,6 +102,13 @@ export class VideoWatchPage { }, { timeout: maxTime }) } + async clickOnMoreDropdownIcon () { + const dropdown = $('my-video-actions-dropdown .action-button') + await dropdown.click() + + await $('.dropdown-menu.show .dropdown-item').waitForDisplayed() + } + private async getVideoNameElement () { // We have 2 video info name block, pick the first that is not empty const elem = async () => { -- cgit v1.2.3