// Debug/Tests/FT_DebugSystem.ts import { AC_DebugHUD } from '#root/Debug/Components/AC_DebugHUD.ts'; import { AC_Movement } from '#root/Movement/Components/AC_Movement.ts'; import { AC_ToastSystem } from '#root/Toasts/Components/AC_ToastSystem.ts'; import { DataTableFunctionLibrary } from '#root/UE/DataTableFunctionLibrary.ts'; import { EFunctionalTestResult } from '#root/UE/EFunctionalTestResult.ts'; import { FunctionalTest } from '#root/UE/FunctionalTest.ts'; import { SystemLibrary } from '#root/UE/SystemLibrary.ts'; /** * Functional Test: Debug System Basic Functionality * Validates initialization, component validity, and data table consistency */ export class FT_DebugSystem extends FunctionalTest { // ════════════════════════════════════════════════════════════════════════════════════════ // GRAPHS // ════════════════════════════════════════════════════════════════════════════════════════ // ──────────────────────────────────────────────────────────────────────────────────────── // EventGraph // ──────────────────────────────────────────────────────────────────────────────────────── /** * Test entry point - validates basic debug system functionality * Uses nested validation to check initialization, page count, and component validity */ EventStartTest(): void { this.DebugHUDComponent.InitializeDebugHUD( this.MovementComponent, this.ToastSystemComponent ); if (this.DebugHUDComponent.GetTestData().IsInitialized) { if ( DataTableFunctionLibrary.GetDataTableRowNames( this.DebugHUDComponent.GetTestData().DebugDataTable ).length === this.DebugHUDComponent.GetTestData().DebugPages.length ) { if (SystemLibrary.IsValid(this.MovementComponent)) { if (SystemLibrary.IsValid(this.DebugHUDComponent)) { this.FinishTest(EFunctionalTestResult.Succeeded); } else { this.FinishTest( EFunctionalTestResult.Failed, 'DebugHUD component not valid' ); } } else { this.FinishTest( EFunctionalTestResult.Failed, 'Debug HUD: Movement component not valid' ); } } else { this.FinishTest( EFunctionalTestResult.Failed, `Debug HUD: Expected ${this.DebugHUDComponent.GetTestData().DebugPages.length} pages, got ${ DataTableFunctionLibrary.GetDataTableRowNames( this.DebugHUDComponent.GetTestData().DebugDataTable ).length }` ); } } else { this.FinishTest( EFunctionalTestResult.Failed, 'Debug HUD failed to initialize' ); } } // ════════════════════════════════════════════════════════════════════════════════════════ // VARIABLES // ════════════════════════════════════════════════════════════════════════════════════════ /** * Movement system component - required for debug HUD initialization * @category Components */ MovementComponent = new AC_Movement(); /** * Debug HUD system - primary component under test * Tests basic system initialization and component validity * @category Components */ DebugHUDComponent = new AC_DebugHUD(); /** * Toast notification system - required for debug HUD initialization * @category Components */ ToastSystemComponent = new AC_ToastSystem(); }