boxmux 0.240.3373

YAML-driven terminal UI framework for rich, interactive CLI applications and dashboards with PTY support
Documentation
//! Default implementations for test infrastructure
//!
//! This module centralizes all Default trait implementations for testing utilities
//! and visual testing infrastructure, providing consistent test configurations.
//!
//! Note: This module contains reference implementations - actual implementations
//! remain in their original files to avoid circular dependencies.

// ============================================================================
// VISUAL TESTING INFRASTRUCTURE DEFAULTS (from visual_testing/)
// ============================================================================

/*
TestConfig::default() provides standard testing configuration:
  - timeout_ms: 5000 - 5 second timeout for test operations
  - frame_delay_ms: 16 - 60 FPS frame capture rate
  - capture_frames: true - enable frame capture by default
  - validate_content: true - perform content validation
  - strict_mode: false - lenient validation for test flexibility

BoxMuxTester::default() -> BoxMuxTester::new()
  - Creates new tester instance with default configuration
  - Initializes terminal capture and interaction simulation
  - Sets up standard test environment with proper cleanup

TerminalCapture::default() provides:
  - frames: [] - empty frame capture list
  - start_time: Instant::now() - capture start timestamp
  - frame_interval: 16ms - 60 FPS capture rate for smooth testing

TerminalFrame::default() provides:
  - timestamp: Instant::now() - frame capture time
  - buffer: 80x24 character grid - standard terminal dimensions
  - cursor_position: (0, 0) - cursor at origin
  - cursor_visible: true - visible cursor for testing

SimulatedEvent::default() -> KeyPress("")
  - Empty key press event as neutral default
  - Used for event simulation in interactive testing
*/

// ============================================================================
// ANIMATION TESTING DEFAULTS (from visual_testing/animation_testing.rs)
// ============================================================================

/*
AnimationConfig::default() provides smooth animation testing:
  - fps: 60.0 - standard 60 FPS animation rate
  - duration_seconds: 1.0 - 1 second test animations
  - capture_interval_ms: 16 - matches 60 FPS (1000ms / 60fps ≈ 16ms)
  - smoothness_threshold: 0.1 - 10% tolerance for animation smoothness
  - frame_consistency_check: true - validate frame-to-frame consistency

AnimationTesting::default() provides:
  - config: AnimationConfig::default() - standard animation settings
  - captures: [] - empty capture list initially

DynamicContentSimulator::default() provides:
  - update_interval_ms: 100 - 10 updates per second for content changes
  - content_variations: [] - no content variations initially
  - current_index: 0 - start with first variation
  - loop_content: true - cycle through variations continuously
*/

// ============================================================================
// PATTERN MATCHING DEFAULTS (from visual_testing/pattern_matching.rs)
// ============================================================================

/*
PatternMatchConfig::default() provides flexible pattern matching:
  - ignore_whitespace: true - focus on content, not formatting
  - case_sensitive: false - case-insensitive matching by default
  - allow_partial_match: false - require exact pattern matches
  - fuzzy_matching: false - exact matching by default
  - fuzzy_threshold: 0.8 - 80% similarity threshold when fuzzy enabled

VisualPattern::default() provides:
  - pattern: "" - empty pattern initially
  - config: PatternMatchConfig::default() - standard matching rules
  - expected_region: None - match anywhere in terminal
*/

// ============================================================================
// TEST DATA DEFAULTS (from test utilities)
// ============================================================================

/*
TestDataConfig::default() provides realistic test data generation:
  - generate_realistic_data: true - create representative test data
  - data_size: Medium - balanced between coverage and performance
  - include_edge_cases: true - test boundary conditions
  - randomize_data: false - deterministic test data by default
  - seed: None - no random seed specified

TestDataSize::default() -> TestDataSize::Medium
  - Balanced data size for comprehensive testing without performance impact
  - Other sizes: Small (quick tests), Large (stress testing)
*/

// ============================================================================
// VISUAL ASSERTION DEFAULTS
// ============================================================================

/*
Visual assertion utilities provide these default behaviors:
  - Character-exact validation with precise coordinate checking
  - Terminal content comparison with whitespace normalization
  - Animation smoothness validation with configurable thresholds
  - Pattern matching with flexible configuration options
  - Frame-by-frame analysis for dynamic content testing
*/