aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/e2e/src/videos.e2e-spec.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-05-12 16:38:55 +0200
committerChocobozzz <me@florianbigard.com>2020-05-12 16:49:35 +0200
commitee68bbc481c154111c60fe80d57565d35bfac46e (patch)
tree64de79b49228feb35af486e2cf755bc7839fe148 /client/e2e/src/videos.e2e-spec.ts
parent853c3d533d287d762053e0fa6ecf6bfc3feb0051 (diff)
downloadPeerTube-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.ts33
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 @@
1import { VideoWatchPage } from './po/video-watch.po'
2import { VideoUploadPage } from './po/video-upload.po'
3import { LoginPage } from './po/login.po'
4import { browser } from 'protractor' 1import { browser } from 'protractor'
5import { VideoUpdatePage } from './po/video-update.po'
6import { MyAccountPage } from './po/my-account'
7import { AppPage } from './po/app.po' 2import { AppPage } from './po/app.po'
3import { LoginPage } from './po/login.po'
4import { MyAccountPage } from './po/my-account'
5import { VideoUpdatePage } from './po/video-update.po'
6import { VideoUploadPage } from './po/video-upload.po'
7import { VideoWatchPage } from './po/video-watch.po'
8import { isIOS, isMobileDevice, isSafari } from './utils'
8 9
9async function skipIfUploadNotSupported () { 10async 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
18async function isMobileDevice () {
19 const caps = await browser.getCapabilities()
20 return caps.get('realMobile') === 'true' || caps.get('realMobile') === true
21}
22
23async function isSafari () {
24 const caps = await browser.getCapabilities()
25 return caps.get('browserName') && caps.get('browserName').toLowerCase() === 'safari'
26}
27
28describe('Videos workflow', () => { 19describe('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