-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwdio.conf.ts
164 lines (159 loc) · 3.22 KB
/
wdio.conf.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
import type { Options } from '@wdio/types';
const currentDate = new Date().toISOString();
const buildName = `Build-${currentDate}`;
const preConfig: Options.Testrunner = {
runner: 'local',
autoCompileOpts: {
autoCompile: true,
tsNodeOpts: {
transpileOnly: true,
},
},
user: process.env.BROWSERSTACK_USERNAME,
key: process.env.BROWSERSTACK_ACCESS_KEY,
specs: ['tests/integration/browserstack/**'],
services: [
[
'browserstack',
{ browserstackLocal: true, opts: { forcelocal: false } },
],
],
maxInstances: 6,
capabilities: [
{
browserName: 'chrome',
'bstack:options': {
deviceOrientation: 'portrait',
deviceName: 'Samsung Galaxy A11',
osVersion: '10.0',
},
},
{
browserName: 'chrome',
'bstack:options': {
deviceOrientation: 'portrait',
deviceName: 'Samsung Galaxy S9',
osVersion: '8.0',
},
},
{
browserName: 'chrome',
'bstack:options': {
deviceOrientation: 'portrait',
deviceName: 'Samsung Galaxy S20',
osVersion: '10.0',
},
},
{
browserName: 'chrome',
'bstack:options': {
deviceOrientation: 'portrait',
deviceName: 'Google Pixel 3',
osVersion: '9.0',
},
},
{
browserName: 'chrome',
'bstack:options': {
deviceOrientation: 'portrait',
deviceName: 'Google Pixel 6',
osVersion: '12.0',
},
},
{
browserName: 'chrome',
'bstack:options': {
deviceOrientation: 'portrait',
deviceName: 'Google Pixel 8 Pro',
osVersion: '14.0',
},
},
{
browserName: 'chrome',
'bstack:options': {
deviceOrientation: 'portrait',
deviceName: 'Vivo Y50',
osVersion: '10.0',
},
},
{
browserName: 'chrome',
'bstack:options': {
deviceOrientation: 'portrait',
deviceName: 'Oppo Reno 3 Pro',
osVersion: '10.0',
},
},
{
browserName: 'chrome',
'bstack:options': {
deviceOrientation: 'portrait',
deviceName: 'Huawei P30',
osVersion: '9.0',
},
},
{
browserName: 'safari',
'bstack:options': {
deviceOrientation: 'portrait',
deviceName: 'iPhone X',
osVersion: '11',
},
},
{
browserName: 'safari',
'bstack:options': {
deviceOrientation: 'portrait',
deviceName: 'iPhone 11',
osVersion: '13',
},
},
{
browserName: 'chromium',
'bstack:options': {
deviceOrientation: 'portrait',
deviceName: 'iPhone 13 Pro',
osVersion: '15',
},
},
{
browserName: 'safari',
'bstack:options': {
deviceOrientation: 'portrait',
deviceName: 'iPhone 13 Pro',
osVersion: '15',
},
},
{
browserName: 'safari',
'bstack:options': {
deviceOrientation: 'portrait',
deviceName: 'iPhone SE 2020',
osVersion: '16',
},
},
] as WebdriverIO.Capabilities[],
framework: 'mocha',
reporters: ['spec'],
mochaOpts: {
ui: 'bdd',
timeout: 60000,
},
};
const browserstackConfig = {
commonCapabilities: {
'bstack:options': {
buildName,
projectName: 'Anyline Guidance SDK',
consoleLogs: 'info',
},
},
};
(preConfig.capabilities as WebdriverIO.Capabilities[]).forEach(function (
caps: WebdriverIO.Capabilities
) {
for (const i in browserstackConfig.commonCapabilities) {
caps[i] = { ...caps[i], ...browserstackConfig.commonCapabilities[i] };
}
});
export const config = preConfig;