UNPKG

jpglens

Version:

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

92 lines 2.62 kB
/** * 🔍 jpglens - Cypress Integration * Universal AI-Powered UI Testing * * @author Taha Bahrami (Kaito) * @license MIT */ import { AnalysisContext, AnalysisResult, UserJourney, JPGLensConfig } from '../core/types.js'; declare global { namespace Cypress { interface Chainable { /** * Analyze current page state with jpglens AI */ analyzeUserExperience(context: AnalysisContext): any; /** * Analyze page state after user actions */ analyzePageState(context: Partial<AnalysisContext>): any; /** * Analyze complete user journey */ analyzeCompleteJourney(journey: UserJourney): any; /** * Prepare page for optimal AI analysis */ prepareForJPGLensAnalysis(): any; } } } /** * Cypress jpglens analyzer class */ declare class CypressJPGLens { private aiAnalyzer; private screenshotCapture; private config; constructor(config?: JPGLensConfig); static create(config?: JPGLensConfig): Promise<CypressJPGLens>; /** * Analyze current Cypress page state */ analyzeUserExperience(context: AnalysisContext): Promise<AnalysisResult>; /** * Analyze page state with minimal context */ analyzePageState(context: Partial<AnalysisContext>): Promise<AnalysisResult>; /** * Execute a complete user journey analysis */ analyzeCompleteJourney(journey: UserJourney): Promise<AnalysisResult[]>; /** * Execute user actions in Cypress */ private executeUserActions; /** * Enhance context with Cypress page information */ private enhanceContextWithPageInfo; /** * Detect frameworks using Cypress window object */ private detectFrameworks; /** * Detect design system using Cypress DOM queries */ private detectDesignSystem; } declare const cypressJPGLens: CypressJPGLens; /** * Plugin registration function (to be called in cypress/support/index.js) */ export declare function registerJPGLensCommands(): void; /** * Convenience functions for direct use */ export declare const jpglens: { /** * Quick analysis with minimal setup */ analyze: (context: Partial<AnalysisContext>) => any; /** * Full user experience analysis */ analyzeUX: (context: AnalysisContext) => any; /** * Journey analysis */ analyzeJourney: (journey: UserJourney) => any; }; export default cypressJPGLens; //# sourceMappingURL=cypress.d.ts.map