//! Avatar widget tests extracted from src/widget/display/avatar.rs

use revue::prelude::*;

// Note: Most tests for Avatar access private fields (get_initials, get_bg_color),
// so only a subset of tests that use public APIs are extracted here.

// =========================================================================
// Avatar builder tests (using public APIs only)
// =========================================================================

#[test]
fn test_avatar_builder() {
    let a = Avatar::new("Test User").offline().status(Color::YELLOW);

    // Test what we can through public APIs only
    // NOTE: We can't test private fields like initials, bg_color from public API
}

#[test]
fn test_avatar_with_icon() {
    let a = Avatar::new("Test User").icon('X');
    // Test creation with icon - can't verify icon field from public API
}

#[test]
fn test_avatar_online() {
    let a = Avatar::new("Test User").online();
    // Test online status - can't verify status field from public API
}

#[test]
fn test_avatar_offline() {
    let a = Avatar::new("Test User").offline();
    // Test offline status - can't verify status field from public API
}

#[test]
fn test_avatar_away() {
    let a = Avatar::new("Test User").away();
    // Test away status - can't verify status field from public API
}

#[test]
fn test_avatar_busy() {
    let a = Avatar::new("Test User").busy();
    // Test busy status - can't verify status field from public API
}

#[test]
fn test_avatar_status_methods() {
    let a = Avatar::new("Test").offline().status(Color::YELLOW);
    // Can't verify status field, just verify it compiles
}

// =========================================================================
// Helper function tests
// =========================================================================

#[test]
fn test_helper_functions() {
    let a = avatar("Test");
    let a2 = avatar_icon('X');
    // Just verify constructors compile
}

#[test]
fn test_avatar_builder_chaining() {
    let a = Avatar::new("Test User").offline().status(Color::YELLOW);
    // Can't verify status field, just verify it compiles
}
