UNPKG

ai-debug-local-mcp

Version:

🎯 ENHANCED AI GUIDANCE v4.1.2: Dramatically improved tool descriptions help AI users choose the right tools instead of 'close enough' options. Ultra-fast keyboard automation (10x speed), universal recording, multi-ecosystem debugging support, and compreh

112 lines • 3.48 kB
import { Page } from 'playwright'; export declare enum TestIssue { STALE_SELECTOR = "stale_selector", ELEMENT_CHANGED = "element_changed", FEATURE_REMOVED = "feature_removed", FLAKY_TEST = "flaky_test", DUPLICATE_TEST = "duplicate_test" } export declare enum TestSuggestion { UPDATE_SELECTOR = "update_selector", REMOVE_TEST = "remove_test", MERGE_TESTS = "merge_tests", CONSOLIDATE_TESTS = "consolidate_tests", ADD_TEST = "add_test", UPDATE_TEST = "update_test" } export declare enum TestHealth { HEALTHY = "healthy", NEEDS_ATTENTION = "needs_attention", CRITICAL = "critical" } interface Issue { type: TestIssue; selector?: string; line?: number; severity: 'low' | 'medium' | 'high'; suggestedFix?: string; } interface Suggestion { type: TestSuggestion; oldSelector?: string; newSelector?: string; confidence?: number; testName?: string; reason?: string; tests?: string[]; element?: string; suggestedTest?: string; } interface TestResult { test: string; passes: number; failures: number; } interface HealthReport { score: number; status: TestHealth; recommendations: string[]; } interface MaintenanceHistory { lastMaintenance: Date; fixesApplied: number; testsRemoved: number; testsAdded: number; } interface MaintenanceReport { summary: { totalIssues: number; criticalIssues: number; autoFixable: number; }; criticalIssues: Issue[]; suggestions: Suggestion[]; automatedFixes: Array<{ issue: Issue; fix: string; }>; manualActions: string[]; } export declare class SmartTestMaintenance { private learningData; private maintenanceHistory; detectStaleSelectors(testCode: string, page: Page): Promise<Issue[]>; detectElementChanges(testCode: string, page: Page): Promise<Issue[]>; detectRemovedFeatures(testCode: string, page: Page): Promise<Issue[]>; suggestSelectorUpdate(oldSelector: string, page: Page): Promise<Suggestion[]>; autoFixTests(testCode: string, issues: Issue[]): Promise<string>; suggestTestCleanup(testSuite: any, page: Page): Promise<Suggestion[]>; findDuplicateTests(tests: Array<{ name: string; code: string; }>): Promise<Suggestion[]>; suggestTestConsolidation(tests: any[]): Promise<Suggestion[]>; findCoverageGaps(testSelectors: string[], page: Page): Promise<string[]>; generateTestSuggestions(uncoveredElements: Array<{ selector: string; type: string; text?: string; placeholder?: string; }>): Promise<Suggestion[]>; analyzeTestEffectiveness(testResults: TestResult[]): Promise<{ flaky: TestResult[]; stable: TestResult[]; needsAttention: TestResult[]; }>; calculateTestHealth(testSuite: { totalTests: number; staleSelectors: number; duplicateTests: number; flakyTests: number; coverageGaps: number; }): Promise<HealthReport>; getMaintenanceHistory(): Promise<MaintenanceHistory>; generateMaintenanceReport(testSuiteId: string, page: Page): Promise<MaintenanceReport>; learnFromDebugSession(debugSession: any): Promise<void>; getSuggestionsFromLearning(): Promise<Suggestion[]>; detectBreakingChanges(debugSession: any): Promise<Array<{ selector: string; }>>; } export {}; //# sourceMappingURL=smart-test-maintenance.d.ts.map