@wdio/sauce-service 7.16.10 → 7.16.14
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/service.d.ts +1 -0
- package/build/service.d.ts.map +1 -1
- package/build/service.js +14 -4
- package/build/utils.d.ts.map +1 -1
- package/build/utils.js +9 -10
- package/package.json +7 -7
package/build/service.d.ts
CHANGED
|
@@ -35,6 +35,7 @@ export default class SauceService implements Services.ServiceInstance {
|
|
|
35
35
|
name: string;
|
|
36
36
|
}): Promise<unknown>;
|
|
37
37
|
beforeScenario(world: Frameworks.World): Promise<unknown> | undefined;
|
|
38
|
+
beforeStep(step: Frameworks.PickleStep): Promise<unknown>;
|
|
38
39
|
/**
|
|
39
40
|
*
|
|
40
41
|
* Runs before a Cucumber Scenario.
|
package/build/service.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../src/service.ts"],"names":[],"mappings":"AAGA,OAAkB,EAAoB,GAAG,EAAE,MAAM,WAAW,CAAA;AAE5D,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAC9E,OAAO,KAAK,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAG9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAO5C,MAAM,CAAC,OAAO,OAAO,YAAa,YAAW,QAAQ,CAAC,eAAe;IAgB7D,OAAO,CAAC,aAAa;IACrB,OAAO,CAAC,OAAO;IAhBnB,OAAO,CAAC,QAAQ,CAAI;IACpB,OAAO,CAAC,oBAAoB,CAAI;IAChC,OAAO,CAAC,SAAS,CAAI;IACrB,OAAO,CAAC,iBAAiB,CAAO;IAChC,OAAO,CAAC,aAAa,CAAQ;IAE7B,OAAO,CAAC,QAAQ,CAAoB;IACpC,OAAO,CAAC,IAAI,CAAW;IACvB,OAA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,EAAE,OAAO,EAAE,UAAU,CAAC,UAAU;IAyClF,SAAS,CAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,CAAC,UAAU;IAetE;;OAEG;IACG,aAAa,CAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE;IAuB5D,cAAc,CAAE,KAAK,EAAE,UAAU,CAAC,KAAK;IAajC,UAAU,CAAE,IAAI,EAAE,UAAU,CAAC,UAAU;IAY7C;;;;;;;;OAQG;IACH,aAAa,CAAC,KAAK,EAAE,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,CAAC,YAAY;IAOtE;;OAEG;IACG,KAAK,CAAE,MAAM,EAAE,MAAM;IAsC3B;;;;OAIG;YACW,WAAW;IAezB,QAAQ,CAAE,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM;IAmB9C,SAAS,CAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,cAAc,UAAQ,EAAE,WAAW,CAAC,EAAE,MAAM;IAMlG;;OAEG;IACH,OAAO,CAAE,QAAQ,EAAE,MAAM,EAAE,cAAc,UAAQ,EAAE,WAAW,CAAC,EAAE,MAAM;IAgDvE;;OAEG;IACG,aAAa,CAAE,UAAU,EAAE,MAAM;CAkB1C"}
|
package/build/service.js
CHANGED
|
@@ -33,7 +33,7 @@ class SauceService {
|
|
|
33
33
|
/**
|
|
34
34
|
* if no user and key is specified even though a sauce service was
|
|
35
35
|
* provided set user and key with values so that the session request
|
|
36
|
-
* will fail
|
|
36
|
+
* will fail
|
|
37
37
|
*/
|
|
38
38
|
if (!this._config.user) {
|
|
39
39
|
this._isServiceEnabled = false;
|
|
@@ -185,7 +185,7 @@ class SauceService {
|
|
|
185
185
|
if (this._isRDC) {
|
|
186
186
|
return;
|
|
187
187
|
}
|
|
188
|
-
return this.setAnnotation(`sauce:context=Feature
|
|
188
|
+
return this.setAnnotation(`sauce:context=Feature: ${this._suiteTitle}`);
|
|
189
189
|
}
|
|
190
190
|
beforeScenario(world) {
|
|
191
191
|
/**
|
|
@@ -196,7 +196,17 @@ class SauceService {
|
|
|
196
196
|
return;
|
|
197
197
|
}
|
|
198
198
|
const scenarioName = world.pickle.name || 'unknown scenario';
|
|
199
|
-
return this.setAnnotation(`sauce:context
|
|
199
|
+
return this.setAnnotation(`sauce:context=-Scenario: ${scenarioName}`);
|
|
200
|
+
}
|
|
201
|
+
async beforeStep(step) {
|
|
202
|
+
/**
|
|
203
|
+
* Remark: Sauce Unified Platform doesn't support updating the context yet.
|
|
204
|
+
*/
|
|
205
|
+
if (!this._isServiceEnabled || this._isRDC || !this._browser) {
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
const { keyword, text } = step;
|
|
209
|
+
return this.setAnnotation(`sauce:context=--Step: ${keyword}${text}`);
|
|
200
210
|
}
|
|
201
211
|
/**
|
|
202
212
|
*
|
|
@@ -217,7 +227,7 @@ class SauceService {
|
|
|
217
227
|
* update Sauce Labs job
|
|
218
228
|
*/
|
|
219
229
|
async after(result) {
|
|
220
|
-
if (!this._browser ||
|
|
230
|
+
if (!this._browser || !this._isServiceEnabled) {
|
|
221
231
|
return;
|
|
222
232
|
}
|
|
223
233
|
let failures = this._failures;
|
package/build/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAI/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAgB,KAAK,CAAE,IAAI,EAAE,YAAY,CAAC,mBAAmB,WAM5D;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAE,IAAI,EAAE,YAAY,CAAC,mBAAmB,WAM/D;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,gBAAgB,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,gBACpD,aAAa,mBAAmB,UA2BvD;AAED,wBAAgB,SAAS,WAOxB"}
|
package/build/utils.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ansiRegex = exports.makeCapabilityFactory = exports.isEmuSim = exports.isRDC = void 0;
|
|
4
|
-
const utils_1 = require("@wdio/utils");
|
|
5
4
|
/**
|
|
6
5
|
* Determine if the current instance is a RDC instance. RDC tests are Real Device tests
|
|
7
6
|
* that can be started with different sets of capabilities. A deviceName is not mandatory, the only mandatory cap for
|
|
@@ -70,21 +69,21 @@ exports.isEmuSim = isEmuSim;
|
|
|
70
69
|
*/
|
|
71
70
|
function makeCapabilityFactory(tunnelIdentifier, options) {
|
|
72
71
|
return (capability) => {
|
|
73
|
-
//
|
|
74
|
-
// we
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
//
|
|
79
|
-
if (!capability['sauce:options'] &&
|
|
72
|
+
// Check if this is a 'valid' W3C request, this is done with a simple check
|
|
73
|
+
// where we assume that if only one cap has `:` it's W3C, even if the request
|
|
74
|
+
// is a mix of JWP and W3C. This is hard to check
|
|
75
|
+
const isW3CRequest = Boolean(Object.keys(capability).find((cap) => cap.includes(':')));
|
|
76
|
+
// If the `sauce:options` are not provided and it is a W3C session
|
|
77
|
+
// then add it
|
|
78
|
+
if (!capability['sauce:options'] && isW3CRequest) {
|
|
80
79
|
capability['sauce:options'] = {};
|
|
81
80
|
}
|
|
82
81
|
Object.assign(capability, options);
|
|
83
|
-
const sauceOptions = (
|
|
82
|
+
const sauceOptions = (isW3CRequest ? capability['sauce:options'] : capability);
|
|
84
83
|
sauceOptions.tunnelIdentifier = (capability.tunnelIdentifier ||
|
|
85
84
|
sauceOptions.tunnelIdentifier ||
|
|
86
85
|
tunnelIdentifier);
|
|
87
|
-
if (
|
|
86
|
+
if (isW3CRequest) {
|
|
88
87
|
delete capability.tunnelIdentifier;
|
|
89
88
|
}
|
|
90
89
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/sauce-service",
|
|
3
|
-
"version": "7.16.
|
|
3
|
+
"version": "7.16.14",
|
|
4
4
|
"description": "WebdriverIO service that provides a better integration into Sauce Labs",
|
|
5
5
|
"author": "Christian Bromann <christian@saucelabs.com>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-sauce-service",
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
"url": "https://github.com/webdriverio/webdriverio/issues"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@types/node": "^
|
|
26
|
+
"@types/node": "^17.0.4",
|
|
27
27
|
"@wdio/logger": "7.16.0",
|
|
28
|
-
"@wdio/types": "7.16.
|
|
29
|
-
"@wdio/utils": "7.16.
|
|
30
|
-
"saucelabs": "^7.
|
|
31
|
-
"webdriverio": "7.16.
|
|
28
|
+
"@wdio/types": "7.16.14",
|
|
29
|
+
"@wdio/utils": "7.16.14",
|
|
30
|
+
"saucelabs": "^7.1.3",
|
|
31
|
+
"webdriverio": "7.16.14"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"@wdio/cli": "^7.0.0"
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
39
|
"types": "./build/index.d.ts",
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "be9d252b21fff13f161b8607e186a33a530e3d3d"
|
|
41
41
|
}
|