From 3a1a00a4af866caa96355c6702bbf805685d0973 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 11 May 2020 10:48:42 +0200 Subject: [PATCH] Fix safari e2e tests --- client/e2e/fixtures/video.mp4 | Bin 619477 -> 619477 bytes client/e2e/protractor.conf.js | 12 ++++++------ client/e2e/src/po/video-watch.po.ts | 5 +++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/client/e2e/fixtures/video.mp4 b/client/e2e/fixtures/video.mp4 index c9ba8fd04bd2c56cd726710859af83d84dc65fde..23000cfc12bff956ba1b0c79bc250c3bca899e1a 100644 GIT binary patch delta 52 xcmccmT=nX6)eQ<3j0Vk$7VU}_j6lo;#LPg<0>rF9%m&2lK+LgS(Smb}H2}hm4+H=J delta 52 xcmccmT=nX6)eQ<3jF!!c7VU}_j6lo;#LPg<0>rF9%m&2lK+LgS(Smb}H2}m14-EhS diff --git a/client/e2e/protractor.conf.js b/client/e2e/protractor.conf.js index 5682de829..0dd1f6ee5 100644 --- a/client/e2e/protractor.conf.js +++ b/client/e2e/protractor.conf.js @@ -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', diff --git a/client/e2e/src/po/video-watch.po.ts b/client/e2e/src/po/video-watch.po.ts index 4a36fce62..c5e37e6de 100644 --- a/client/e2e/src/po/video-watch.po.ts +++ b/client/e2e/src/po/video-watch.po.ts @@ -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/'))