* diff

* fixes

* fixes

* fixes

* fixes

* fixes

* better docs
This commit is contained in:
Chris Tate
2026-02-19 23:51:09 -06:00
committed by GitHub
parent 9732031087
commit d5a667ea2d
21 changed files with 2446 additions and 88 deletions
+57 -1
View File
@@ -1014,7 +1014,40 @@ export type Command =
| InputKeyboardCommand
| InputTouchCommand
| SwipeCommand
| DeviceListCommand;
| DeviceListCommand
| DiffSnapshotCommand
| DiffScreenshotCommand
| DiffUrlCommand;
// Diff commands
export interface DiffSnapshotCommand extends BaseCommand {
action: 'diff_snapshot';
baseline?: string;
selector?: string;
compact?: boolean;
maxDepth?: number;
}
export interface DiffScreenshotCommand extends BaseCommand {
action: 'diff_screenshot';
baseline: string;
output?: string;
threshold?: number;
selector?: string;
fullPage?: boolean;
}
export interface DiffUrlCommand extends BaseCommand {
action: 'diff_url';
url1: string;
url2: string;
screenshot?: boolean;
fullPage?: boolean;
waitUntil?: 'load' | 'domcontentloaded' | 'networkidle';
selector?: string;
compact?: boolean;
maxDepth?: number;
}
// Response types
export interface SuccessResponse<T = unknown> {
@@ -1145,6 +1178,29 @@ export interface StylesData {
elements: ElementStyleInfo[];
}
// Diff response data
export interface DiffSnapshotData {
diff: string;
additions: number;
removals: number;
unchanged: number;
changed: boolean;
}
export interface DiffScreenshotData {
diffPath: string;
totalPixels: number;
differentPixels: number;
mismatchPercentage: number;
match: boolean;
dimensionMismatch?: boolean;
}
export interface DiffUrlData {
snapshot: DiffSnapshotData;
screenshot?: DiffScreenshotData;
}
// Browser state
export interface BrowserState {
browser: Browser | null;