@testspectra/matchers 1.2.8 → 1.2.10

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/dist/types.d.ts CHANGED
@@ -11,13 +11,20 @@ export type AssertionKey = 'elementDisplayed' | 'elementNotDisplayed' | 'element
11
11
  /**
12
12
  * Supported keyboard key names for `Spectra.pressKey(key)`.
13
13
  *
14
+ * Named special keys are emulated for real on every platform (Backspace deletes, Enter submits):
15
+ * natively on Android via keycodes, via user-event in component tests, via CDP
16
+ * `Input.dispatchKeyEvent` in web E2E. Single characters (including Space) keep the legacy
17
+ * synthetic keydown/keyup — several components consume characters through custom keydown
18
+ * handlers that would double-enter under genuine text insertion. Anything else (chords like
19
+ * `Control+a`, raw numbers) is a web-only best effort and must not be relied on cross-platform.
20
+ *
14
21
  * @example
15
22
  * ```ts
16
23
  * await Spectra.pressKey("Enter");
17
24
  * await Spectra.pressKey("Tab");
18
25
  * ```
19
26
  */
20
- export type KeyOption = 'Enter' | 'Tab' | 'Escape' | 'Backspace' | 'Delete' | 'ArrowUp' | 'ArrowDown' | 'ArrowLeft' | 'ArrowRight' | 'Space';
27
+ export type KeyOption = 'Enter' | 'Tab' | 'Escape' | 'Backspace' | 'Delete' | 'ArrowUp' | 'ArrowDown' | 'ArrowLeft' | 'ArrowRight' | 'Space' | 'Home' | 'End' | 'PageUp' | 'PageDown';
21
28
  /**
22
29
  * Cardinal directions for gestures such as swipe and scroll.
23
30
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testspectra/matchers",
3
- "version": "1.2.8",
3
+ "version": "1.2.10",
4
4
  "description": "Canonical TypeScript contracts and ambient type definitions for TestSpectra",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/types.ts CHANGED
@@ -73,6 +73,13 @@ export type AssertionKey =
73
73
  /**
74
74
  * Supported keyboard key names for `Spectra.pressKey(key)`.
75
75
  *
76
+ * Named special keys are emulated for real on every platform (Backspace deletes, Enter submits):
77
+ * natively on Android via keycodes, via user-event in component tests, via CDP
78
+ * `Input.dispatchKeyEvent` in web E2E. Single characters (including Space) keep the legacy
79
+ * synthetic keydown/keyup — several components consume characters through custom keydown
80
+ * handlers that would double-enter under genuine text insertion. Anything else (chords like
81
+ * `Control+a`, raw numbers) is a web-only best effort and must not be relied on cross-platform.
82
+ *
76
83
  * @example
77
84
  * ```ts
78
85
  * await Spectra.pressKey("Enter");
@@ -89,7 +96,11 @@ export type KeyOption =
89
96
  | 'ArrowDown'
90
97
  | 'ArrowLeft'
91
98
  | 'ArrowRight'
92
- | 'Space';
99
+ | 'Space'
100
+ | 'Home'
101
+ | 'End'
102
+ | 'PageUp'
103
+ | 'PageDown';
93
104
 
94
105
  /**
95
106
  * Cardinal directions for gestures such as swipe and scroll.
Binary file
Binary file