You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
UnitTests.Viewer: List test components and allow selecting one #658
tests/CodeBeam.MudBlazor.Extensions.UnitTests.Viewer/Pages/Index.razor still comes from the default Blazor template and renders test components hardcoded by hand (currently MultiSelectTestRequiredValue and DebounceTextFieldTest). To look at any other of the ~50 test components you have to edit Index.razor, and these viewing-only edits tend to ride along in unrelated PRs. The nav menu also outdated and default.
The property public static string __description__ = "..." isn't used.
Proposal
Replace Index.razor with a small picker, modeled on MudBlazor's src/MudBlazor.UnitTests.Viewer/Pages/Index.razor, kept much simpler:
Find test components by reflection: types in the Viewer assembly whose namespace is MudExtensions.UnitTests.TestComponents and that implement IComponent.
List them in a MudDrawer with a search field that filters by name.
Show the selected component's name and its __description__, with a fallback when it's missing.
Keep the selection in the URL (e.g. /viewer/ChipFieldRequiredTest) so it survives reloads and can be linked.
Render the selected component through DynamicComponent inside an ErrorBoundary, wrapped in <CascadingValue Name="UsePopoverProvider" Value="false">, because many test components render their own MudPopoverProvider for bUnit.
Remove the leftover template pages/links (NavMenu, Bootstrap layout) and use a plain MudBlazor layout.
No changes to the test components or the unit tests are needed.
Activity