]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/e2e/src/po/video-watch.po.ts
Merge branch 'release/4.2.0' into develop
[github/Chocobozzz/PeerTube.git] / client / e2e / src / po / video-watch.po.ts
index 41425f4d76ce726009e70d1ad2791cdfa66fc407..65bf218370a27ec4a80f9d7a9e078a65eb785dce 100644 (file)
@@ -21,12 +21,39 @@ 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()
+  }
+
+  isPrivacyWarningDisplayed () {
+    return $('my-privacy-concerns').isDisplayed()
+  }
+
   async goOnAssociatedEmbed () {
     let url = await browser.getUrl()
     url = url.replace('/w/', '/videos/embed/')
     url = url.replace(':3333', ':9001')
 
-    return go(url)
+    await go(url)
+    await $('.vjs-big-play-button').waitForDisplayed()
+  }
+
+  isEmbedWarningDisplayed () {
+    return $('.peertube-dock-description').isDisplayed()
   }
 
   goOnP2PMediaLoaderEmbed () {
@@ -38,10 +65,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 +111,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 () => {