]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/e2e/wdio.browserstack.conf.ts
Update translations
[github/Chocobozzz/PeerTube.git] / client / e2e / wdio.browserstack.conf.ts
index 43614a862dd8cc375671c9be4e2b20bcc828137e..0d68c8541bb022b27dccda1eb168c8c360459181 100644 (file)
@@ -1,3 +1,4 @@
+import { onBrowserStackComplete, onBrowserStackPrepare } from './src/utils'
 import { config as mainConfig } from './wdio.main.conf'
 
 const user = process.env.BROWSERSTACK_USER
@@ -16,26 +17,25 @@ function buildMainOptions (sessionName: string) {
   }
 }
 
-function buildBStackDesktopOptions (sessionName: string, resolution?: string) {
+function buildBStackDesktopOptions (sessionName: string, resolution: string, os?: string) {
   return {
     'bstack:options': {
       ...buildMainOptions(sessionName),
 
+      os,
       resolution
     }
   }
 }
 
-function buildBStackMobileOptions (sessionName: string, deviceName: string, osVersion: string, appiumVersion?: string) {
+function buildBStackMobileOptions (sessionName: string, deviceName: string, osVersion: string) {
   return {
     'bstack:options': {
       ...buildMainOptions(sessionName),
 
       realMobile: true,
       osVersion,
-      deviceName,
-
-      appiumVersion
+      deviceName
     }
   }
 }
@@ -57,13 +57,13 @@ module.exports = {
       },
       {
         browserName: 'Firefox',
-        browserVersion: '68', // ESR
+        browserVersion: '78', // Very old ESR
 
-        ...buildBStackDesktopOptions('Firefox ESR Desktop', '1280x1024')
+        ...buildBStackDesktopOptions('Firefox ESR Desktop', '1280x1024', 'Windows')
       },
       {
         browserName: 'Safari',
-        browserVersion: '11.1',
+        browserVersion: '12.1',
 
         ...buildBStackDesktopOptions('Safari Desktop', '1280x1024')
       },
@@ -81,12 +81,12 @@ module.exports = {
       {
         browserName: 'Chrome',
 
-        ...buildBStackMobileOptions('Latest Chrome Android', 'Samsung Galaxy S6', '5.0')
+        ...buildBStackMobileOptions('Latest Chrome Android', 'Samsung Galaxy S8', '7.0')
       },
       {
         browserName: 'Safari',
 
-        ...buildBStackMobileOptions('Safari iPhone', 'iPhone SE', '11')
+        ...buildBStackMobileOptions('Safari iPhone', 'iPhone 8 Plus', '12.4')
       },
       {
         browserName: 'Safari',
@@ -114,6 +114,10 @@ module.exports = {
       if (capabilities['bstack:options'].realMobile === true) {
         capabilities['bstack:options'].local = false
       }
-    }
+    },
+
+    onPrepare: onBrowserStackPrepare,
+    onComplete: onBrowserStackComplete
+
   } as WebdriverIO.Config
 }