diff options
author | Chocobozzz <me@florianbigard.com> | 2020-05-12 16:38:55 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-05-12 16:49:35 +0200 |
commit | ee68bbc481c154111c60fe80d57565d35bfac46e (patch) | |
tree | 64de79b49228feb35af486e2cf755bc7839fe148 /client/e2e/src/videos.e2e-spec.ts | |
parent | 853c3d533d287d762053e0fa6ecf6bfc3feb0051 (diff) | |
download | PeerTube-ee68bbc481c154111c60fe80d57565d35bfac46e.tar.gz PeerTube-ee68bbc481c154111c60fe80d57565d35bfac46e.tar.zst PeerTube-ee68bbc481c154111c60fe80d57565d35bfac46e.zip |
Unblock ios e2e tests
Diffstat (limited to 'client/e2e/src/videos.e2e-spec.ts')
-rw-r--r-- | client/e2e/src/videos.e2e-spec.ts | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/client/e2e/src/videos.e2e-spec.ts b/client/e2e/src/videos.e2e-spec.ts index b2c5ab4c6..0cba8331f 100644 --- a/client/e2e/src/videos.e2e-spec.ts +++ b/client/e2e/src/videos.e2e-spec.ts | |||
@@ -1,10 +1,11 @@ | |||
1 | import { VideoWatchPage } from './po/video-watch.po' | ||
2 | import { VideoUploadPage } from './po/video-upload.po' | ||
3 | import { LoginPage } from './po/login.po' | ||
4 | import { browser } from 'protractor' | 1 | import { browser } from 'protractor' |
5 | import { VideoUpdatePage } from './po/video-update.po' | ||
6 | import { MyAccountPage } from './po/my-account' | ||
7 | import { AppPage } from './po/app.po' | 2 | import { AppPage } from './po/app.po' |
3 | import { LoginPage } from './po/login.po' | ||
4 | import { MyAccountPage } from './po/my-account' | ||
5 | import { VideoUpdatePage } from './po/video-update.po' | ||
6 | import { VideoUploadPage } from './po/video-upload.po' | ||
7 | import { VideoWatchPage } from './po/video-watch.po' | ||
8 | import { isIOS, isMobileDevice, isSafari } from './utils' | ||
8 | 9 | ||
9 | async function skipIfUploadNotSupported () { | 10 | async function skipIfUploadNotSupported () { |
10 | if (await isMobileDevice() || await isSafari()) { | 11 | if (await isMobileDevice() || await isSafari()) { |
@@ -15,16 +16,6 @@ async function skipIfUploadNotSupported () { | |||
15 | return false | 16 | return false |
16 | } | 17 | } |
17 | 18 | ||
18 | async function isMobileDevice () { | ||
19 | const caps = await browser.getCapabilities() | ||
20 | return caps.get('realMobile') === 'true' || caps.get('realMobile') === true | ||
21 | } | ||
22 | |||
23 | async function isSafari () { | ||
24 | const caps = await browser.getCapabilities() | ||
25 | return caps.get('browserName') && caps.get('browserName').toLowerCase() === 'safari' | ||
26 | } | ||
27 | |||
28 | describe('Videos workflow', () => { | 19 | describe('Videos workflow', () => { |
29 | let videoWatchPage: VideoWatchPage | 20 | let videoWatchPage: VideoWatchPage |
30 | let videoUploadPage: VideoUploadPage | 21 | let videoUploadPage: VideoUploadPage |
@@ -46,11 +37,15 @@ describe('Videos workflow', () => { | |||
46 | loginPage = new LoginPage() | 37 | loginPage = new LoginPage() |
47 | appPage = new AppPage() | 38 | appPage = new AppPage() |
48 | 39 | ||
49 | if (await isMobileDevice()) { | 40 | if (await isIOS()) { |
50 | console.log('Mobile device detected.') | 41 | // iOS does not seem to work with protractor |
51 | } | 42 | // https://github.com/angular/protractor/issues/2840 |
43 | browser.ignoreSynchronization = true | ||
52 | 44 | ||
53 | if (await isSafari()) { | 45 | console.log('iOS detected') |
46 | } else if (await isMobileDevice()) { | ||
47 | console.log('Android detected.') | ||
48 | } else if (await isSafari()) { | ||
54 | console.log('Safari detected.') | 49 | console.log('Safari detected.') |
55 | } | 50 | } |
56 | 51 | ||