Fix safari e2e tests
authorChocobozzz <me@florianbigard.com>
Mon, 11 May 2020 08:48:42 +0000 (10:48 +0200)
committerChocobozzz <me@florianbigard.com>
Mon, 11 May 2020 08:48:42 +0000 (10:48 +0200)
client/e2e/fixtures/video.mp4
client/e2e/protractor.conf.js
client/e2e/src/po/video-watch.po.ts

index c9ba8fd04bd2c56cd726710859af83d84dc65fde..23000cfc12bff956ba1b0c79bc250c3bca899e1a 100644 (file)
Binary files a/client/e2e/fixtures/video.mp4 and b/client/e2e/fixtures/video.mp4 differ
index 5682de829cd357c94070b21b2a4e1422e919030b..0dd1f6ee5c29f96a101b31bc68598008d8517fb4 100644 (file)
@@ -18,17 +18,17 @@ exports.config = {
   },
 
   multiCapabilities: [
-    {
-      browserName: 'Chrome',
-      name: 'Latest Chrome Desktop',
-      resolution: '1280x1024'
-    },
     {
       browserName: 'Safari',
       version: '11.1',
       name: 'Safari Desktop',
       resolution: '1280x1024'
     },
+    {
+      browserName: 'Chrome',
+      name: 'Latest Chrome Desktop',
+      resolution: '1280x1024'
+    },
     {
       browserName: 'Firefox',
       version: '60', // ESR,
@@ -61,7 +61,7 @@ exports.config = {
     }
   ],
 
-  // maxSessions: 1,
+  maxSessions: 1,
   // BrowserStack compatible ports: https://www.browserstack.com/question/664
   baseUrl: 'http://localhost:3333/',
   framework: 'jasmine',
index 4a36fce62d1407151114814932fee3fa07d0e105..c5e37e6deeeb079ffba5138b6a5bc08a73932008 100644 (file)
@@ -84,12 +84,13 @@ export class VideoWatchPage {
   }
 
   async clickOnFirstVideo () {
-    const video = element.all(by.css('.videos .video-miniature .video-miniature-name')).first()
+    const video = element.all(by.css('.videos .video-miniature .video-thumbnail')).first()
+    const videoName = element.all(by.css('.videos .video-miniature .video-miniature-name')).first()
 
     // Don't know why but the expectation fails on Safari
     await browser.wait(browser.ExpectedConditions.elementToBeClickable(video))
 
-    const textToReturn = video.getText()
+    const textToReturn = videoName.getText()
     await video.click()
 
     await browser.wait(browser.ExpectedConditions.urlContains('/watch/'))