From 84c7cde6e81426a42e7aa29187b473bc89f1c8f6 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 21 Feb 2019 11:24:07 +0100 Subject: Update E2E tests --- client/e2e/src/videos.e2e-spec.ts | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) (limited to 'client/e2e/src/videos.e2e-spec.ts') diff --git a/client/e2e/src/videos.e2e-spec.ts b/client/e2e/src/videos.e2e-spec.ts index 606b6ac5d..7f8ba71b1 100644 --- a/client/e2e/src/videos.e2e-spec.ts +++ b/client/e2e/src/videos.e2e-spec.ts @@ -12,8 +12,6 @@ describe('Videos workflow', () => { let isSafari = false beforeEach(async () => { - await browser.waitForAngularEnabled(false) - videoWatchPage = new VideoWatchPage() pageUploadPage = new VideoUploadPage() loginPage = new LoginPage() @@ -21,6 +19,14 @@ describe('Videos workflow', () => { const caps = await browser.getCapabilities() isMobileDevice = caps.get('realMobile') === 'true' || caps.get('realMobile') === true isSafari = caps.get('browserName') && caps.get('browserName').toLowerCase() === 'safari' + + if (isMobileDevice) { + console.log('Mobile device detected.') + } + + if (isSafari) { + console.log('Safari detected.') + } }) it('Should log in', () => { @@ -66,14 +72,29 @@ describe('Videos workflow', () => { }) it('Should play the video', async () => { - await videoWatchPage.pauseVideo(!isMobileDevice, isMobileDevice) + await videoWatchPage.playAndPauseVideo(true, isMobileDevice) expect(videoWatchPage.getWatchVideoPlayerCurrentTime()).toBeGreaterThanOrEqual(2) }) it('Should watch the associated embed video', async () => { + await browser.waitForAngularEnabled(false) + await videoWatchPage.goOnAssociatedEmbed() - await videoWatchPage.pauseVideo(false, isMobileDevice) + await videoWatchPage.playAndPauseVideo(false, isMobileDevice) expect(videoWatchPage.getWatchVideoPlayerCurrentTime()).toBeGreaterThanOrEqual(2) + + await browser.waitForAngularEnabled(true) + }) + + it('Should watch the p2p media loader embed video', async () => { + await browser.waitForAngularEnabled(false) + + await videoWatchPage.goOnP2PMediaLoaderEmbed() + + await videoWatchPage.playAndPauseVideo(false, isMobileDevice) + expect(videoWatchPage.getWatchVideoPlayerCurrentTime()).toBeGreaterThanOrEqual(2) + + await browser.waitForAngularEnabled(true) }) }) -- cgit v1.2.3