]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/e2e/src/po/player.po.ts
Use round for views stats
[github/Chocobozzz/PeerTube.git] / client / e2e / src / po / player.po.ts
index 372e8ab20f709081bb3df83980ef1f66a697a602..a20e683bceb33767a13b0cb4c10c8a28b0a96105 100644 (file)
@@ -15,6 +15,9 @@ export class PlayerPage {
 
   waitUntilPlaylistInfo (text: string, maxTime: number) {
     return browser.waitUntil(async () => {
+      // Without this we have issues on iphone
+      await $('.video-js').click()
+
       return (await $('.video-js .vjs-playlist-info').getText()).includes(text)
     }, { timeout: maxTime })
   }
@@ -32,7 +35,7 @@ export class PlayerPage {
 
     // Autoplay is disabled on iOS and Safari
     if (isIOS() || isSafari() || isMobileDevice()) {
-      // We can't play the video using protractor if it is not muted
+      // We can't play the video if it is not muted
       await browser.execute(`document.querySelector('video').muted = true`)
       await this.clickOnPlayButton()
     } else if (isAutoplay === false) {
@@ -42,7 +45,7 @@ export class PlayerPage {
     await browserSleep(2000)
 
     await browser.waitUntil(async () => {
-      return (await this.getWatchVideoPlayerCurrentTime()) >= 2
+      return (await this.getWatchVideoPlayerCurrentTime()) >= waitUntilSec
     })
 
     await videojsElem().click()