/** * E2E Test Runner - Step Executor * * Executes individual test steps against appropriate adapters */ import { AdapterRegistry } from '../adapters'; import type { AdapterContext, InterpolationContext, Logger, StepResult, UnifiedStep } from '../types'; /** * Options for step execution */ export interface StepExecutorOptions { /** Default retry count for steps without explicit retry */ defaultRetries: number; /** Base delay between retries in milliseconds */ retryDelay: number; /** Logger instance */ logger: Logger; } /** * Special action identifier for TypeScript function steps */ export declare const TYPESCRIPT_FUNCTION_ACTION = "__typescript_function__"; /** * Executes individual test steps with retry logic */ export declare class StepExecutor { private readonly adapters; private readonly options; private readonly logger; constructor(adapters: AdapterRegistry, options: StepExecutorOptions); /** * Execute a single step * * @param step - The step to execute * @param context - Adapter context with variables and captured values * @param interpolationContext - Context for variable interpolation * @returns Step execution result */ executeStep(step: UnifiedStep, context: AdapterContext, interpolationContext: InterpolationContext): Promise; /** * Execute a step once without retry logic */ private executeStepOnce; /** * Execute a TypeScript function step */ private executeTypeScriptFunction; /** * Validate assertions against step result data */ private validateAssertions; /** * Capture values from step result */ private captureValues; /** * Extract a value from data using a path expression * Supports dot notation and array indexing */ private extractValue; /** * Create a step result object */ private createStepResult; } /** * Create a step executor instance * * @param adapters - Adapter registry * @param options - Executor options * @returns A new StepExecutor instance */ export declare function createStepExecutor(adapters: AdapterRegistry, options: StepExecutorOptions): StepExecutor; /** * Check if a step is a TypeScript function step * * @param step - The step to check * @returns True if the step is a TypeScript function */ export declare function isTypeScriptFunctionStep(step: UnifiedStep): boolean; /** * Create a TypeScript function step * * @param id - Step ID * @param fn - The async function to execute * @param options - Additional step options * @returns A UnifiedStep for the function */ export declare function createFunctionStep(id: string, fn: (ctx: AdapterContext) => Promise, options?: Partial>): UnifiedStep; /** * Check if all steps in a list passed * * @param results - Array of step results * @returns True if all steps passed */ export declare function allStepsPassed(results: StepResult[]): boolean; /** * Get the first failed step from results * * @param results - Array of step results * @returns The first failed step or undefined */ export declare function getFirstFailedStep(results: StepResult[]): StepResult | undefined; /** * Calculate total duration from step results * * @param results - Array of step results * @returns Total duration in milliseconds */ export declare function calculateTotalDuration(results: StepResult[]): number; //# sourceMappingURL=step-executor.d.ts.map