1 import { config as mainConfig } from './wdio.main.conf'
3 const user = process.env.BROWSERSTACK_USER
4 const key = process.env.BROWSERSTACK_KEY
6 if (!user) throw new Error('Miss browser stack user')
7 if (!key) throw new Error('Miss browser stack key')
9 function buildMainOptions (sessionName: string) {
11 projectName: 'PeerTube',
12 buildName: 'Main E2E - ' + new Date().toISOString().split('T')[0],
19 function buildBStackDesktopOptions (sessionName: string, resolution?: string) {
22 ...buildMainOptions(sessionName),
29 function buildBStackMobileOptions (sessionName: string, deviceName: string, osVersion: string, appiumVersion?: string) {
32 ...buildMainOptions(sessionName),
54 browserName: 'Chrome',
56 ...buildBStackDesktopOptions('Latest Chrome Desktop', '1280x1024')
59 browserName: 'Firefox',
60 browserVersion: '68', // ESR
62 ...buildBStackDesktopOptions('Firefox ESR Desktop', '1280x1024')
65 browserName: 'Safari',
66 browserVersion: '11.1',
68 ...buildBStackDesktopOptions('Safari Desktop', '1280x1024')
71 browserName: 'Firefox',
73 ...buildBStackDesktopOptions('Firefox Latest', '1280x1024')
78 ...buildBStackDesktopOptions('Edge Latest', '1280x1024')
82 browserName: 'Chrome',
84 ...buildBStackMobileOptions('Latest Chrome Android', 'Samsung Galaxy S6', '5.0')
87 browserName: 'Safari',
89 ...buildBStackMobileOptions('Safari iPhone', 'iPhone SE', '11')
92 browserName: 'Safari',
94 ...buildBStackMobileOptions('Safari iPad', 'iPad 7th', '13')
98 host: 'hub-cloud.browserstack.com',
99 connectionRetryTimeout: 240000,
100 waitforTimeout: 20000,
103 // We don't want to test "local" tests
104 './src/suites-all/*.e2e-spec.ts'
109 'browserstack', { browserstackLocal: true }
113 onWorkerStart: function (_cid, capabilities) {
114 if (capabilities['bstack:options'].realMobile === true) {
115 capabilities['bstack:options'].local = false
118 } as WebdriverIO.Config