From 7cf26f433f5d93fb5325495bc87bdef87260aada Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 8 Jun 2018 11:25:12 +0200 Subject: Fix e2e tests --- client/e2e/protractor.conf.js | 21 ++++++++++++++------- client/e2e/src/po/video-watch.po.ts | 2 +- client/e2e/src/videos.e2e-spec.ts | 4 ++-- 3 files changed, 17 insertions(+), 10 deletions(-) (limited to 'client/e2e') diff --git a/client/e2e/protractor.conf.js b/client/e2e/protractor.conf.js index 60b0ad904..c5c913a4a 100644 --- a/client/e2e/protractor.conf.js +++ b/client/e2e/protractor.conf.js @@ -18,35 +18,42 @@ exports.config = { multiCapabilities: [ { browserName: 'Chrome', - version: '66' + version: '66', + name: 'Latest Chrome Desktop' }, { browserName: 'Safari', - version: '11.1' + version: '11.1', + name: 'Safari Desktop' }, { browserName: 'Firefox', - version: '52' // ESR + version: '52', // ESR, + name: 'Old Firefox ESR Desktop' }, { browserName: 'Firefox', - version: '60' + version: '60', + name: 'Latest Firefox Desktop' }, { browserName: 'Edge', - version: '16' + version: '16', + name: 'Latest Edge Desktop' }, { browserName: 'Chrome', device: 'Google Nexus 6', realMobile: 'true', - os_version: '5.0' + os_version: '5.0', + name: 'Latest Chrome Android' }, { browserName: 'Safari', device: 'iPhone SE', realMobile: 'true', - os_version: '11.2' + os_version: '11.2', + name: 'Latest Safari iPhone' } ], diff --git a/client/e2e/src/po/video-watch.po.ts b/client/e2e/src/po/video-watch.po.ts index 5bb7e5694..fce8a6c3d 100644 --- a/client/e2e/src/po/video-watch.po.ts +++ b/client/e2e/src/po/video-watch.po.ts @@ -41,7 +41,7 @@ export class VideoWatchPage { .then(seconds => parseInt(seconds, 10)) } - async pauseVideo (isAutoplay: boolean) { + async pauseVideo (isAutoplay: boolean, isMobileDevice: boolean) { if (isAutoplay === false) { const playButton = element(by.css('.vjs-big-play-button')) await browser.wait(browser.ExpectedConditions.elementToBeClickable(playButton)) diff --git a/client/e2e/src/videos.e2e-spec.ts b/client/e2e/src/videos.e2e-spec.ts index b15c03198..3d4d46292 100644 --- a/client/e2e/src/videos.e2e-spec.ts +++ b/client/e2e/src/videos.e2e-spec.ts @@ -66,14 +66,14 @@ describe('Videos workflow', () => { }) it('Should play the video', async () => { - await videoWatchPage.pauseVideo(!isMobileDevice) + await videoWatchPage.pauseVideo(!isMobileDevice, isMobileDevice) expect(videoWatchPage.getWatchVideoPlayerCurrentTime()).toBeGreaterThanOrEqual(2) }) it('Should watch the associated embed video', async () => { await videoWatchPage.goOnAssociatedEmbed() - await videoWatchPage.pauseVideo(false) + await videoWatchPage.pauseVideo(false, isMobileDevice) expect(videoWatchPage.getWatchVideoPlayerCurrentTime()).toBeGreaterThanOrEqual(2) }) }) -- cgit v1.2.3