@testspectra/matchers 1.2.2 → 1.2.3

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
@@ -901,6 +901,10 @@ export interface SingleElementProxy extends ElementReceiverAssertions<Promise<vo
901
901
  * Returns true if the element is enabled (not disabled).
902
902
  */
903
903
  isEnabled(): Promise<boolean>;
904
+ /**
905
+ * Returns true if the element is visible, enabled, and in the viewport (clickable).
906
+ */
907
+ isClickable(): Promise<boolean>;
904
908
  /**
905
909
  * Returns true if the checkbox, radio, or `<option>` is selected.
906
910
  */
@@ -1382,6 +1386,17 @@ export interface SpectraStatic {
1382
1386
  * ```
1383
1387
  */
1384
1388
  click(target: ElementTarget, textOrOptions?: string | ClickOptions): Promise<void>;
1389
+ /**
1390
+ * Clicks at absolute viewport coordinates (x, y).
1391
+ *
1392
+ * @param x Horizontal viewport coordinate.
1393
+ * @param y Vertical viewport coordinate.
1394
+ * @example
1395
+ * ```ts
1396
+ * await Spectra.clickAt(100, 200);
1397
+ * ```
1398
+ */
1399
+ clickAt(x: number, y: number): Promise<void>;
1385
1400
  /**
1386
1401
  * Performs a double-click interaction on the specified element target.
1387
1402
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testspectra/matchers",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
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
@@ -1097,6 +1097,11 @@ export interface SingleElementProxy extends ElementReceiverAssertions<Promise<vo
1097
1097
  */
1098
1098
  isEnabled(): Promise<boolean>;
1099
1099
 
1100
+ /**
1101
+ * Returns true if the element is visible, enabled, and in the viewport (clickable).
1102
+ */
1103
+ isClickable(): Promise<boolean>;
1104
+
1100
1105
  /**
1101
1106
  * Returns true if the checkbox, radio, or `<option>` is selected.
1102
1107
  */
@@ -1602,6 +1607,18 @@ export interface SpectraStatic {
1602
1607
  */
1603
1608
  click(target: ElementTarget, textOrOptions?: string | ClickOptions): Promise<void>;
1604
1609
 
1610
+ /**
1611
+ * Clicks at absolute viewport coordinates (x, y).
1612
+ *
1613
+ * @param x Horizontal viewport coordinate.
1614
+ * @param y Vertical viewport coordinate.
1615
+ * @example
1616
+ * ```ts
1617
+ * await Spectra.clickAt(100, 200);
1618
+ * ```
1619
+ */
1620
+ clickAt(x: number, y: number): Promise<void>;
1621
+
1605
1622
  /**
1606
1623
  * Performs a double-click interaction on the specified element target.
1607
1624
  *
Binary file
Binary file