logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Namespace Serenity.Ui.Tests.Infrastructure.Views

    Classes

    CompositeFocusRouterTests

    Tests for CompositeFocusRouter exercised directly: the SWITCHER content-vs-nav-rail focus split, the input-suppression gate, config guards, and the single-menu wrap edge case — the branches that the view-level cross-nav tests (multi-menu STACK traversal) do not reach.

    HostedChildManagerTests

    Tests for HostedChildManager: the remount-on-show lifecycle of a composite's shared hosted children — register, mount (reparent in + prepare) on show, release (restore + reparent back) on hide, re-reserve auto slot size on re-measure, and the leak-safe subscribe/unsubscribe contract. Exercised directly against the collaborator rather than through the composite view.

    TableColumnWidthResolverTests

    Tests for Serenity.Ui.Infrastructure.Views.TableColumnWidthResolver: the AUTO-only measurement, FIXED/FLEX passthrough, the throwaway probe's lifecycle, and the ResponsiveX promotion to a floored FLEX column.

    TableRowHeightDistributorTests

    Tests for Serenity.Ui.Infrastructure.Views.TableRowHeightDistributor's even-split arithmetic and floor clamp.

    UnityCompositeUiViewChildrenTests

    Integration tests for UnityCompositeUiView child management and SWITCHER activation, exercised on a real GameObject (no factory build needed for these paths). Show()/Hide() require the factory-built wrapper and are covered by the factory/hosted-size tests.

    UnityCompositeUiViewCrossNavTests

    Tests cross-menu focus traversal on UnityCompositeUiView: moving focus between stacked menu children at boundaries (wrap vs stop), and which menu GetInputView() reports as the input target.

    UnityCompositeUiViewFactoryHostPathTests

    Tests for the composite factory's host-path derivation: each hosted leaf (menu) is resolved with a composite host path so the same definition produces a unique routing id per slot, and duplicate sibling definition ids are flagged.

    UnityCompositeUiViewHostedSizeTests

    Tests for UnityCompositeUiView hosted-size tracking: while a hosted child is mounted, its HostedSizeChanged re-applies the reserved auto ("fit content") size on the child's LayoutElement; after release the composite must no longer listen.

    UnityGameplayLoadingOverlayViewTests

    PlayMode tests for UnityGameplayLoadingOverlayView's animated teardown: Hide() lets the UnityLoadingOverlayProgressAnimator fill the bar to 100% before destroying the root (bounded by its safety timeout), and a re-Show() during that finish tail replaces the outgoing overlay instead of coexisting with it. The slider factory returns null, which the view tolerates, so no theme fixtures are needed.

    UnityLayoutBuilderChildSizingTests

    Extends UnityLayoutBuilderTests with the child-sizing branches it did not cover: FLEX growth (with optional min), PERCENT delegation to UnityPercentLayoutElement, hosted auto-size reservation, layout-group spacing/padding/alignment translation, and the null-argument guards.

    UnityLayoutBuilderTests

    Tests for UnityLayoutBuilder scroll-container construction: the ScrollRect/Viewport/Content/Scrollbar hierarchy and the explicit scrollable override used to honor the definition-level Scrollable flag.

    UnityLoadingOverlayProgressAnimatorTests

    PlayMode tests for UnityLoadingOverlayProgressAnimator's promise that a started teardown always finishes.

    Driven against the component directly, because through UnityGameplayLoadingOverlayView the safety timeout is unreachable: the displayed fill and the elapsed timer consume the same unscaled delta, the fill three times faster, so from a full target the bar reaches 100% in a third of a second against a half-second cap and wins at any frame rate. Only a target lowered after the teardown began can stall the fill, and the view drops its animator reference in Hide(), so no caller can lower it. The component is public API of a shipped package, though, and the cap is what keeps a direct consumer's teardown from hanging forever — which is the contract these tests hold.

    UnityPercentLayoutElementTests

    Tests for UnityPercentLayoutElement: the component that realizes the CSS % unit by driving a UnityEngine.UI.LayoutElement's preferred size to a fraction of its parent's measured size, with optional min/max pixel clamps, on either axis.

    UnityPrimaryInputPromptViewTests

    Tests for UnityPrimaryInputPromptView lifecycle behavior. Ensures input detection re-arms correctly after OnEnable (critical for scene reload scenarios).

    UnityScrollbarBuilderTests

    Tests for UnityScrollbarBuilder: the programmatic track+handle scrollbar generated for scrollable views, and its wiring onto a ScrollRect with auto-hide visibility.

    UnityTablePanelColumnWidthTests

    Tests for SetMatrix(TableMatrix)'s column-width resolution: AUTO/FIXED/FLEX crossed with ResponsiveX, the widest-of-header-and-cells measurement, and a regression guard against the rows holder force-stretching content-sized rows.

    UnityTablePanelMatrixTests

    Tests for SetMatrix(TableMatrix): row/header construction, header-only styling, the localization updater's header-only rule, ragged rows, rebuild-on-second-call, the empty matrix, and cell alignment (procedural vs themed template).

    UnityTablePanelRowHeightTests

    Tests for SetMatrix(TableMatrix)'s row-height resolution across the Y axis's four combinations: content-sized, authored-fixed, responsive (distributed), the unsized-root fallback, and the "fit, scroll at floor" semantic when a responsive+scrollable Y axis cannot fit every row above its content floor.

    UnityTablePanelScrollTests

    Tests for UnityTablePanel's scroll shell: no shell when nothing scrolls, single-axis and both-axes construction (one UnityEngine.UI.ScrollRect either way), per-axis content anchors, viewport reuse across a second SetMatrix(TableMatrix) call, the reparent hygiene reset, and scrollbar on/off — plus the ResponsiveY+ScrollableY "fits, never needs to scroll" pin.

    UnityUiViewSetAudioClipsTests

    Regression tests for SetAudioClips(AudioPlayerClip, AudioPlayerClip). Historically it built its clip map with Dictionary.Add, so a theme that reused one clip for both Show and Hide threw ArgumentException at view creation. The dedup-safe builder must tolerate that.

    In this article
    © 2026 Serenity. All Rights Reserved