55 lines
3.0 KiB
TypeScript
55 lines
3.0 KiB
TypeScript
// Toasts/Tests/FT_ToastsSystemInitialization.ts
|
|
|
|
import { AC_ToastSystem } from '#root/Toasts/Components/AC_ToastSystem.ts';
|
|
import { EFunctionalTestResult } from '#root/UE/EFunctionalTestResult.ts';
|
|
import { FunctionalTest } from '#root/UE/FunctionalTest.ts';
|
|
|
|
/**
|
|
* Functional Test: Toast System Initialization
|
|
* Validates that toast system initializes with correct default settings
|
|
* Tests IsEnabled state and MaxVisibleToasts configuration
|
|
*/
|
|
export class FT_ToastsSystemInitialization extends FunctionalTest {
|
|
// ════════════════════════════════════════════════════════════════════════════════════════
|
|
// GRAPHS
|
|
// ════════════════════════════════════════════════════════════════════════════════════════
|
|
|
|
// ────────────────────────────────────────────────────────────────────────────────────────
|
|
// EventGraph
|
|
// ────────────────────────────────────────────────────────────────────────────────────────
|
|
|
|
/**
|
|
* Test execution - validates initialization and default settings
|
|
* Uses nested validation to check system state after initialization
|
|
*/
|
|
EventStartTest(): void {
|
|
this.ToastComponent.InitializeToastSystem();
|
|
|
|
if (this.ToastComponent.ToastSettings.IsEnabled) {
|
|
if (this.ToastComponent.ToastSettings.MaxVisibleToasts > 0) {
|
|
this.FinishTest(EFunctionalTestResult.Succeeded);
|
|
} else {
|
|
this.FinishTest(
|
|
EFunctionalTestResult.Failed,
|
|
'Invalid state: max visible toasts less then 1'
|
|
);
|
|
}
|
|
} else {
|
|
this.FinishTest(
|
|
EFunctionalTestResult.Failed,
|
|
'Invalid state: enabled=false'
|
|
);
|
|
}
|
|
}
|
|
|
|
// ════════════════════════════════════════════════════════════════════════════════════════
|
|
// VARIABLES
|
|
// ════════════════════════════════════════════════════════════════════════════════════════
|
|
|
|
/**
|
|
* Toast notification system - component under test
|
|
* @category Components
|
|
*/
|
|
private ToastComponent = new AC_ToastSystem();
|
|
}
|