UNPKG

jpglens

Version:

🔍 Universal AI-Powered UI Testing - See your interfaces through the lens of intelligence

77 lines 2.62 kB
/** * 🔍 jpglens - Testing Library Integration * Universal AI-Powered UI Testing * * @author Taha Bahrami (Kaito) * @license MIT */ import { AnalysisContext, AnalysisResult, JPGLensConfig } from '../core/types.js'; /** * Testing Library integration for jpglens * Analyze React/Vue/Angular components rendered with Testing Library */ export declare class TestingLibraryJPGLens { private aiAnalyzer; private screenshotCapture; private config; constructor(config?: JPGLensConfig); /** * Analyze rendered component with Testing Library */ analyzeComponent(container: HTMLElement, context: AnalysisContext): Promise<AnalysisResult>; /** * Analyze user interactions and their outcomes */ analyzeUserInteraction(container: HTMLElement, interaction: { type: 'click' | 'type' | 'hover' | 'focus'; element: string; value?: string; }, context: Partial<AnalysisContext>): Promise<AnalysisResult>; /** * Analyze accessibility with Testing Library queries */ analyzeAccessibility(container: HTMLElement, queries: { byRole?: string[]; byLabelText?: string[]; byPlaceholderText?: string[]; byDisplayValue?: string[]; }): Promise<AnalysisResult>; /** * Capture screenshot from DOM element (simulated for Testing Library) */ private captureElementScreenshot; /** * Create text representation of DOM element for AI analysis */ private createTextRepresentation; } /** * Analyze component rendered with Testing Library */ export declare function analyzeComponent(container: HTMLElement, context: AnalysisContext): Promise<AnalysisResult>; /** * Quick component analysis */ export declare function analyzeRenderedComponent(container: HTMLElement, componentName: string, userIntent?: string): Promise<AnalysisResult>; /** * Analyze user interaction outcome */ export declare function analyzeUserInteraction(container: HTMLElement, interaction: { type: 'click' | 'type' | 'hover' | 'focus'; element: string; value?: string; }, context?: Partial<AnalysisContext>): Promise<AnalysisResult>; /** * Accessibility-focused analysis */ export declare function analyzeAccessibility(container: HTMLElement, queries: { byRole?: string[]; byLabelText?: string[]; byPlaceholderText?: string[]; byDisplayValue?: string[]; }): Promise<AnalysisResult>; /** * Form-specific analysis */ export declare function analyzeForm(container: HTMLElement, formFields: string[]): Promise<AnalysisResult>; //# sourceMappingURL=testing-library.d.ts.map