diff options
Diffstat (limited to 'client/e2e/wdio.browserstack.conf.ts')
-rw-r--r-- | client/e2e/wdio.browserstack.conf.ts | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/client/e2e/wdio.browserstack.conf.ts b/client/e2e/wdio.browserstack.conf.ts index af3a454fc..43614a862 100644 --- a/client/e2e/wdio.browserstack.conf.ts +++ b/client/e2e/wdio.browserstack.conf.ts | |||
@@ -26,14 +26,16 @@ function buildBStackDesktopOptions (sessionName: string, resolution?: string) { | |||
26 | } | 26 | } |
27 | } | 27 | } |
28 | 28 | ||
29 | function buildBStackMobileOptions (sessionName: string, deviceName: string, osVersion: string) { | 29 | function buildBStackMobileOptions (sessionName: string, deviceName: string, osVersion: string, appiumVersion?: string) { |
30 | return { | 30 | return { |
31 | 'bstack:options': { | 31 | 'bstack:options': { |
32 | ...buildMainOptions(sessionName), | 32 | ...buildMainOptions(sessionName), |
33 | 33 | ||
34 | realMobile: true, | 34 | realMobile: true, |
35 | osVersion, | 35 | osVersion, |
36 | deviceName | 36 | deviceName, |
37 | |||
38 | appiumVersion | ||
37 | } | 39 | } |
38 | } | 40 | } |
39 | } | 41 | } |
@@ -84,7 +86,7 @@ module.exports = { | |||
84 | { | 86 | { |
85 | browserName: 'Safari', | 87 | browserName: 'Safari', |
86 | 88 | ||
87 | ...buildBStackMobileOptions('Safari iPhone', 'iPhone 8 Plus', '11') | 89 | ...buildBStackMobileOptions('Safari iPhone', 'iPhone SE', '11') |
88 | }, | 90 | }, |
89 | { | 91 | { |
90 | browserName: 'Safari', | 92 | browserName: 'Safari', |
@@ -97,17 +99,20 @@ module.exports = { | |||
97 | connectionRetryTimeout: 240000, | 99 | connectionRetryTimeout: 240000, |
98 | waitforTimeout: 20000, | 100 | waitforTimeout: 20000, |
99 | 101 | ||
102 | specs: [ | ||
103 | // We don't want to test "local" tests | ||
104 | './src/suites-all/*.e2e-spec.ts' | ||
105 | ], | ||
106 | |||
100 | services: [ | 107 | services: [ |
101 | [ | 108 | [ |
102 | 'browserstack', { browserstackLocal: true } | 109 | 'browserstack', { browserstackLocal: true } |
103 | ] | 110 | ] |
104 | ], | 111 | ], |
105 | 112 | ||
106 | after: function (result) { | 113 | onWorkerStart: function (_cid, capabilities) { |
107 | if (result === 0) { | 114 | if (capabilities['bstack:options'].realMobile === true) { |
108 | browser.executeScript('browserstack_executor: {"action": "setSessionStatus", "arguments": {"status":"passed","reason": ""}}', []) | 115 | capabilities['bstack:options'].local = false |
109 | } else { | ||
110 | browser.executeScript('browserstack_executor: {"action": "setSessionStatus", "arguments": {"status":"failed","reason": ""}}', []) | ||
111 | } | 116 | } |
112 | } | 117 | } |
113 | } as WebdriverIO.Config | 118 | } as WebdriverIO.Config |