From 61c299eb24016dc6c76cf0c7a6fc6b05ccb654fc Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 7 Aug 2020 14:03:46 +0200 Subject: Add ipad e2e test --- client/e2e/protractor.conf.js | 7 +++++++ client/e2e/src/po/player.po.ts | 4 ++-- client/e2e/src/videos.e2e-spec.ts | 8 ++++++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/client/e2e/protractor.conf.js b/client/e2e/protractor.conf.js index 3797961ff..47585afc5 100644 --- a/client/e2e/protractor.conf.js +++ b/client/e2e/protractor.conf.js @@ -61,6 +61,13 @@ exports.config = { realMobile: 'true', os_version: '12', name: 'Safari iPhone' + }, + { + browserName: 'Safari', + device: 'iPad 7th', + realMobile: 'true', + os_version: '13', + name: 'Safari iPad' } ], diff --git a/client/e2e/src/po/player.po.ts b/client/e2e/src/po/player.po.ts index c03f20c68..bc61704fb 100644 --- a/client/e2e/src/po/player.po.ts +++ b/client/e2e/src/po/player.po.ts @@ -28,11 +28,11 @@ export class PlayerPage { const videojsEl = element(by.css('div.video-js')) await browser.wait(browser.ExpectedConditions.elementToBeClickable(videojsEl)) - // On Android, we need to click twice on "play" (BrowserStack particularity) if (await isMobileDevice()) { await browserSleep(5000) - await videojsEl.click() + // On Android, we need to click twice on "play" (BrowserStack particularity) + if (!await isIOS()) await videojsEl.click() } browser.ignoreSynchronization = false diff --git a/client/e2e/src/videos.e2e-spec.ts b/client/e2e/src/videos.e2e-spec.ts index 97d1b827c..d8af1885f 100644 --- a/client/e2e/src/videos.e2e-spec.ts +++ b/client/e2e/src/videos.e2e-spec.ts @@ -93,8 +93,12 @@ describe('Videos workflow', () => { it('Should go on video watch page', async () => { let videoNameToExcept = videoName - if (await isMobileDevice() || await isSafari()) videoNameToExcept = await videoWatchPage.clickOnFirstVideo() - else await videoWatchPage.clickOnVideo(videoName) + if (await isMobileDevice() || await isSafari()) { + await browser.get('https://peertube2.cpy.re/videos/watch/122d093a-1ede-43bd-bd34-59d2931ffc5e') + videoNameToExcept = 'E2E tests' + } else { + await videoWatchPage.clickOnVideo(videoName) + } return videoWatchPage.waitWatchVideoName(videoNameToExcept, await isMobileDevice(), await isSafari()) }) -- cgit v1.2.3