/**
 * Flow Testing Types
 * Defines interfaces for AI-powered UI flow testing
 */
/**
 * Test Mission - Natural language description of what to test
 */
export interface TestMission {
    id: string;
    name: string;
    description: string;
    mission: string;
    expectedOutcome: string;
    tags?: string[];
    createdAt: string;
    updatedAt: string;
    startUrl?: string;
    sourceFlow?: string;
    validationRules?: ValidationRule[];
    testData?: any;
}
/**
 * Validation Rule - Specific things to check during testing
 */
export interface ValidationRule {
    type: string;
    description: string;
    selector?: string;
    expectedValue?: string;
    customCheck?: string;
}
/**
 * Test Execution Status
 */
export type TestStatus = "pending" | "running" | "passed" | "failed" | "error" | "skipped";
/**
 * Test Step - Individual action taken by the AI agent
 */
export interface TestStep {
    id: string;
    order: number;
    action: string;
    intent: string;
    timestamp: string;
    screenshot?: string;
    dom?: string;
    success: boolean;
    error?: string;
    metadata?: {
        url?: string;
        elementSelector?: string;
        inputValue?: string;
        clickedElement?: string;
        navigationTarget?: string;
        uploadedFile?: string;
        filePath?: string;
    };
}
/**
 * Drift Alert - Indication of divergence from project gravity
 */
export interface DriftAlert {
    type: "objective" | "visual" | "logic" | "implementation";
    severity: "low" | "medium" | "high";
    message: string;
    expected: string;
    actual: string;
    timestamp: string;
}
/**
 * Test Execution Result
 */
export interface TestExecutionResult {
    missionId: string;
    executionId: string;
    status: TestStatus;
    startedAt: string;
    completedAt?: string;
    duration?: number;
    steps: TestStep[];
    validationResults: ValidationResult[];
    finalState: {
        url: string;
        screenshot?: string;
        dom?: string;
    };
    error?: {
        message: string;
        stack?: string;
        step?: string;
    };
    aiNotes?: string;
    driftAnalysis?: {
        narrativeCompliance: number;
        alerts: DriftAlert[];
    };
}
/**
 * Validation Result
 */
export interface ValidationResult {
    rule: ValidationRule;
    passed: boolean;
    actualValue?: string;
    message: string;
    timestamp: string;
}
/**
 * Test Report - Complete summary of test execution
 */
export interface TestReport {
    reportId: string;
    mission: TestMission;
    execution: TestExecutionResult;
    generatedAt: string;
    summary: {
        totalSteps: number;
        successfulSteps: number;
        failedSteps: number;
        totalValidations: number;
        passedValidations: number;
        failedValidations: number;
        overallStatus: TestStatus;
    };
    driftReport?: {
        overallScore: number;
        criticalAlerts: number;
    };
    insights?: string[];
    recommendations?: string[];
}
/**
 * Test Missions Storage
 */
export interface TestMissionsStorage {
    version: string;
    createdAt: string;
    updatedAt: string;
    missions: TestMission[];
    executionHistory: {
        missionId: string;
        executions: TestExecutionResult[];
    }[];
}
/**
 * Browser Context Configuration
 */
export interface BrowserConfig {
    headless: boolean;
    viewport?: {
        width: number;
        height: number;
    };
    slowMo?: number;
    baseUrl?: string;
    timeout?: number;
    screenshotOnFailure?: boolean;
    recordVideo?: boolean;
}
/**
 * Test Generation Options
 */
export interface TestGenerationOptions {
    fromUserFlows?: boolean;
    specificFlows?: string[];
    includeEdgeCases?: boolean;
    validationLevel?: "basic" | "standard" | "comprehensive";
}
/**
 * Interactive Test Session
 */
export interface InteractiveTestSession {
    sessionId: string;
    startedAt: string;
    mission: Partial<TestMission>;
    recordedSteps: TestStep[];
    currentUrl: string;
    status: "recording" | "paused" | "completed" | "cancelled";
}
//# sourceMappingURL=flow-testing.d.ts.map