AyCode.Blazor/AyCode.Blazor.Components.Tests/Grids
Loretta 85dbb853c7 Update ToonTests to serialize type metadata only
Replaced AcToonSerializer.Serialize with SerializeTypeMetadata<FullProcessModel> in ToonTests. The test now serializes only the type metadata for FullProcessModel using the domain description, rather than serializing the actual data instance. Assertions and comments remain unchanged.
2026-03-28 17:25:12 +01:00
..
MgGridBaseTests.cs Add URL link support to grid columns and info panel 2025-12-22 14:37:55 +01:00
README.md Update ToonTests to serialize type metadata only 2026-03-28 17:25:12 +01:00
TestMgGrid.cs Add URL link support to grid columns and info panel 2025-12-22 14:37:55 +01:00

README.md

Grids

Grid component integration tests for MgGridBase layout persistence, column rendering, and URL link functionality.

Key Files

  • TestMgGrid.cs -- Test infrastructure for grid testing:
    • TestGridOrderItemDataSource -- DataSource with the 3-parameter constructor required by MgGridBase.OnInitializedAsync via Activator.CreateInstance.
    • DynamicColumnAddingEventArgs -- Event args for customizing dynamically added columns.
    • TestMgGridBase<...> -- Abstract generic test grid that overrides layout persistence with in-memory Dictionary storage and auto-builds columns from TDataItem properties via reflection.
    • TestMgGridOrderItem -- Concrete test grid bound to TestOrderItem entities.
  • MgGridBaseTests.cs -- [TestClass] with tests for:
    • Column width persistence across grid re-renders.
    • Layout storage population after render.
    • Separate layout keys for differently named grids.
    • Master grid detection.
    • Reflection-based column building (verifies Id, ProductName, Quantity columns).
    • MgGridDataColumn.UrlLink rendering with token replacement.

LLM Maintenance: If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code.