Clean up E2E tests
authorChocobozzz <me@florianbigard.com>
Thu, 24 May 2018 12:33:58 +0000 (14:33 +0200)
committerChocobozzz <me@florianbigard.com>
Thu, 24 May 2018 12:35:24 +0000 (14:35 +0200)
client/e2e/src/po/video-watch.po.ts
client/e2e/src/videos.e2e-spec.ts

index ec3d16c3b2b2b309aee36beccc3c5c6afd8d8187..5bb7e5694163a945b2c8fa80e1423258c78000a0 100644 (file)
@@ -1,4 +1,4 @@
-import { by, element, browser } from 'protractor'
+import { browser, by, element } from 'protractor'
 
 export class VideoWatchPage {
   async goOnVideosList (isMobileDevice: boolean, isSafari: boolean) {
@@ -41,18 +41,13 @@ export class VideoWatchPage {
       .then(seconds => parseInt(seconds, 10))
   }
 
-  async pauseVideo (isAutoplay: boolean, isDesktopSafari: boolean) {
+  async pauseVideo (isAutoplay: boolean) {
     if (isAutoplay === false) {
       const playButton = element(by.css('.vjs-big-play-button'))
       await browser.wait(browser.ExpectedConditions.elementToBeClickable(playButton))
       await playButton.click()
     }
 
-    // if (isDesktopSafari === true) {
-    //   await browser.sleep(1000)
-    //   await element(by.css('.vjs-play-control')).click()
-    // }
-
     await browser.sleep(1000)
     await browser.wait(browser.ExpectedConditions.invisibilityOf(element(by.css('.vjs-loading-spinner'))))
 
index 16fe6b70d9253b901baa21f51bb80064057c1456..b15c031987268bdf29e8b27d9976374b2d51a6e7 100644 (file)
@@ -66,14 +66,14 @@ describe('Videos workflow', () => {
   })
 
   it('Should play the video', async () => {
-    await videoWatchPage.pauseVideo(!isMobileDevice, isSafari && isMobileDevice === false)
+    await videoWatchPage.pauseVideo(!isMobileDevice)
     expect(videoWatchPage.getWatchVideoPlayerCurrentTime()).toBeGreaterThanOrEqual(2)
   })
 
   it('Should watch the associated embed video', async () => {
     await videoWatchPage.goOnAssociatedEmbed()
 
-    await videoWatchPage.pauseVideo(false, isSafari && isMobileDevice === false)
+    await videoWatchPage.pauseVideo(false)
     expect(videoWatchPage.getWatchVideoPlayerCurrentTime()).toBeGreaterThanOrEqual(2)
   })
 })