UNPKG

@vizzly-testing/cli

Version:

Visual review platform for UI developers and designers

77 lines (76 loc) 2.26 kB
/** * Create a new TDD service instance */ export function createTDDService(config: any, options?: {}): TddService; export class TddService { constructor(config: any, workingDir?: string, setBaseline?: boolean); config: any; setBaseline: boolean; api: ApiService; workingDir: string; baselinePath: string; currentPath: string; diffPath: string; baselineData: any; comparisons: any[]; threshold: any; downloadBaselines(environment?: string, branch?: any, buildId?: any, comparisonId?: any): Promise<any>; /** * Handle local baseline logic (either load existing or prepare for new baselines) * @returns {Promise<Object|null>} Baseline data or null if no local baselines exist */ handleLocalBaselines(): Promise<any | null>; loadBaseline(): Promise<any>; compareScreenshot(name: any, imageBuffer: any, properties?: {}): Promise<{ name: any; status: string; baseline: any; current: any; diff: any; properties: any; }>; getResults(): { total: number; passed: number; failed: number; new: number; errors: number; comparisons: any[]; baseline: any; }; printResults(): Promise<{ total: number; passed: number; failed: number; new: number; errors: number; comparisons: any[]; baseline: any; }>; /** * Generate HTML report for TDD results * @param {Object} results - TDD comparison results */ generateHtmlReport(results: any): Promise<string>; /** * Open HTML report in default browser * @param {string} reportPath - Path to HTML report */ openReport(reportPath: string): Promise<void>; /** * Update baselines with current screenshots (accept changes) * @returns {number} Number of baselines updated */ updateBaselines(): number; /** * Create a new baseline (used during --set-baseline mode) * @private */ private createNewBaseline; /** * Update a single baseline with current screenshot * @private */ private updateSingleBaseline; } import { ApiService } from '../services/api-service.js';