@wdio/shared-store-service 8.1.3 → 8.2.1
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 +14 -7
- package/build/cjs/index.d.ts +2 -0
- package/build/cjs/index.d.ts.map +1 -0
- package/build/cjs/index.js +11 -0
- package/build/cjs/package.json +3 -0
- package/build/index.d.ts +1 -7
- package/build/index.d.ts.map +1 -1
- package/build/service.d.ts +1 -9
- package/build/service.d.ts.map +1 -1
- package/package.json +15 -4
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ WebdriverIO Shared Store Service
|
|
|
5
5
|
|
|
6
6
|
## Installation
|
|
7
7
|
|
|
8
|
-
The easiest way is to keep `@wdio/shared-store-service` as a
|
|
8
|
+
The easiest way is to keep `@wdio/shared-store-service` as a dev dependency in your `package.json`, via:
|
|
9
9
|
|
|
10
10
|
```sh
|
|
11
11
|
npm install @wdio/shared-store-service --save-dev
|
|
@@ -47,12 +47,19 @@ You could also directly access to `setValue` and `getValue` async handlers.
|
|
|
47
47
|
Make sure you properly call them with the `await` keyword.
|
|
48
48
|
|
|
49
49
|
```js
|
|
50
|
-
|
|
50
|
+
// wdio.conf.js
|
|
51
|
+
import { setValue, getValue } from '@wdio/shared-store-service'
|
|
51
52
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
export const config = {
|
|
54
|
+
// ...
|
|
55
|
+
onPrepare: [async function (config, capabilities) {
|
|
56
|
+
await setValue('foo', 'bar')
|
|
57
|
+
}],
|
|
58
|
+
// ...
|
|
59
|
+
after: async () => {
|
|
60
|
+
const value = await getValue('foo')
|
|
61
|
+
// ...
|
|
62
|
+
}
|
|
56
63
|
```
|
|
57
64
|
|
|
58
65
|
IMPORTANT! Every spec file should be atomic and isolated from others' specs.
|
|
@@ -61,7 +68,7 @@ Please avoid sharing test execution data!
|
|
|
61
68
|
|
|
62
69
|
## Configuration
|
|
63
70
|
|
|
64
|
-
Add `shared-store` to the services list and the `sharedStore` object will be accessible to you in your test.
|
|
71
|
+
Add `shared-store` to the services list and the `sharedStore` object will be accessible to you on the [`browser` scope](https://webdriver.io/docs/api/browser) in your test.
|
|
65
72
|
|
|
66
73
|
```js
|
|
67
74
|
// wdio.conf.js
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cjs/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const esmModule = import('../index.js');
|
|
4
|
+
exports.setValue = async function (key, value) {
|
|
5
|
+
const m = await esmModule;
|
|
6
|
+
return m.setValue(key, value);
|
|
7
|
+
};
|
|
8
|
+
exports.getValue = async function (key) {
|
|
9
|
+
const m = await esmModule;
|
|
10
|
+
return m.getValue(key);
|
|
11
|
+
};
|
package/build/index.d.ts
CHANGED
|
@@ -11,13 +11,7 @@ export interface BrowserExtension {
|
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
13
|
declare global {
|
|
14
|
-
namespace
|
|
15
|
-
interface Browser extends BrowserExtension {
|
|
16
|
-
}
|
|
17
|
-
interface MultiRemoteBrowser extends BrowserExtension {
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
namespace WebdriverIOSync {
|
|
14
|
+
namespace WebdriverIO {
|
|
21
15
|
interface Browser extends BrowserExtension {
|
|
22
16
|
}
|
|
23
17
|
interface MultiRemoteBrowser extends BrowserExtension {
|
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,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEhE,OAAO,mBAAmB,MAAM,eAAe,CAAA;AAC/C,OAAO,kBAAkB,MAAM,cAAc,CAAA;AAE7C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAChD,eAAe,kBAAkB,CAAA;AACjC,eAAO,MAAM,QAAQ,4BAAsB,CAAA;AAE3C,MAAM,WAAW,gBAAgB;IAC7B,WAAW,EAAE;QACT,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,aAAa,GAAG,cAAc,CAAC;QACrD,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,GAAG,cAAc,KAAK,IAAI,CAAC;KACrE,CAAA;CACJ;AAED,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEhE,OAAO,mBAAmB,MAAM,eAAe,CAAA;AAC/C,OAAO,kBAAkB,MAAM,cAAc,CAAA;AAE7C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAChD,eAAe,kBAAkB,CAAA;AACjC,eAAO,MAAM,QAAQ,4BAAsB,CAAA;AAE3C,MAAM,WAAW,gBAAgB;IAC7B,WAAW,EAAE;QACT,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,aAAa,GAAG,cAAc,CAAC;QACrD,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,GAAG,cAAc,KAAK,IAAI,CAAC;KACrE,CAAA;CACJ;AAED,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,WAAW,CAAC;QAClB,UAAU,OAAQ,SAAQ,gBAAgB;SAAI;QAC9C,UAAU,kBAAmB,SAAQ,gBAAgB;SAAI;KAC5D;CACJ"}
|
package/build/service.d.ts
CHANGED
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
import type { Browser } from 'webdriverio';
|
|
2
1
|
import type { Services } from '@wdio/types';
|
|
3
|
-
import type { BrowserExtension } from './index.js';
|
|
4
2
|
import type { SharedStoreServiceCapabilities } from './types.js';
|
|
5
|
-
/**
|
|
6
|
-
* ToDo(Christian): make this public accessible
|
|
7
|
-
*/
|
|
8
|
-
interface ServiceBrowser extends Browser<'async'>, BrowserExtension {
|
|
9
|
-
}
|
|
10
3
|
export default class SharedStoreService implements Services.ServiceInstance {
|
|
11
4
|
private _browser?;
|
|
12
5
|
constructor(_: never, caps: SharedStoreServiceCapabilities);
|
|
13
|
-
before(caps: never, specs: never, browser:
|
|
6
|
+
before(caps: never, specs: never, browser: WebdriverIO.Browser): void;
|
|
14
7
|
}
|
|
15
|
-
export {};
|
|
16
8
|
//# 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":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../src/service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiC,QAAQ,EAAE,MAAM,aAAa,CAAA;AAG1E,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,YAAY,CAAA;AAEhE,MAAM,CAAC,OAAO,OAAO,kBAAmB,YAAW,QAAQ,CAAC,eAAe;IACvE,OAAO,CAAC,QAAQ,CAAC,CAAqB;gBAE1B,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,8BAA8B;IAI1D,MAAM,CACF,IAAI,EAAE,KAAK,EACX,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,WAAW,CAAC,OAAO;CAiBnC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/shared-store-service",
|
|
3
|
-
"version": "8.1
|
|
3
|
+
"version": "8.2.1",
|
|
4
4
|
"description": "A WebdriverIO service to exchange data across processes",
|
|
5
5
|
"author": "Mykola Grybyk <mykola.grybyk@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-shared-store-service",
|
|
@@ -22,8 +22,19 @@
|
|
|
22
22
|
"bugs": {
|
|
23
23
|
"url": "https://github.com/webdriverio/webdriverio/issues"
|
|
24
24
|
},
|
|
25
|
+
"main": "./build/cjs/index.js",
|
|
25
26
|
"type": "module",
|
|
26
|
-
"
|
|
27
|
+
"module": "./build/index.js",
|
|
28
|
+
"exports": {
|
|
29
|
+
".": [
|
|
30
|
+
{
|
|
31
|
+
"types": "./build/index.d.ts",
|
|
32
|
+
"import": "./build/index.js",
|
|
33
|
+
"require": "./build/cjs/index.js"
|
|
34
|
+
},
|
|
35
|
+
"./build/cjs/index.js"
|
|
36
|
+
]
|
|
37
|
+
},
|
|
27
38
|
"types": "./build/index.d.ts",
|
|
28
39
|
"typeScriptVersion": "3.8.3",
|
|
29
40
|
"dependencies": {
|
|
@@ -32,10 +43,10 @@
|
|
|
32
43
|
"@wdio/types": "8.1.2",
|
|
33
44
|
"got": "^12.1.0",
|
|
34
45
|
"polka": "^0.5.2",
|
|
35
|
-
"webdriverio": "8.1
|
|
46
|
+
"webdriverio": "8.2.1"
|
|
36
47
|
},
|
|
37
48
|
"publishConfig": {
|
|
38
49
|
"access": "public"
|
|
39
50
|
},
|
|
40
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "60db953a4e6dd06080c2061fca6d0de3c5dbade2"
|
|
41
52
|
}
|