@wdio/browserstack-service 7.33.0 → 7.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/Percy/Percy-Handler.d.ts +34 -0
- package/build/Percy/Percy-Handler.d.ts.map +1 -0
- package/build/Percy/Percy-Handler.js +187 -0
- package/build/Percy/Percy.d.ts +24 -0
- package/build/Percy/Percy.d.ts.map +1 -0
- package/build/Percy/Percy.js +128 -0
- package/build/Percy/PercyBinary.d.ts +17 -0
- package/build/Percy/PercyBinary.d.ts.map +1 -0
- package/build/Percy/PercyBinary.js +151 -0
- package/build/Percy/PercyCaptureMap.d.ts +9 -0
- package/build/Percy/PercyCaptureMap.d.ts.map +1 -0
- package/build/Percy/PercyCaptureMap.js +46 -0
- package/build/Percy/PercyHelper.d.ts +8 -0
- package/build/Percy/PercyHelper.d.ts.map +1 -0
- package/build/Percy/PercyHelper.js +78 -0
- package/build/Percy/PercyLogger.d.ts +15 -0
- package/build/Percy/PercyLogger.d.ts.map +1 -0
- package/build/Percy/PercyLogger.js +76 -0
- package/build/Percy/PercySDK.d.ts +4 -0
- package/build/Percy/PercySDK.d.ts.map +1 -0
- package/build/Percy/PercySDK.js +42 -0
- package/build/cleanup.d.ts +5 -0
- package/build/cleanup.d.ts.map +1 -0
- package/build/cleanup.js +23 -0
- package/build/constants.d.ts +3 -0
- package/build/constants.d.ts.map +1 -1
- package/build/constants.js +12 -1
- package/build/index.d.ts +2 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +15 -1
- package/build/insights-handler.d.ts.map +1 -1
- package/build/insights-handler.js +1 -0
- package/build/launcher.d.ts +9 -2
- package/build/launcher.d.ts.map +1 -1
- package/build/launcher.js +80 -0
- package/build/request-handler.d.ts +1 -0
- package/build/request-handler.d.ts.map +1 -1
- package/build/request-handler.js +5 -0
- package/build/service.d.ts +3 -0
- package/build/service.d.ts.map +1 -1
- package/build/service.js +64 -17
- package/build/types.d.ts +24 -0
- package/build/types.d.ts.map +1 -1
- package/build/util.d.ts +18 -1
- package/build/util.d.ts.map +1 -1
- package/build/util.js +159 -12
- package/package.json +7 -4
package/build/service.js
CHANGED
|
@@ -12,6 +12,7 @@ const util_1 = require("./util");
|
|
|
12
12
|
const reporter_1 = __importDefault(require("./reporter"));
|
|
13
13
|
const performance_tester_1 = __importDefault(require("./performance-tester"));
|
|
14
14
|
const accessibility_handler_1 = __importDefault(require("./accessibility-handler"));
|
|
15
|
+
const Percy_Handler_1 = __importDefault(require("./Percy/Percy-Handler"));
|
|
15
16
|
const log = (0, logger_1.default)('@wdio/browserstack-service');
|
|
16
17
|
class BrowserstackService {
|
|
17
18
|
constructor(options, _caps, _config) {
|
|
@@ -28,18 +29,26 @@ class BrowserstackService {
|
|
|
28
29
|
this._config || (this._config = this._options);
|
|
29
30
|
this._observability = this._options.testObservability;
|
|
30
31
|
this._accessibility = this._options.accessibility;
|
|
32
|
+
this._percy = this._options.percy;
|
|
33
|
+
this._turboScale = this._options.turboScale;
|
|
31
34
|
if (this._observability) {
|
|
32
35
|
(_a = this._config.reporters) === null || _a === void 0 ? void 0 : _a.push(reporter_1.default);
|
|
33
36
|
if (process.env.BROWSERSTACK_O11Y_PERF_MEASUREMENT) {
|
|
34
37
|
performance_tester_1.default.startMonitoring('performance-report-service.csv');
|
|
35
38
|
}
|
|
36
39
|
}
|
|
40
|
+
if (process.env.BROWSERSTACK_TURBOSCALE) {
|
|
41
|
+
this._turboScale = process.env.BROWSERSTACK_TURBOSCALE === 'true';
|
|
42
|
+
}
|
|
37
43
|
// Cucumber specific
|
|
38
44
|
const strict = Boolean(this._config.cucumberOpts && this._config.cucumberOpts.strict);
|
|
39
45
|
// See https://github.com/cucumber/cucumber-js/blob/master/src/runtime/index.ts#L136
|
|
40
46
|
if (strict) {
|
|
41
47
|
this._failureStatuses.push('pending');
|
|
42
48
|
}
|
|
49
|
+
if (process.env.WDIO_WORKER_ID === process.env.BEST_PLATFORM_CID) {
|
|
50
|
+
process.env.PERCY_SNAPSHOT = 'true';
|
|
51
|
+
}
|
|
43
52
|
}
|
|
44
53
|
_updateCaps(fn) {
|
|
45
54
|
const multiRemoteCap = this._caps;
|
|
@@ -69,30 +78,47 @@ class BrowserstackService {
|
|
|
69
78
|
if (this._isAppAutomate()) {
|
|
70
79
|
this._sessionBaseUrl = 'https://api-cloud.browserstack.com/app-automate/sessions';
|
|
71
80
|
}
|
|
81
|
+
if (this._turboScale) {
|
|
82
|
+
this._sessionBaseUrl = 'https://api.browserstack.com/automate-turboscale/v1/sessions';
|
|
83
|
+
}
|
|
72
84
|
this._scenariosThatRan = [];
|
|
73
|
-
if (this.
|
|
85
|
+
if (this._browser) {
|
|
86
|
+
if (this._percy) {
|
|
87
|
+
this._percyHandler = new Percy_Handler_1.default(this._options.percyCaptureMode, this._browser, this._caps, this._isAppAutomate(), this._config.framework);
|
|
88
|
+
this._percyHandler.before();
|
|
89
|
+
}
|
|
74
90
|
try {
|
|
75
|
-
(
|
|
76
|
-
|
|
77
|
-
|
|
91
|
+
if (this._observability) {
|
|
92
|
+
(0, util_1.patchConsoleLogs)();
|
|
93
|
+
this._insightsHandler = new insights_handler_1.default(this._browser, this._browser.capabilities, this._isAppAutomate(), this._browser.sessionId, this._config.framework);
|
|
94
|
+
await this._insightsHandler.before();
|
|
95
|
+
}
|
|
78
96
|
/**
|
|
79
97
|
* register command event
|
|
80
98
|
*/
|
|
81
99
|
this._browser.on('command', async (command) => {
|
|
82
|
-
var _a, _b;
|
|
83
|
-
|
|
100
|
+
var _a, _b, _c, _d;
|
|
101
|
+
if (this._observability) {
|
|
102
|
+
await ((_a = this._insightsHandler) === null || _a === void 0 ? void 0 : _a.browserCommand('client:beforeCommand', Object.assign(command, { sessionId: (_b = this._browser) === null || _b === void 0 ? void 0 : _b.sessionId }), this._currentTest));
|
|
103
|
+
}
|
|
104
|
+
await ((_c = this._percyHandler) === null || _c === void 0 ? void 0 : _c.browserBeforeCommand(Object.assign(command, { sessionId: (_d = this._browser) === null || _d === void 0 ? void 0 : _d.sessionId })));
|
|
84
105
|
});
|
|
85
106
|
/**
|
|
86
107
|
* register result event
|
|
87
108
|
*/
|
|
88
109
|
this._browser.on('result', async (result) => {
|
|
89
|
-
var _a, _b;
|
|
90
|
-
|
|
110
|
+
var _a, _b, _c, _d;
|
|
111
|
+
if (this._observability) {
|
|
112
|
+
await ((_a = this._insightsHandler) === null || _a === void 0 ? void 0 : _a.browserCommand('client:afterCommand', Object.assign(result, { sessionId: (_b = this._browser) === null || _b === void 0 ? void 0 : _b.sessionId }), this._currentTest));
|
|
113
|
+
}
|
|
114
|
+
(_c = this._percyHandler) === null || _c === void 0 ? void 0 : _c.browserAfterCommand(Object.assign(result, { sessionId: (_d = this._browser) === null || _d === void 0 ? void 0 : _d.sessionId }));
|
|
91
115
|
});
|
|
92
116
|
}
|
|
93
117
|
catch (err) {
|
|
94
118
|
log.error(`Error in service class before function: ${err}`);
|
|
95
|
-
|
|
119
|
+
if (this._observability) {
|
|
120
|
+
crash_reporter_1.default.uploadCrashReport(`Error in service class before function: ${err}`, err && err.stack);
|
|
121
|
+
}
|
|
96
122
|
}
|
|
97
123
|
}
|
|
98
124
|
if (this._browser && (0, util_1.isBrowserstackSession)(this._browser)) {
|
|
@@ -152,17 +178,18 @@ class BrowserstackService {
|
|
|
152
178
|
await ((_c = this._accessibilityHandler) === null || _c === void 0 ? void 0 : _c.beforeTest(suiteTitle, test));
|
|
153
179
|
}
|
|
154
180
|
async afterTest(test, context, results) {
|
|
155
|
-
var _a, _b;
|
|
181
|
+
var _a, _b, _c;
|
|
156
182
|
this._specsRan = true;
|
|
157
183
|
const { error, passed } = results;
|
|
158
184
|
if (!passed) {
|
|
159
185
|
this._failReasons.push((error && error.message) || 'Unknown Error');
|
|
160
186
|
}
|
|
161
187
|
await ((_a = this._insightsHandler) === null || _a === void 0 ? void 0 : _a.afterTest(test, results));
|
|
162
|
-
await ((_b = this.
|
|
188
|
+
await ((_b = this._percyHandler) === null || _b === void 0 ? void 0 : _b.afterTest());
|
|
189
|
+
await ((_c = this._accessibilityHandler) === null || _c === void 0 ? void 0 : _c.afterTest(this._suiteTitle, test));
|
|
163
190
|
}
|
|
164
191
|
async after(result) {
|
|
165
|
-
var _a, _b;
|
|
192
|
+
var _a, _b, _c;
|
|
166
193
|
const { preferScenarioName, setSessionName, setSessionStatus } = this._options;
|
|
167
194
|
// For Cucumber: Checks scenarios that ran (i.e. not skipped) on the session
|
|
168
195
|
// Only 1 Scenario ran and option enabled => Redefine session name to Scenario's name
|
|
@@ -179,6 +206,7 @@ class BrowserstackService {
|
|
|
179
206
|
}
|
|
180
207
|
await ((_a = this._insightsHandler) === null || _a === void 0 ? void 0 : _a.uploadPending());
|
|
181
208
|
await ((_b = this._insightsHandler) === null || _b === void 0 ? void 0 : _b.teardown());
|
|
209
|
+
await ((_c = this._percyHandler) === null || _c === void 0 ? void 0 : _c.teardown());
|
|
182
210
|
if (process.env.BROWSERSTACK_O11Y_PERF_MEASUREMENT) {
|
|
183
211
|
await performance_tester_1.default.stopAndGenerate('performance-service.html');
|
|
184
212
|
performance_tester_1.default.calculateTimes([
|
|
@@ -212,7 +240,7 @@ class BrowserstackService {
|
|
|
212
240
|
await this._setAnnotation(`Scenario: ${scenarioName}`);
|
|
213
241
|
}
|
|
214
242
|
async afterScenario(world) {
|
|
215
|
-
var _a, _b, _c;
|
|
243
|
+
var _a, _b, _c, _d;
|
|
216
244
|
this._specsRan = true;
|
|
217
245
|
const status = (_a = world.result) === null || _a === void 0 ? void 0 : _a.status.toLowerCase();
|
|
218
246
|
if (status !== 'skipped') {
|
|
@@ -226,7 +254,8 @@ class BrowserstackService {
|
|
|
226
254
|
this._failReasons.push(exception);
|
|
227
255
|
}
|
|
228
256
|
await ((_b = this._insightsHandler) === null || _b === void 0 ? void 0 : _b.afterScenario(world));
|
|
229
|
-
await ((_c = this.
|
|
257
|
+
await ((_c = this._percyHandler) === null || _c === void 0 ? void 0 : _c.afterScenario());
|
|
258
|
+
await ((_d = this._accessibilityHandler) === null || _d === void 0 ? void 0 : _d.afterScenario(world));
|
|
230
259
|
}
|
|
231
260
|
async beforeStep(step, scenario) {
|
|
232
261
|
var _a;
|
|
@@ -298,6 +327,13 @@ class BrowserstackService {
|
|
|
298
327
|
}
|
|
299
328
|
const sessionUrl = `${this._sessionBaseUrl}/${sessionId}.json`;
|
|
300
329
|
log.debug(`Updating Browserstack session at ${sessionUrl} with request body: `, requestBody);
|
|
330
|
+
if (this._turboScale) {
|
|
331
|
+
return got_1.default.patch(sessionUrl, {
|
|
332
|
+
json: requestBody,
|
|
333
|
+
username: this._config.user,
|
|
334
|
+
password: this._config.key
|
|
335
|
+
});
|
|
336
|
+
}
|
|
301
337
|
return got_1.default.put(sessionUrl, {
|
|
302
338
|
json: requestBody,
|
|
303
339
|
username: this._config.user,
|
|
@@ -311,20 +347,30 @@ class BrowserstackService {
|
|
|
311
347
|
await this._multiRemoteAction(async (sessionId, browserName) => {
|
|
312
348
|
const sessionUrl = `${this._sessionBaseUrl}/${sessionId}.json`;
|
|
313
349
|
log.debug(`Requesting Browserstack session URL at ${sessionUrl}`);
|
|
314
|
-
|
|
350
|
+
let browserUrl;
|
|
351
|
+
const reqOpts = {
|
|
315
352
|
username: this._config.user,
|
|
316
353
|
password: this._config.key,
|
|
317
354
|
responseType: 'json'
|
|
318
|
-
}
|
|
355
|
+
};
|
|
356
|
+
if (this._turboScale) {
|
|
357
|
+
const response = await (0, got_1.default)(sessionUrl, reqOpts);
|
|
358
|
+
browserUrl = response.body.url;
|
|
359
|
+
}
|
|
360
|
+
else {
|
|
361
|
+
const response = await (0, got_1.default)(sessionUrl, reqOpts);
|
|
362
|
+
browserUrl = response.body.automation_session.browser_url;
|
|
363
|
+
}
|
|
319
364
|
if (!this._browser) {
|
|
320
365
|
return;
|
|
321
366
|
}
|
|
322
367
|
const capabilities = (0, util_1.getBrowserCapabilities)(this._browser, this._caps, browserName);
|
|
323
368
|
const browserString = (0, util_1.getBrowserDescription)(capabilities);
|
|
324
|
-
log.info(`${browserString} session: ${
|
|
369
|
+
log.info(`${browserString} session: ${browserUrl}`);
|
|
325
370
|
});
|
|
326
371
|
}
|
|
327
372
|
async _setSessionName(suiteTitle, test) {
|
|
373
|
+
var _a;
|
|
328
374
|
if (!this._options.setSessionName || !suiteTitle) {
|
|
329
375
|
return;
|
|
330
376
|
}
|
|
@@ -338,6 +384,7 @@ class BrowserstackService {
|
|
|
338
384
|
const post = !this._options.sessionNameOmitTestTitle ? ` - ${test.title}` : '';
|
|
339
385
|
name = `${pre}${test.parent}${post}`;
|
|
340
386
|
}
|
|
387
|
+
(_a = this._percyHandler) === null || _a === void 0 ? void 0 : _a._setSessionName(name);
|
|
341
388
|
if (name !== this._fullTitle) {
|
|
342
389
|
this._fullTitle = name;
|
|
343
390
|
await this._updateJob({ name });
|
package/build/types.d.ts
CHANGED
|
@@ -4,6 +4,9 @@ export interface SessionResponse {
|
|
|
4
4
|
browser_url: string;
|
|
5
5
|
};
|
|
6
6
|
}
|
|
7
|
+
export interface TurboScaleSessionResponse {
|
|
8
|
+
url: string;
|
|
9
|
+
}
|
|
7
10
|
export type MultiRemoteAction = (sessionId: string, browserName?: string) => Promise<any>;
|
|
8
11
|
export type AppConfig = {
|
|
9
12
|
id?: string;
|
|
@@ -47,6 +50,21 @@ export interface BrowserstackConfig {
|
|
|
47
50
|
* For e.g. buildName, projectName, BrowserStack access credentials, etc.
|
|
48
51
|
*/
|
|
49
52
|
testObservabilityOptions?: TestObservabilityOptions;
|
|
53
|
+
/**
|
|
54
|
+
* Set this to true to enable BrowserStack Percy which will take screenshots
|
|
55
|
+
* and snapshots for your tests run on Browserstack
|
|
56
|
+
* @default false
|
|
57
|
+
*/
|
|
58
|
+
percy?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Accepts mode as a string to auto capture screenshots at different execution points
|
|
61
|
+
* Accepted values are auto, click, testcase, screenshot & manual
|
|
62
|
+
*/
|
|
63
|
+
percyCaptureMode?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Set the Percy related config options under this key.
|
|
66
|
+
*/
|
|
67
|
+
percyOptions?: any;
|
|
50
68
|
/**
|
|
51
69
|
* Set this to true to enable BrowserStack Accessibility Automation which will
|
|
52
70
|
* automically conduct accessibility testing on your pre-existing test builds
|
|
@@ -126,6 +144,12 @@ export interface BrowserstackConfig {
|
|
|
126
144
|
* @default true
|
|
127
145
|
*/
|
|
128
146
|
setSessionStatus?: boolean;
|
|
147
|
+
/**
|
|
148
|
+
* Set this to true while running tests on the automation grid created using BrowserStack Automate TurboScale
|
|
149
|
+
* to automatically set the session name and status for quick debugging.
|
|
150
|
+
* @default false
|
|
151
|
+
*/
|
|
152
|
+
turboScale?: boolean;
|
|
129
153
|
}
|
|
130
154
|
export interface PlatformMeta {
|
|
131
155
|
sessionId?: string;
|
package/build/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAEpE,MAAM,WAAW,eAAe;IAE5B,kBAAkB,EAAE;QAEhB,WAAW,EAAE,MAAM,CAAA;KACtB,CAAA;CACJ;AAED,MAAM,MAAM,iBAAiB,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;AAE1F,MAAM,MAAM,SAAS,GAAG;IACpB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AAED,MAAM,WAAW,iBAAiB;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CA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ED,UAAU,QAAQ;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,UAAU,OAAO;IACb,SAAS,EAAE,MAAM,EAAE,CAAA;CACtB"}
|
package/build/util.d.ts
CHANGED
|
@@ -50,16 +50,31 @@ export declare function getCiInfo(): {
|
|
|
50
50
|
build_url: string | undefined;
|
|
51
51
|
job_name: string | undefined;
|
|
52
52
|
build_number: string | undefined;
|
|
53
|
+
} | {
|
|
54
|
+
name: string;
|
|
55
|
+
build_url: string | undefined;
|
|
56
|
+
job_name: string | null;
|
|
57
|
+
build_number: string | undefined;
|
|
53
58
|
} | {
|
|
54
59
|
name: string;
|
|
55
60
|
build_url: null;
|
|
61
|
+
job_name: string | undefined;
|
|
62
|
+
build_number: string | undefined;
|
|
63
|
+
} | {
|
|
64
|
+
name: string;
|
|
65
|
+
build_url: string;
|
|
56
66
|
job_name: null;
|
|
57
67
|
build_number: null;
|
|
58
68
|
} | {
|
|
59
69
|
name: string;
|
|
60
|
-
build_url:
|
|
70
|
+
build_url: null;
|
|
61
71
|
job_name: null;
|
|
62
72
|
build_number: string | undefined;
|
|
73
|
+
} | {
|
|
74
|
+
name: string;
|
|
75
|
+
build_url: null;
|
|
76
|
+
job_name: string | null;
|
|
77
|
+
build_number: string | null;
|
|
63
78
|
} | null;
|
|
64
79
|
export declare function nodeRequest(requestType: Method, apiEndpoint: string, options: any, apiUrl: string, timeout?: number): Promise<Object>;
|
|
65
80
|
export declare function getGitMetaData(): Promise<{
|
|
@@ -152,5 +167,7 @@ export declare function getBrowserStackUser(config: Options.Testrunner): string
|
|
|
152
167
|
export declare function getBrowserStackKey(config: Options.Testrunner): string | undefined;
|
|
153
168
|
export declare function isUndefined(value: any): boolean;
|
|
154
169
|
export declare function isTrue(value?: any): boolean;
|
|
170
|
+
export declare const isObject: (object: any) => boolean;
|
|
171
|
+
export declare const ObjectsAreEqual: (object1: any, object2: any) => boolean;
|
|
155
172
|
export {};
|
|
156
173
|
//# sourceMappingURL=util.d.ts.map
|
package/build/util.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":";;AAEA,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,KAAK,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACpE,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAIpE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,KAAK,CAAA;AAIjC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAA;AAG9D,OAAO,EAAc,UAAU,EAAkB,kBAAkB,EAAE,MAAM,SAAS,CAAA;AASpF,OAAO,mBAAmB,MAAM,mBAAmB,CAAA;AAQnD,eAAO,MAAM,sBAAsB;;;;;;;;;CASlC,CAAA;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,YAAY,CAAC,mBAAmB,UAa1E;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,kBAAkB,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,EAAE,YAAY,CAAC,gBAAgB,EAAE,WAAW,CAAC,EAAE,MAAM,6BASzJ;AAED;;;GAGG;AACH,wBA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;AAED,eAAO,MAAM,wBAAwB,YAz5BP,GAAG,QAs8B/B,CAAA;AAEF,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,OAAO,CAAC,UAAU,sBAK7D;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,OAAO,CAAC,UAAU,sBAK5D;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,GAAG,WAErC;AAED,wBAAgB,MAAM,CAAC,KAAK,CAAC,EAAE,GAAG,WAEjC;AAED,eAAO,MAAM,QAAQ,WAAY,GAAG,YAEnC,CAAA;AAED,eAAO,MAAM,eAAe,YAAa,GAAG,WAAW,GAAG,YAezD,CAAA"}
|
package/build/util.js
CHANGED
|
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.isTrue = exports.isUndefined = exports.getBrowserStackKey = exports.getBrowserStackUser = exports.stopAccessibilityTestRun = exports.getA11yResultsSummary = exports.getA11yResults = exports.createAccessibilityTestRun = exports.isAccessibilityAutomationSession = exports.shouldScanTestForAccessibility = exports.validateCapsWithA11y = exports.pushDataToQueue = exports.sleep = exports.patchConsoleLogs = exports.getFailureObject = exports.frameworkSupportsHook = exports.getObservabilityBuildTags = exports.getObservabilityBuild = exports.getObservabilityProject = exports.getObservabilityKey = exports.getObservabilityUser = exports.batchAndPostEvents = exports.shouldAddServiceVersion = exports.isBStackSession = exports.isScreenshotCommand = exports.getHookType = exports.getHierarchy = exports.uploadEventData = exports.getLogTag = exports.removeAnsiColors = exports.getScenarioExamples = exports.isBrowserstackSession = exports.getCloudProvider = exports.getUniqueIdentifierForCucumber = exports.getUniqueIdentifier = exports.getGitMetaData = exports.nodeRequest = exports.getCiInfo = exports.stopBuildUpstream = exports.launchTestSession = exports.o11yClassErrorHandler = exports.o11yErrorHandler = exports.errorHandler = exports.getParentSuiteName = exports.isBrowserstackCapability = exports.getBrowserCapabilities = exports.getBrowserDescription = exports.DEFAULT_REQUEST_CONFIG = void 0;
|
|
29
|
+
exports.ObjectsAreEqual = exports.isObject = exports.isTrue = exports.isUndefined = exports.getBrowserStackKey = exports.getBrowserStackUser = exports.stopAccessibilityTestRun = exports.getA11yResultsSummary = exports.getA11yResults = exports.createAccessibilityTestRun = exports.isAccessibilityAutomationSession = exports.shouldScanTestForAccessibility = exports.validateCapsWithA11y = exports.pushDataToQueue = exports.sleep = exports.patchConsoleLogs = exports.getFailureObject = exports.frameworkSupportsHook = exports.getObservabilityBuildTags = exports.getObservabilityBuild = exports.getObservabilityProject = exports.getObservabilityKey = exports.getObservabilityUser = exports.batchAndPostEvents = exports.shouldAddServiceVersion = exports.isBStackSession = exports.isScreenshotCommand = exports.getHookType = exports.getHierarchy = exports.uploadEventData = exports.getLogTag = exports.removeAnsiColors = exports.getScenarioExamples = exports.isBrowserstackSession = exports.getCloudProvider = exports.getUniqueIdentifierForCucumber = exports.getUniqueIdentifier = exports.getGitMetaData = exports.nodeRequest = exports.getCiInfo = exports.stopBuildUpstream = exports.launchTestSession = exports.o11yClassErrorHandler = exports.o11yErrorHandler = exports.errorHandler = exports.getParentSuiteName = exports.isBrowserstackCapability = exports.getBrowserCapabilities = exports.getBrowserDescription = exports.DEFAULT_REQUEST_CONFIG = void 0;
|
|
30
30
|
const os_1 = require("os");
|
|
31
31
|
const util_1 = require("util");
|
|
32
32
|
const http_1 = __importDefault(require("http"));
|
|
@@ -302,7 +302,7 @@ exports.stopBuildUpstream = o11yErrorHandler(async function stopBuildUpstream()
|
|
|
302
302
|
}
|
|
303
303
|
});
|
|
304
304
|
function getCiInfo() {
|
|
305
|
-
|
|
305
|
+
const env = process.env;
|
|
306
306
|
// Jenkins
|
|
307
307
|
if ((typeof env.JENKINS_URL === 'string' && env.JENKINS_URL.length > 0) || (typeof env.JENKINS_HOME === 'string' && env.JENKINS_HOME.length > 0)) {
|
|
308
308
|
return {
|
|
@@ -313,7 +313,7 @@ function getCiInfo() {
|
|
|
313
313
|
};
|
|
314
314
|
}
|
|
315
315
|
// CircleCI
|
|
316
|
-
if (env.CI
|
|
316
|
+
if (isTrue(env.CI) && isTrue(env.CIRCLECI)) {
|
|
317
317
|
return {
|
|
318
318
|
name: 'CircleCI',
|
|
319
319
|
build_url: env.CIRCLE_BUILD_URL,
|
|
@@ -322,7 +322,7 @@ function getCiInfo() {
|
|
|
322
322
|
};
|
|
323
323
|
}
|
|
324
324
|
// Travis CI
|
|
325
|
-
if (env.CI
|
|
325
|
+
if (isTrue(env.CI) && isTrue(env.TRAVIS)) {
|
|
326
326
|
return {
|
|
327
327
|
name: 'Travis CI',
|
|
328
328
|
build_url: env.TRAVIS_BUILD_WEB_URL,
|
|
@@ -331,7 +331,7 @@ function getCiInfo() {
|
|
|
331
331
|
};
|
|
332
332
|
}
|
|
333
333
|
// Codeship
|
|
334
|
-
if (env.CI
|
|
334
|
+
if (isTrue(env.CI) && env.CI_NAME === 'codeship') {
|
|
335
335
|
return {
|
|
336
336
|
name: 'Codeship',
|
|
337
337
|
build_url: null,
|
|
@@ -349,7 +349,7 @@ function getCiInfo() {
|
|
|
349
349
|
};
|
|
350
350
|
}
|
|
351
351
|
// Drone
|
|
352
|
-
if (env.CI
|
|
352
|
+
if (isTrue(env.CI) && isTrue(env.DRONE)) {
|
|
353
353
|
return {
|
|
354
354
|
name: 'Drone',
|
|
355
355
|
build_url: env.DRONE_BUILD_LINK,
|
|
@@ -358,7 +358,7 @@ function getCiInfo() {
|
|
|
358
358
|
};
|
|
359
359
|
}
|
|
360
360
|
// Semaphore
|
|
361
|
-
if (env.CI
|
|
361
|
+
if (isTrue(env.CI) && isTrue(env.SEMAPHORE)) {
|
|
362
362
|
return {
|
|
363
363
|
name: 'Semaphore',
|
|
364
364
|
build_url: env.SEMAPHORE_ORGANIZATION_URL,
|
|
@@ -367,7 +367,7 @@ function getCiInfo() {
|
|
|
367
367
|
};
|
|
368
368
|
}
|
|
369
369
|
// GitLab
|
|
370
|
-
if (env.CI
|
|
370
|
+
if (isTrue(env.CI) && isTrue(env.GITLAB_CI)) {
|
|
371
371
|
return {
|
|
372
372
|
name: 'GitLab',
|
|
373
373
|
build_url: env.CI_JOB_URL,
|
|
@@ -376,7 +376,7 @@ function getCiInfo() {
|
|
|
376
376
|
};
|
|
377
377
|
}
|
|
378
378
|
// Buildkite
|
|
379
|
-
if (env.CI
|
|
379
|
+
if (isTrue(env.CI) && isTrue(env.BUILDKITE)) {
|
|
380
380
|
return {
|
|
381
381
|
name: 'Buildkite',
|
|
382
382
|
build_url: env.BUILDKITE_BUILD_URL,
|
|
@@ -385,7 +385,7 @@ function getCiInfo() {
|
|
|
385
385
|
};
|
|
386
386
|
}
|
|
387
387
|
// Visual Studio Team Services
|
|
388
|
-
if (env.TF_BUILD
|
|
388
|
+
if (isTrue(env.TF_BUILD) && env.TF_BUILD_BUILDNUMBER) {
|
|
389
389
|
return {
|
|
390
390
|
name: 'Visual Studio Team Services',
|
|
391
391
|
build_url: `${env.SYSTEM_TEAMFOUNDATIONSERVERURI}${env.SYSTEM_TEAMPROJECTID}`,
|
|
@@ -393,6 +393,132 @@ function getCiInfo() {
|
|
|
393
393
|
build_number: env.BUILD_BUILDID
|
|
394
394
|
};
|
|
395
395
|
}
|
|
396
|
+
// Appveyor
|
|
397
|
+
if (isTrue(env.APPVEYOR)) {
|
|
398
|
+
return {
|
|
399
|
+
name: 'Appveyor',
|
|
400
|
+
build_url: `${env.APPVEYOR_URL}/project/${env.APPVEYOR_ACCOUNT_NAME}/${env.APPVEYOR_PROJECT_SLUG}/builds/${env.APPVEYOR_BUILD_ID}`,
|
|
401
|
+
job_name: env.APPVEYOR_JOB_NAME,
|
|
402
|
+
build_number: env.APPVEYOR_BUILD_NUMBER
|
|
403
|
+
};
|
|
404
|
+
}
|
|
405
|
+
// Azure CI
|
|
406
|
+
if (env.AZURE_HTTP_USER_AGENT && env.TF_BUILD) {
|
|
407
|
+
return {
|
|
408
|
+
name: 'Azure CI',
|
|
409
|
+
build_url: `${env.SYSTEM_TEAMFOUNDATIONSERVERURI}${env.SYSTEM_TEAMPROJECT}/_build/results?buildId=${env.BUILD_BUILDID}`,
|
|
410
|
+
job_name: env.BUILD_BUILDID,
|
|
411
|
+
build_number: env.BUILD_BUILDID
|
|
412
|
+
};
|
|
413
|
+
}
|
|
414
|
+
// AWS CodeBuild
|
|
415
|
+
if (env.CODEBUILD_BUILD_ID || env.CODEBUILD_RESOLVED_SOURCE_VERSION || env.CODEBUILD_SOURCE_VERSION) {
|
|
416
|
+
return {
|
|
417
|
+
name: 'AWS CodeBuild',
|
|
418
|
+
build_url: env.CODEBUILD_PUBLIC_BUILD_URL,
|
|
419
|
+
job_name: env.CODEBUILD_BUILD_ID,
|
|
420
|
+
build_number: env.CODEBUILD_BUILD_ID
|
|
421
|
+
};
|
|
422
|
+
}
|
|
423
|
+
// Bamboo
|
|
424
|
+
if (env.bamboo_buildNumber) {
|
|
425
|
+
return {
|
|
426
|
+
name: 'Bamboo',
|
|
427
|
+
build_url: env.bamboo_buildResultsUrl,
|
|
428
|
+
job_name: env.bamboo_shortJobName,
|
|
429
|
+
build_number: env.bamboo_buildNumber
|
|
430
|
+
};
|
|
431
|
+
}
|
|
432
|
+
// Wercker
|
|
433
|
+
if (env.WERCKER || env.WERCKER_MAIN_PIPELINE_STARTED) {
|
|
434
|
+
return {
|
|
435
|
+
name: 'Wercker',
|
|
436
|
+
build_url: env.WERCKER_BUILD_URL,
|
|
437
|
+
job_name: env.WERCKER_MAIN_PIPELINE_STARTED ? 'Main Pipeline' : null,
|
|
438
|
+
build_number: env.WERCKER_GIT_COMMIT
|
|
439
|
+
};
|
|
440
|
+
}
|
|
441
|
+
// Google Cloud
|
|
442
|
+
if (env.GCP_PROJECT || env.GCLOUD_PROJECT || env.GOOGLE_CLOUD_PROJECT) {
|
|
443
|
+
return {
|
|
444
|
+
name: 'Google Cloud',
|
|
445
|
+
build_url: null,
|
|
446
|
+
job_name: env.PROJECT_ID,
|
|
447
|
+
build_number: env.BUILD_ID,
|
|
448
|
+
};
|
|
449
|
+
}
|
|
450
|
+
// Shippable
|
|
451
|
+
if (env.SHIPPABLE) {
|
|
452
|
+
return {
|
|
453
|
+
name: 'Shippable',
|
|
454
|
+
build_url: env.SHIPPABLE_BUILD_URL,
|
|
455
|
+
job_name: env.SHIPPABLE_JOB_ID ? `Job #${env.SHIPPABLE_JOB_ID}` : null,
|
|
456
|
+
build_number: env.SHIPPABLE_BUILD_NUMBER
|
|
457
|
+
};
|
|
458
|
+
}
|
|
459
|
+
// Netlify
|
|
460
|
+
if (isTrue(env.NETLIFY)) {
|
|
461
|
+
return {
|
|
462
|
+
name: 'Netlify',
|
|
463
|
+
build_url: env.DEPLOY_URL,
|
|
464
|
+
job_name: env.SITE_NAME,
|
|
465
|
+
build_number: env.BUILD_ID
|
|
466
|
+
};
|
|
467
|
+
}
|
|
468
|
+
// Github Actions
|
|
469
|
+
if (isTrue(env.GITHUB_ACTIONS)) {
|
|
470
|
+
return {
|
|
471
|
+
name: 'GitHub Actions',
|
|
472
|
+
build_url: `${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}`,
|
|
473
|
+
job_name: env.GITHUB_WORKFLOW,
|
|
474
|
+
build_number: env.GITHUB_RUN_ID,
|
|
475
|
+
};
|
|
476
|
+
}
|
|
477
|
+
// Vercel
|
|
478
|
+
if (isTrue(env.CI) && env.VERCEL === '1') {
|
|
479
|
+
return {
|
|
480
|
+
name: 'Vercel',
|
|
481
|
+
build_url: `http://${env.VERCEL_URL}`,
|
|
482
|
+
job_name: null,
|
|
483
|
+
build_number: null,
|
|
484
|
+
};
|
|
485
|
+
}
|
|
486
|
+
// Teamcity
|
|
487
|
+
if (env.TEAMCITY_VERSION) {
|
|
488
|
+
return {
|
|
489
|
+
name: 'Teamcity',
|
|
490
|
+
build_url: null,
|
|
491
|
+
job_name: null,
|
|
492
|
+
build_number: env.BUILD_NUMBER,
|
|
493
|
+
};
|
|
494
|
+
}
|
|
495
|
+
// Concourse
|
|
496
|
+
if (env.CONCOURSE || env.CONCOURSE_URL || env.CONCOURSE_USERNAME || env.CONCOURSE_TEAM) {
|
|
497
|
+
return {
|
|
498
|
+
name: 'Concourse',
|
|
499
|
+
build_url: null,
|
|
500
|
+
job_name: env.BUILD_JOB_NAME || null,
|
|
501
|
+
build_number: env.BUILD_ID || null,
|
|
502
|
+
};
|
|
503
|
+
}
|
|
504
|
+
// GoCD
|
|
505
|
+
if (env.GO_JOB_NAME) {
|
|
506
|
+
return {
|
|
507
|
+
name: 'GoCD',
|
|
508
|
+
build_url: null,
|
|
509
|
+
job_name: env.GO_JOB_NAME,
|
|
510
|
+
build_number: env.GO_PIPELINE_COUNTER,
|
|
511
|
+
};
|
|
512
|
+
}
|
|
513
|
+
// CodeFresh
|
|
514
|
+
if (env.CF_BUILD_ID) {
|
|
515
|
+
return {
|
|
516
|
+
name: 'CodeFresh',
|
|
517
|
+
build_url: env.CF_BUILD_URL,
|
|
518
|
+
job_name: env.CF_PIPELINE_NAME,
|
|
519
|
+
build_number: env.CF_BUILD_ID,
|
|
520
|
+
};
|
|
521
|
+
}
|
|
396
522
|
// if no matches, return null
|
|
397
523
|
return null;
|
|
398
524
|
}
|
|
@@ -421,7 +547,7 @@ async function nodeRequest(requestType, apiEndpoint, options, apiUrl, timeout =
|
|
|
421
547
|
throw error;
|
|
422
548
|
}
|
|
423
549
|
else {
|
|
424
|
-
log.
|
|
550
|
+
log.debug(`Failed to fire api request due to ${error} - ${error.stack}`);
|
|
425
551
|
throw error;
|
|
426
552
|
}
|
|
427
553
|
}
|
|
@@ -962,6 +1088,27 @@ function isUndefined(value) {
|
|
|
962
1088
|
}
|
|
963
1089
|
exports.isUndefined = isUndefined;
|
|
964
1090
|
function isTrue(value) {
|
|
965
|
-
return (value + '') === 'true';
|
|
1091
|
+
return (value + '').toLowerCase() === 'true';
|
|
966
1092
|
}
|
|
967
1093
|
exports.isTrue = isTrue;
|
|
1094
|
+
const isObject = (object) => {
|
|
1095
|
+
return object !== null && typeof object === 'object' && !Array.isArray(object);
|
|
1096
|
+
};
|
|
1097
|
+
exports.isObject = isObject;
|
|
1098
|
+
const ObjectsAreEqual = (object1, object2) => {
|
|
1099
|
+
const objectKeys1 = Object.keys(object1);
|
|
1100
|
+
const objectKeys2 = Object.keys(object2);
|
|
1101
|
+
if (objectKeys1.length !== objectKeys2.length) {
|
|
1102
|
+
return false;
|
|
1103
|
+
}
|
|
1104
|
+
for (const key of objectKeys1) {
|
|
1105
|
+
const value1 = object1[key];
|
|
1106
|
+
const value2 = object2[key];
|
|
1107
|
+
const isBothAreObjects = (0, exports.isObject)(value1) && (0, exports.isObject)(value2);
|
|
1108
|
+
if ((isBothAreObjects && !(0, exports.ObjectsAreEqual)(value1, value2)) || (!isBothAreObjects && value1 !== value2)) {
|
|
1109
|
+
return false;
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
return true;
|
|
1113
|
+
};
|
|
1114
|
+
exports.ObjectsAreEqual = ObjectsAreEqual;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/browserstack-service",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.35.0",
|
|
4
4
|
"description": "WebdriverIO service for better Browserstack integration",
|
|
5
5
|
"author": "Adam Bjerstedt <abjerstedt@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-browserstack-service",
|
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
"url": "https://github.com/webdriverio/webdriverio/issues"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
+
"@percy/appium-app": "^2.0.1",
|
|
27
|
+
"@percy/selenium-webdriver": "^2.0.2",
|
|
26
28
|
"@types/gitconfiglocal": "^2.0.1",
|
|
27
29
|
"@wdio/logger": "7.26.0",
|
|
28
30
|
"@wdio/reporter": "7.25.4",
|
|
@@ -34,8 +36,9 @@
|
|
|
34
36
|
"gitconfiglocal": "^2.1.0",
|
|
35
37
|
"got": "^11.0.2",
|
|
36
38
|
"uuid": "^9.0.1",
|
|
37
|
-
"webdriverio": "7.
|
|
38
|
-
"winston-transport": "^4.5.0"
|
|
39
|
+
"webdriverio": "7.35.0",
|
|
40
|
+
"winston-transport": "^4.5.0",
|
|
41
|
+
"yauzl": "^2.10.0"
|
|
39
42
|
},
|
|
40
43
|
"peerDependencies": {
|
|
41
44
|
"@wdio/cli": "^5.0.0 || ^6.0.0 || ^7.0.0"
|
|
@@ -44,5 +47,5 @@
|
|
|
44
47
|
"access": "public"
|
|
45
48
|
},
|
|
46
49
|
"types": "./build/index.d.ts",
|
|
47
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "56c8deab3787a0571c51bfbd940d1c6d87fbad6a"
|
|
48
51
|
}
|