@harnessed-ts/webdriverio 0.6.0 → 0.8.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessed-ts/webdriverio",
3
- "version": "0.6.0",
3
+ "version": "0.8.0",
4
4
  "description": "WebdriverIO driver for @harnessed-ts/core: the shared resolver injected into the page, WebDriver actions, and frames entered with switchFrame.",
5
5
  "keywords": [
6
6
  "testing",
@@ -43,6 +43,11 @@
43
43
  "import": "./dist/matchers.js",
44
44
  "require": "./dist/matchers.cjs"
45
45
  },
46
+ "./mock": {
47
+ "types": "./dist/mock.d.ts",
48
+ "import": "./dist/mock.js",
49
+ "require": "./dist/mock.cjs"
50
+ },
46
51
  "./package.json": "./package.json"
47
52
  },
48
53
  "files": [
@@ -55,8 +60,9 @@
55
60
  "node": ">=22.19.0"
56
61
  },
57
62
  "dependencies": {
58
- "@harnessed-ts/core": "^0.6.0",
59
- "@harnessed-ts/resolve": "^0.6.0"
63
+ "@harnessed-ts/core": "^0.8.0",
64
+ "@harnessed-ts/mock": "^0.8.0",
65
+ "@harnessed-ts/resolve": "^0.8.0"
60
66
  },
61
67
  "peerDependencies": {
62
68
  "expect-webdriverio": ">=8.0.0-alpha.3",
@@ -71,7 +77,7 @@
71
77
  "access": "public"
72
78
  },
73
79
  "devDependencies": {
74
- "@wdio/types": "^10.0.0",
80
+ "@wdio/types": "^10.1.0",
75
81
  "expect-webdriverio": "^8.0.0-alpha.3",
76
82
  "webdriverio": "^10.0.0"
77
83
  },
@@ -1,43 +0,0 @@
1
- import type { PageApiOptions, WireSelector } from '@harnessed-ts/resolve/inject';
2
- /**
3
- * What the in-page script does with the target it resolves. Reads happen in the
4
- * page, in the same round-trip as the resolution: a WebDriver command costs a
5
- * few milliseconds each way, and a read that first fetched an element reference
6
- * and then asked about it would pay that twice.
7
- */
8
- export type PageOp = 'frame' | 'frameNow' | 'element' | 'probe' | 'count' | 'texts' | 'text' | 'value' | 'attribute' | 'enabled' | 'checked' | 'selected' | 'select' | 'clear' | 'focus' | 'blur' | 'box' | 'upload';
9
- /**
10
- * The script's answer. A page error comes back as a value rather than a thrown
11
- * script error, so its name and message arrive intact — a thrown one reaches the
12
- * test wrapped in protocol noise, and under WebDriver Classic is logged as a
13
- * driver failure as well.
14
- */
15
- export type PageReply = {
16
- kind: 'missing';
17
- } | {
18
- kind: 'ok';
19
- value: unknown;
20
- url: string;
21
- } | {
22
- kind: 'error';
23
- name: string;
24
- message: string;
25
- };
26
- /** Raised in the page by the shared resolver: strictness, index and frame rules. */
27
- export declare class PageError extends Error {
28
- constructor(name: string, message: string);
29
- }
30
- /** The shared resolver's refusal of a frame it cannot enter. Never "not there yet". */
31
- export declare function isFrameEntryError(error: unknown): boolean;
32
- /** An element as WebDriver returns it from a script, before `$()` wraps it. */
33
- export type ElementRef = {
34
- 'element-6066-11e4-a52e-4f735466cecf': string;
35
- };
36
- /**
37
- * Runs IN THE PAGE, serialised with `Function.prototype.toString`, so it must
38
- * close over nothing: every input arrives as an argument. Elements are
39
- * only ever returned as object properties, each at most once — WebDriver BiDi
40
- * serialises an element repeated in a result, or one inside an array, as `{}`.
41
- */
42
- export declare function pageScript(name: string, op: PageOp, scope: WireSelector[], selector: WireSelector, options: PageApiOptions, arg: string | null): Promise<PageReply>;
43
- //# sourceMappingURL=page-script.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"page-script.d.ts","sourceRoot":"","sources":["../src/page-script.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAW,cAAc,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAEzF;;;;;GAKG;AACH,MAAM,MAAM,MAAM,GACd,OAAO,GACP,UAAU,GACV,SAAS,GACT,OAAO,GACP,OAAO,GACP,OAAO,GACP,MAAM,GACN,OAAO,GACP,WAAW,GACX,SAAS,GACT,SAAS,GACT,UAAU,GACV,QAAQ,GACR,OAAO,GACP,OAAO,GACP,MAAM,GACN,KAAK,GACL,QAAQ,CAAA;AAEZ;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GACjB;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,GACnB;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAC3C;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAA;AAEpD,oFAAoF;AACpF,qBAAa,SAAU,SAAQ,KAAK;gBACtB,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;CAI1C;AAED,uFAAuF;AACvF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAEzD;AAED,+EAA+E;AAC/E,MAAM,MAAM,UAAU,GAAG;IAAE,qCAAqC,EAAE,MAAM,CAAA;CAAE,CAAA;AAE1E;;;;;GAKG;AACH,wBAAsB,UAAU,CAC9B,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,YAAY,EAAE,EACrB,QAAQ,EAAE,YAAY,EACtB,OAAO,EAAE,cAAc,EACvB,GAAG,EAAE,MAAM,GAAG,IAAI,GACjB,OAAO,CAAC,SAAS,CAAC,CA0IpB"}