X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fe2e%2Fwdio.browserstack.conf.ts;h=0d68c8541bb022b27dccda1eb168c8c360459181;hb=da6898af551390245e1706291a60ba9756db0038;hp=af3a454fc6f008ee270e5d391c2f4d3fbdabc20c;hpb=3419e0e1fe8e48a08b63ca0ded31087f913eb2b6;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/e2e/wdio.browserstack.conf.ts b/client/e2e/wdio.browserstack.conf.ts index af3a454fc..0d68c8541 100644 --- a/client/e2e/wdio.browserstack.conf.ts +++ b/client/e2e/wdio.browserstack.conf.ts @@ -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,11 +17,12 @@ 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 } } @@ -55,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') }, @@ -79,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 8 Plus', '11') + ...buildBStackMobileOptions('Safari iPhone', 'iPhone 8 Plus', '12.4') }, { browserName: 'Safari', @@ -97,18 +99,25 @@ module.exports = { connectionRetryTimeout: 240000, waitforTimeout: 20000, + specs: [ + // We don't want to test "local" tests + './src/suites-all/*.e2e-spec.ts' + ], + services: [ [ 'browserstack', { browserstackLocal: true } ] ], - after: function (result) { - if (result === 0) { - browser.executeScript('browserstack_executor: {"action": "setSessionStatus", "arguments": {"status":"passed","reason": ""}}', []) - } else { - browser.executeScript('browserstack_executor: {"action": "setSessionStatus", "arguments": {"status":"failed","reason": ""}}', []) + onWorkerStart: function (_cid, capabilities) { + if (capabilities['bstack:options'].realMobile === true) { + capabilities['bstack:options'].local = false } - } + }, + + onPrepare: onBrowserStackPrepare, + onComplete: onBrowserStackComplete + } as WebdriverIO.Config }