@wdio/sauce-service 8.0.13 → 8.1.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/README.md +18 -5
- package/build/constants.d.ts +1 -1
- package/build/constants.d.ts.map +1 -1
- package/build/index.d.ts +1 -1
- package/build/index.d.ts.map +1 -1
- package/build/launcher.d.ts +2 -2
- package/build/launcher.d.ts.map +1 -1
- package/build/launcher.js +0 -1
- package/build/service.d.ts +8 -8
- package/build/service.d.ts.map +1 -1
- package/build/service.js +5 -5
- package/package.json +8 -6
package/README.md
CHANGED
|
@@ -51,10 +51,18 @@ export const config = {
|
|
|
51
51
|
};
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
If you want to use an existing Sauce Connect tunnel you only need to provide
|
|
54
|
+
If you want to use an existing Sauce Connect tunnel you only need to provide a `tunnelIdentifier`, or if you are using a parent tunnel, include the `parentTunnel` in the capabilities like this:
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
<Tabs
|
|
58
|
+
defaultValue="tunnelidentifier"
|
|
59
|
+
values={[
|
|
60
|
+
{label: 'Tunnel Identifier', value: 'tunnelidentifier'},
|
|
61
|
+
{label: 'Parent Tunnel', value: 'parenttunnel'}
|
|
62
|
+
]
|
|
63
|
+
}>
|
|
64
|
+
<TabItem value="tunnelidentifier">
|
|
55
65
|
|
|
56
|
-
<!--DOCUSAURUS_CODE_TABS-->
|
|
57
|
-
<!--Tunnel Identifier-->
|
|
58
66
|
```js
|
|
59
67
|
export const config = {
|
|
60
68
|
// ...
|
|
@@ -75,7 +83,10 @@ export const config = {
|
|
|
75
83
|
// ...
|
|
76
84
|
};
|
|
77
85
|
```
|
|
78
|
-
|
|
86
|
+
|
|
87
|
+
</TabItem>
|
|
88
|
+
<TabItem value="parenttunnel">
|
|
89
|
+
|
|
79
90
|
```js
|
|
80
91
|
export const config = {
|
|
81
92
|
// ...
|
|
@@ -97,7 +108,9 @@ export const config = {
|
|
|
97
108
|
// ...
|
|
98
109
|
};
|
|
99
110
|
```
|
|
100
|
-
|
|
111
|
+
|
|
112
|
+
</TabItem>
|
|
113
|
+
</Tabs>
|
|
101
114
|
|
|
102
115
|
If you want to use the Real Device cloud pass the `testobject_api_key` in the capabilities like this:
|
|
103
116
|
|
package/build/constants.d.ts
CHANGED
package/build/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAEpD,eAAO,MAAM,eAAe,EAAE,OAAO,CAAC,kBAAkB,CAEvD,CAAA"}
|
package/build/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import SauceLauncher from './launcher.js';
|
|
2
2
|
import SauceService from './service.js';
|
|
3
|
-
import type { SauceServiceConfig } from './types';
|
|
3
|
+
import type { SauceServiceConfig } from './types.js';
|
|
4
4
|
export default SauceService;
|
|
5
5
|
export declare const launcher: typeof SauceLauncher;
|
|
6
6
|
export * from './types.js';
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,eAAe,CAAA;AACzC,OAAO,YAAY,MAAM,cAAc,CAAA;AACvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,eAAe,CAAA;AACzC,OAAO,YAAY,MAAM,cAAc,CAAA;AACvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAEpD,eAAe,YAAY,CAAA;AAC3B,eAAO,MAAM,QAAQ,sBAAgB,CAAA;AACrC,cAAc,YAAY,CAAA;AAE1B,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,WAAW,CAAC;QAClB,UAAU,aAAc,SAAQ,kBAAkB;SAAG;KACxD;CACJ"}
|
package/build/launcher.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SauceConnectOptions, SauceConnectInstance } from 'saucelabs';
|
|
1
|
+
import type { SauceConnectOptions, SauceConnectInstance } from 'saucelabs';
|
|
2
2
|
import type { Services, Capabilities, Options } from '@wdio/types';
|
|
3
|
-
import type { SauceServiceConfig } from './types';
|
|
3
|
+
import type { SauceServiceConfig } from './types.js';
|
|
4
4
|
export default class SauceLauncher implements Services.ServiceInstance {
|
|
5
5
|
private _options;
|
|
6
6
|
private _capabilities;
|
package/build/launcher.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"launcher.d.ts","sourceRoot":"","sources":["../src/launcher.ts"],"names":[],"mappings":"AAGA,
|
|
1
|
+
{"version":3,"file":"launcher.d.ts","sourceRoot":"","sources":["../src/launcher.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAoB,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAA;AAG5F,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAGlE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAMpD,MAAM,CAAC,OAAO,OAAO,aAAc,YAAW,QAAQ,CAAC,eAAe;IAK9D,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,aAAa;IACrB,OAAO,CAAC,OAAO;IANnB,OAAO,CAAC,IAAI,CAAmB;IAC/B,OAAO,CAAC,oBAAoB,CAAC,CAAsB;gBAGvC,QAAQ,EAAE,kBAAkB,EAC5B,aAAa,EAAE,OAAO,EACtB,OAAO,EAAE,OAAO,CAAC,UAAU;IAKvC;;OAEG;IACG,SAAS,CACX,MAAM,EAAE,OAAO,CAAC,UAAU,EAC1B,YAAY,EAAE,YAAY,CAAC,kBAAkB;IAyD3C,WAAW,CAAE,gBAAgB,EAAE,mBAAmB,EAAE,UAAU,SAAI,GAAG,OAAO,CAAC,oBAAoB,CAAC;IA4BxG;;OAEG;IACH,UAAU;CAOb"}
|
package/build/launcher.js
CHANGED
|
@@ -16,7 +16,6 @@ export default class SauceLauncher {
|
|
|
16
16
|
this._options = _options;
|
|
17
17
|
this._capabilities = _capabilities;
|
|
18
18
|
this._config = _config;
|
|
19
|
-
// @ts-expect-error https://github.com/saucelabs/node-saucelabs/issues/153
|
|
20
19
|
this._api = new SauceLabs.default(this._config);
|
|
21
20
|
}
|
|
22
21
|
/**
|
package/build/service.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Job } from 'saucelabs';
|
|
1
|
+
import type { Job } from 'saucelabs';
|
|
2
2
|
import type { Services, Capabilities, Options, Frameworks } from '@wdio/types';
|
|
3
3
|
import type { Browser, MultiRemoteBrowser } from 'webdriverio';
|
|
4
|
-
import type { SauceServiceConfig } from './types';
|
|
4
|
+
import type { SauceServiceConfig } from './types.js';
|
|
5
5
|
export default class SauceService implements Services.ServiceInstance {
|
|
6
6
|
private _capabilities;
|
|
7
7
|
private _config;
|
|
@@ -23,7 +23,7 @@ export default class SauceService implements Services.ServiceInstance {
|
|
|
23
23
|
beforeSession(config: Options.Testrunner, __: never, ___: never, cid: string): void;
|
|
24
24
|
before(caps: unknown, specs: string[], browser: Browser<'async'> | MultiRemoteBrowser<'async'>): void;
|
|
25
25
|
beforeSuite(suite: Frameworks.Suite): Promise<void>;
|
|
26
|
-
beforeTest(test: Frameworks.Test): Promise<
|
|
26
|
+
beforeTest(test: Frameworks.Test): Promise<any>;
|
|
27
27
|
afterSuite(suite: Frameworks.Suite): void;
|
|
28
28
|
private _reportErrorLog;
|
|
29
29
|
afterTest(test: Frameworks.Test, context: unknown, results: Frameworks.TestResult): void;
|
|
@@ -33,13 +33,13 @@ export default class SauceService implements Services.ServiceInstance {
|
|
|
33
33
|
*/
|
|
34
34
|
beforeFeature(uri: unknown, feature: {
|
|
35
35
|
name: string;
|
|
36
|
-
}): Promise<
|
|
36
|
+
}): Promise<any>;
|
|
37
37
|
/**
|
|
38
38
|
* Runs before a Cucumber Scenario.
|
|
39
39
|
* @param world world object containing information on pickle and test step
|
|
40
40
|
*/
|
|
41
|
-
beforeScenario(world: Frameworks.World): Promise<
|
|
42
|
-
beforeStep(step: Frameworks.PickleStep): Promise<
|
|
41
|
+
beforeScenario(world: Frameworks.World): Promise<any> | undefined;
|
|
42
|
+
beforeStep(step: Frameworks.PickleStep): Promise<any>;
|
|
43
43
|
/**
|
|
44
44
|
* Runs after a Cucumber Scenario.
|
|
45
45
|
* @param world world object containing information on pickle and test step
|
|
@@ -52,7 +52,7 @@ export default class SauceService implements Services.ServiceInstance {
|
|
|
52
52
|
/**
|
|
53
53
|
* update Sauce Labs job
|
|
54
54
|
*/
|
|
55
|
-
after(result: number): Promise<
|
|
55
|
+
after(result: number): Promise<any>;
|
|
56
56
|
/**
|
|
57
57
|
* upload files to Sauce Labs platform
|
|
58
58
|
* @param jobId id of the job
|
|
@@ -68,7 +68,7 @@ export default class SauceService implements Services.ServiceInstance {
|
|
|
68
68
|
/**
|
|
69
69
|
* Update the running Sauce Labs Job with an annotation
|
|
70
70
|
*/
|
|
71
|
-
setAnnotation(annotation: string): Promise<
|
|
71
|
+
setAnnotation(annotation: string): Promise<any>;
|
|
72
72
|
private _setJobName;
|
|
73
73
|
}
|
|
74
74
|
//# sourceMappingURL=service.d.ts.map
|
package/build/service.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../src/service.ts"],"names":[],"mappings":"AAIA,
|
|
1
|
+
{"version":3,"file":"service.d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AepC,UAAU,CAAE,IAAI,EAAE,UAAU,CAAC,IAAI;IAwCvC,UAAU,CAAE,KAAK,EAAE,UAAU,CAAC,KAAK;IAMnC,OAAO,CAAC,eAAe;IAKvB,SAAS,CAAE,IAAI,EAAE,UAAU,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,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;IAsB5D;;;OAGG;IACH,cAAc,CAAE,KAAK,EAAE,UAAU,CAAC,KAAK;IAajC,UAAU,CAAE,IAAI,EAAE,UAAU,CAAC,UAAU;IAY7C;;;;;;;OAOG;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;YAmBzB,WAAW;CAe5B"}
|
package/build/service.js
CHANGED
|
@@ -25,7 +25,6 @@ export default class SauceService {
|
|
|
25
25
|
this._capabilities = _capabilities;
|
|
26
26
|
this._config = _config;
|
|
27
27
|
this._options = { ...DEFAULT_OPTIONS, ...options };
|
|
28
|
-
// @ts-expect-error https://github.com/saucelabs/node-saucelabs/issues/153
|
|
29
28
|
this._api = new SauceLabs.default(this._config);
|
|
30
29
|
this._maxErrorStackLength = this._options.maxErrorStackLength || this._maxErrorStackLength;
|
|
31
30
|
}
|
|
@@ -299,7 +298,7 @@ export default class SauceService {
|
|
|
299
298
|
* VM message data
|
|
300
299
|
*/
|
|
301
300
|
getBody(failures, calledOnReload = false, browserName) {
|
|
302
|
-
|
|
301
|
+
const body = {};
|
|
303
302
|
/**
|
|
304
303
|
* add reload count to title if reload is used
|
|
305
304
|
*/
|
|
@@ -318,8 +317,8 @@ export default class SauceService {
|
|
|
318
317
|
}
|
|
319
318
|
body.name += ` (${testCnt})`;
|
|
320
319
|
}
|
|
321
|
-
|
|
322
|
-
for (
|
|
320
|
+
const caps = this._capabilities['sauce:options'] || this._capabilities;
|
|
321
|
+
for (const prop of jobDataProperties) {
|
|
323
322
|
if (!caps[prop]) {
|
|
324
323
|
continue;
|
|
325
324
|
}
|
|
@@ -350,8 +349,9 @@ export default class SauceService {
|
|
|
350
349
|
return this._browser.execute(annotation);
|
|
351
350
|
}
|
|
352
351
|
async _setJobName(suiteTitle) {
|
|
353
|
-
if (!suiteTitle)
|
|
352
|
+
if (!suiteTitle) {
|
|
354
353
|
return;
|
|
354
|
+
}
|
|
355
355
|
let jobName = suiteTitle;
|
|
356
356
|
if (this._options.setJobName) {
|
|
357
357
|
jobName = this._options.setJobName(this._config, this._capabilities, suiteTitle);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/sauce-service",
|
|
3
|
-
"version": "8.0
|
|
3
|
+
"version": "8.1.0",
|
|
4
4
|
"description": "WebdriverIO service that provides a better integration into Sauce Labs",
|
|
5
5
|
"author": "Christian Bromann <mail@bromann.dev>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-sauce-service",
|
|
@@ -27,16 +27,18 @@
|
|
|
27
27
|
"types": "./build/index.d.ts",
|
|
28
28
|
"typeScriptVersion": "3.8.3",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@
|
|
31
|
-
"@wdio/
|
|
32
|
-
"@wdio/
|
|
33
|
-
"@wdio/utils": "8.0.13",
|
|
30
|
+
"@wdio/logger": "8.1.0",
|
|
31
|
+
"@wdio/types": "8.1.0",
|
|
32
|
+
"@wdio/utils": "8.1.0",
|
|
34
33
|
"ip": "^1.1.8",
|
|
35
34
|
"saucelabs": "^7.1.3",
|
|
36
35
|
"webdriverio": "8.0.2"
|
|
37
36
|
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@types/ip": "^1.1.0"
|
|
39
|
+
},
|
|
38
40
|
"publishConfig": {
|
|
39
41
|
"access": "public"
|
|
40
42
|
},
|
|
41
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "f505134606f99129c816acb00f22e39032e60820"
|
|
42
44
|
}
|