mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-04 12:07:09 +00:00
feat(spec): expose SelectorPath in find/findAll signatures
This commit is contained in:
1 parent
0b3141fe3f
commit
049ef80206
2 files changed
+7
-4
No files matched your search
@@ -13,6 +13,7 @@ export type {
|
|||||||
Point,
|
Point,
|
||||||
PressKeyAction,
|
PressKeyAction,
|
||||||
Sampler,
|
Sampler,
|
||||||
|
SelectorPath,
|
||||||
Snapshots,
|
Snapshots,
|
||||||
State,
|
State,
|
||||||
SwipeAction,
|
SwipeAction,
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
export type Snapshots = Record<string, unknown>;
|
export type Snapshots = Record<string, unknown>;
|
||||||
export type AttrSelector = Record<string, string>;
|
export type AttrSelector = Record<string, string>;
|
||||||
|
|
||||||
|
export type SelectorPath = readonly AttrSelector[];
|
||||||
|
|
||||||
export interface AccessibilityElement {
|
export interface AccessibilityElement {
|
||||||
id?: string;
|
id?: string;
|
||||||
text?: string;
|
text?: string;
|
||||||
@@ -15,13 +17,13 @@ export interface AccessibilityElement {
|
|||||||
x?: number;
|
x?: number;
|
||||||
y?: number;
|
y?: number;
|
||||||
attrs?: Record<string, string>;
|
attrs?: Record<string, string>;
|
||||||
find(selector: string | AttrSelector): AccessibilityElement | undefined;
|
find(selector: string | AttrSelector | SelectorPath): AccessibilityElement | undefined;
|
||||||
findAll(selector: string | AttrSelector): AccessibilityElement[];
|
findAll(selector: string | AttrSelector | SelectorPath): AccessibilityElement[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AccessibilityTree {
|
export interface AccessibilityTree {
|
||||||
find(selector: string | AttrSelector): AccessibilityElement | undefined;
|
find(selector: string | AttrSelector | SelectorPath): AccessibilityElement | undefined;
|
||||||
findAll(selector: string | AttrSelector): AccessibilityElement[];
|
findAll(selector: string | AttrSelector | SelectorPath): AccessibilityElement[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface LogEntry {
|
export interface LogEntry {
|
||||||
|
|||||||
Reference in new issue
Block a user