Skip to content

Commit 2398866

Browse files
csharpfritzCopilot
andauthored
feat: Wizard component — templates, 117 tests, Playwright coverage (FritzAndFriends#554)
* feat(Wizard): Add SSR form navigation and HTML fidelity improvements - Fix Wizard HTML output to match Web Forms: border='0', height:100%, nested navigation table with cellspacing/cellpadding - Change navigation buttons to type='submit' (matching Web Forms) - Add static SSR form-based navigation: hidden __wizard_step field persists state across postbacks, __wizard_action field carries button clicks via named submit buttons - ProcessPendingNavigation defers until enough steps register ZavaLoanPortal Build 2026 demo: - Add /dev/login endpoint for acceptance test authentication - Use native <form> with @formname for proper SSR form handling - Set AutoGenerateColumns='false' on GridView (no DB available) - Add try-catch around DB calls for resilience without SQL Server - 11 Playwright acceptance tests (navigation, auth, wizard steps) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * feat: Wizard component, v0.20 prep, and preview publish workflow - Bump version.json to 0.20.0 for Wizard release - Add nuget-preview.yml workflow for auto-publish on merge to dev - Switch ZavaLoanPortal to NuGet package reference (0.20.0-preview.*) - Add EmptyDataText to ZavaLoanPortal GridView Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * docs(ai-team): wizard-validation session — merge decisions, archive old entries Session: 2026-05-21T01-19Z-wizard-validation Requested by: Copilot CLI (Scribe) Changes: - Archived 4 decisions older than 7 days to decisions-archive.md - Merged 22 inbox decisions into decisions.md (22 files deleted) - Deduplication applied (exact duplicates removed) - decisions.md reduced from 64,797 → 46,159 bytes - Orchestration log and session log written - Beast and Bishop history files summarized and archived * feat(Wizard): wire templates, add 100+ bUnit tests, Playwright integration tests - Wire StartNavigationTemplate, StepNavigationTemplate, FinishNavigationTemplate, SideBarTemplate - Honor FinishCompleteButtonText with FinishButtonText fallback - Add Callbacks.razor, StepTypes.razor, EdgeCases.razor test files - Add Wizard smoke test and 4 interactive Playwright tests - Update Wizard documentation 117 passing tests (6 skipped for unimplemented behaviors) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * docs(ai-team): Wizard samples & tests spawn + decision merge Session: 2026-05-21T12-26-wizard-samples-tests Spawned agents: Cyclops (samples), Colossus (tests) Merged by: Scribe Changes: - Merged 3 inbox decisions into decisions.md (wizard finish button precedence, playwright locator scoping, unsupported behaviors QA) - Updated Cyclops history.md with team update on finish button label precedence - Updated Colossus history.md with team update on playwright locator scoping decision - Updated Rogue history.md with team update on QA gap documentation approach - No decisions archived (all entries post 2026-04-21 cutoff) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * feat(Wizard): add template demos and acceptance tests - Add 5 sample demos: FinishCompleteButtonText, SideBarTemplate, StartNavigationTemplate, StepNavigationTemplate, FinishNavigationTemplate - Add 5 Playwright acceptance tests for template features - All demos use data-audit-control Wizard-7 through Wizard-11 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix(Wizard): fix 3 Playwright test failures on CI - Wizard_FinishCompleteButtonText: was clicking forward twice (past Finish to Complete step where nav is hidden). Now clicks once to reach Finish. - Wizard_FinishNavigationTemplate: same issue — stop at Finish step (idx 1) instead of advancing to Complete (idx 2). - Wizard_StepNavigationTemplate: add explicit wait for hidden input value change to handle Blazor Server render latency on CI. All three tests now use WaitForAsync on the step hidden input to ensure the component has re-rendered before asserting. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * feat(Wizard): polish - sidebar HTML fidelity, ARIA, MoveTo/GetHistory, single-step nav hiding - Sidebar now renders table/tr/td structure matching Web Forms DataList output - Added ARIA attributes: role='navigation' on sidebar, role='tabpanel' on step content - Single-step wizard hides navigation buttons (HasNavigationTarget check) - Added MoveTo(int) API for programmatic step navigation - Added GetHistory() API exposing navigation history - WizardStep implements IDisposable for dynamic removal - Programmatic ActiveStepIndex changes fire OnActiveStepChanged - 49 passing tests, 0 skipped Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: use ARIA selector for Wizard nav area in Playwright tests The td[align='right'].Last selector was ambiguous after the sidebar table structure change — nested button tds also match. Use the td[role='navigation'][aria-label='Wizard navigation'] selector instead which precisely targets the navigation container. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: add InteractiveServer rendermode to Wizard sample + PR test summaries - Wizard sample page was missing @rendermode InteractiveServer, causing @OnClick handlers to be inert under static SSR (root cause of 3 CI Playwright timeouts) - Add EnricoMi/publish-unit-test-result-action to both build.yml and integration-tests.yml so test results are posted as PR comments Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: make Wizard SSR-compatible with form-based navigation - Wrap Wizard in <form method='post' @formname @onsubmit> for static SSR - Navigation buttons submit the form; HandleFormSubmit reads the action from form data and dispatches to the appropriate handler - Hidden field __wizard_step carries current step index across POSTs - Sidebar links changed from <a @OnClick> to <button type='submit'> with named values (__sidebar_N) for SSR form submission - Keep @OnClick handlers on buttons for interactive/bUnit compatibility - Revert @rendermode InteractiveServer from sample page (SSR is the target) - Update Playwright helper to use WaitForLoadStateAsync(NetworkIdle) - Update bUnit selectors from 'a' to 'button[type=submit]' for sidebar - Add PR test summary comments via EnricoMi/publish-unit-test-result-action - 49 bUnit tests passing Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: CI workflow comment_mode and flaky ConfigurationManager test - Change comment_mode from 'update' to 'always' (valid value for EnricoMi action) - Add [Collection] to ConfigurationManagerTests to prevent parallel static state race - Use ShouldNotBeNull() instead of null-forgiving operator for better diagnostics Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: Playwright tests use Attached state for hidden input locators - WaitForAsync on input[type='hidden'] needs State=Attached (not Visible) - Reset sample wizard step initial values to 0 for correct test flow Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: increase SelectMethodAsync test timeout from 2s to 5s Prevents flaky failures on slow CI runners where async data loading may not complete within 2 seconds. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent ae505ca commit 2398866

327 files changed

Lines changed: 4470 additions & 977927 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,3 +117,14 @@ jobs:
117117
path: src/BlazorWebFormsComponents.Analyzers.Test/TestResults/*.trx
118118
reporter: dotnet-trx
119119
fail-on-error: true
120+
121+
- name: Post test summary to PR
122+
if: always() && github.event_name == 'pull_request'
123+
uses: EnricoMi/publish-unit-test-result-action@v2
124+
with:
125+
files: |
126+
src/BlazorWebFormsComponents.Test/TestResults/*.trx
127+
src/BlazorWebFormsComponents.Analyzers.Test/TestResults/*.trx
128+
check_name: Unit Tests Summary
129+
comment_title: "🧪 Unit Test Results"
130+
comment_mode: always

.github/workflows/integration-tests.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,13 @@ jobs:
9797
path: samples/AfterBlazorServerSide.Tests/TestResults/*.trx
9898
reporter: dotnet-trx
9999
fail-on-error: true
100+
101+
- name: Post test summary to PR
102+
if: always() && github.event_name == 'pull_request'
103+
uses: EnricoMi/publish-unit-test-result-action@v2
104+
with:
105+
files: |
106+
samples/AfterBlazorServerSide.Tests/TestResults/*.trx
107+
check_name: Integration Tests Summary
108+
comment_title: "🎭 Integration Test Results"
109+
comment_mode: always
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Publish Preview NuGet
2+
3+
on:
4+
push:
5+
branches:
6+
- 'dev'
7+
paths:
8+
- 'src/BlazorWebFormsComponents/**'
9+
- 'Directory.Build.props'
10+
- 'version.json'
11+
12+
jobs:
13+
publish-preview:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
packages: write
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
25+
- name: Setup .NET
26+
uses: actions/setup-dotnet@v4
27+
with:
28+
dotnet-version: '10.0.x'
29+
30+
- name: Install NBGV
31+
run: dotnet tool install --global nbgv
32+
33+
- name: Get version from NBGV
34+
id: version
35+
run: |
36+
VERSION=$(nbgv get-version -v NuGetPackageVersion)
37+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
38+
echo "📦 Publishing version: $VERSION"
39+
40+
- name: Restore dependencies
41+
run: dotnet restore src/BlazorWebFormsComponents/BlazorWebFormsComponents.csproj
42+
43+
- name: Build
44+
run: dotnet build src/BlazorWebFormsComponents/BlazorWebFormsComponents.csproj --configuration Release --no-restore
45+
46+
- name: Run tests
47+
run: |
48+
dotnet restore src/BlazorWebFormsComponents.Test/BlazorWebFormsComponents.Test.csproj
49+
dotnet test src/BlazorWebFormsComponents.Test/BlazorWebFormsComponents.Test.csproj --configuration Release --verbosity normal
50+
51+
- name: Pack
52+
run: dotnet pack src/BlazorWebFormsComponents/BlazorWebFormsComponents.csproj --configuration Release --no-build --output ./nupkg
53+
54+
- name: Push to GitHub Packages
55+
run: dotnet nuget push ./nupkg/*.nupkg --source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
56+
57+
- name: Push to nuget.org
58+
env:
59+
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
60+
if: env.NUGET_API_KEY != ''
61+
run: dotnet nuget push ./nupkg/*.nupkg --source "https://api.nuget.org/v3/index.json" --api-key ${{ env.NUGET_API_KEY }} --skip-duplicate
62+
63+
- name: Summary
64+
run: |
65+
echo "### 📦 Preview Published" >> $GITHUB_STEP_SUMMARY
66+
echo "" >> $GITHUB_STEP_SUMMARY
67+
echo "**Version:** \`${{ steps.version.outputs.version }}\`" >> $GITHUB_STEP_SUMMARY
68+
echo "**Package:** Fritz.BlazorWebFormsComponents" >> $GITHUB_STEP_SUMMARY
69+
echo "**Feed:** nuget.org + GitHub Packages" >> $GITHUB_STEP_SUMMARY

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,3 +355,6 @@ planning-docs/ASPX-MIDDLEWARE-FEASIBILITY.md
355355
.squad/decisions/inbox/
356356
.squad/sessions/
357357
.squad-workstream
358+
site/
359+
samples/ZavaLoanPortal
360+
samples/AfterZavaLoanPortal/watch.ps1

.squad/agents/colossus/history.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,3 +133,27 @@ Added 5 smoke tests (Timer, UpdatePanel, UpdateProgress, ScriptManager, Substitu
133133

134134

135135
📌 Team update (2026-05-07T13:17): Bishop completed GridView/ListView template emission fixes — ItemType propagation and explicit placeholder contexts now reduce acceptance-test repair surface on data-bound pages. CLI: 603/603 tests. Next: Run 41 validation — decided by Bishop
136+
137+
### Wizard Integration Coverage Audit (2026-05-20T21:07:06.347-04:00)
138+
- Wizard sample page exists at `samples/AfterBlazorServerSide/Components/Pages/ControlSamples/Wizard/Wizard.razor` (not `Index.razor`).
139+
- The Wizard sample demonstrates six scenarios: basic multi-step flow, no-sidebar mode, `AllowReturn="false"`, cancel button handling, custom navigation button text, and `HeaderTemplate` rendering.
140+
- Sample-site navigation is driven by `samples/AfterBlazorServerSide/ComponentCatalog.cs`; Wizard is registered there under the Navigation category with route `/ControlSamples/Wizard`.
141+
- `samples/AfterBlazorServerSide/Components/Layout/NavMenu.razor` renders links from `ComponentCatalog`, so Wizard is available in the live side navigation even though `ComponentList.razor` also contains a separate static link.
142+
- `samples/AfterBlazorServerSide.Tests\ControlSampleTests.cs` has no Wizard smoke-test `InlineData`, and `samples/AfterBlazorServerSide.Tests\InteractiveComponentTests.cs` has no Wizard-specific interaction test.
143+
- Running `dotnet test samples/AfterBlazorServerSide.Tests --nologo --filter "Wizard"` currently exercises CreateUserWizard coverage only; after installing Playwright Chromium, the filtered run succeeded with 1 test and still did not validate `/ControlSamples/Wizard`.
144+
- Manual browser verification confirmed `/ControlSamples/Wizard` loads without console errors and that navigation from the site sidebar reaches the page; sample interactions on the page advanced wizard state successfully.
145+
146+
### Wizard Playwright Coverage Added (2026-05-20T21:19:29.902-04:00)
147+
- Added Wizard smoke coverage by inserting `/ControlSamples/Wizard` into the Navigation control theory in `samples/AfterBlazorServerSide.Tests\ControlSampleTests.cs`.
148+
- Added four Wizard interaction tests in `samples/AfterBlazorServerSide.Tests\InteractiveComponentTests.cs`: next-step, previous-step, sidebar navigation, and finish-to-complete flow.
149+
- Wizard sample pages contain multiple instances of the component with repeated button labels, so Playwright locators should scope to `data-audit-control="Wizard-1"` for the basic sample to avoid ambiguous `Next`, `Previous`, and `Finish` matches.
150+
- Key verification markers for the basic Wizard sample are `Step 1: Personal Information`, `Step 2: Preferences`, `Step 3: Review`, `Registration Complete!`, and the `Finish event fired!` success alert in `samples/AfterBlazorServerSide/Components/Pages/ControlSamples/Wizard/Wizard.razor`.
151+
- Compile-only validation succeeded with `dotnet build samples\AfterBlazorServerSide.Tests --nologo`; tests were not executed because the task explicitly limited validation to compilation.
152+
153+
≡ Team update (2026-05-21T12:26): Scope Wizard Playwright locators to `data-audit-control="Wizard-N"` containers to avoid ambiguous button/sidebar text matching across six sample instances on same route. Use container-scoped locators for all interactive coverage to ensure deterministic targeting — decided by Colossus
154+
155+
### Wizard Template Acceptance Coverage (2026-05-21T08:26:50.933-04:00)
156+
- Added five Wizard template-focused Playwright tests in `samples/AfterBlazorServerSide.Tests\InteractiveComponentTests.cs` for the expected `data-audit-control` wrappers `Wizard-7` through `Wizard-11`.
157+
- For the not-yet-landed sample demos, broad assertions are safer than exact text checks: verify custom navigation/sidebar template structure exists inside the scoped Wizard wrapper instead of hard-coding Cyclops' final demo text.
158+
- Added small Wizard-specific test helpers to reuse the page navigation pattern, collect console errors, and find the forward navigation control without matching `Previous`, `Back`, or `Cancel` labels.
159+
- Compile validation succeeded with `dotnet build samples\AfterBlazorServerSide.Tests --nologo` after the test additions.

.squad/agents/cyclops/history.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@
99

1010
<!-- Summarized 2026-02-27 by Scribe covers M1M16 -->
1111

12+
### 2026-05-20T21:19:29.902-04:00: Wizard template wiring
13+
14+
- `src/BlazorWebFormsComponents/Wizard.razor` owns the rendered sidebar and navigation chrome; step content still comes from registered `WizardStep` children.
15+
- `StartNavigationTemplate`, `StepNavigationTemplate`, and `FinishNavigationTemplate` should replace the default button table only for their matching effective step types.
16+
- `SideBarTemplate` already acts as a full replacement for the built-in step links, so Wizard customization work should preserve that replacement behavior.
17+
- `FinishCompleteButtonText` now needs to participate in the rendered Finish button label, with `FinishButtonText` preserved as the fallback for existing callers.
18+
- Key files: `src/BlazorWebFormsComponents/Wizard.razor`, `src/BlazorWebFormsComponents/Wizard.razor.cs`, `src/BlazorWebFormsComponents.Test/Wizard/Navigation.razor`, `docs/NavigationControls/Wizard.md`.
19+
1220

1321
### 2026-04-28: CLI Semantic Pattern Catalog Entries
1422

@@ -74,3 +82,19 @@
7482

7583
≡ Team update (2026-05-07): Inbox merged, decisions consolidated — Scribe
7684

85+
86+
≡ Team update (2026-05-21T12:26): Wizard finish button label precedence — FinishCompleteButtonText takes precedence over FinishButtonText for backward compatibility. Cyclops & Colossus spawned for sample templates and acceptance tests — decided by Cyclops
87+
88+
### 2026-05-21T08:26:50.933-04:00: Wizard sample template demonstrations
89+
90+
**Task:** Add missing Wizard feature demos to the server-side sample page for the newly wired navigation/sidebar template features.
91+
92+
**Changes delivered:**
93+
- Added sample scenarios 7-11 in `samples/AfterBlazorServerSide/Components/Pages/ControlSamples/Wizard/Wizard.razor`.
94+
- Demonstrated `FinishCompleteButtonText` overriding `FinishButtonText` on a finish step with a complete step following it.
95+
- Added minimal working demos for `SideBarTemplate`, `StartNavigationTemplate`, `StepNavigationTemplate`, and `FinishNavigationTemplate` using custom button layouts and local step state.
96+
- Verified the sample app still compiles with `dotnet build samples/AfterBlazorServerSide --nologo`.
97+
98+
**Key behavior:**
99+
- The sample page can showcase step-specific templates by seeding each demo's `ActiveStepIndex` to the step type being demonstrated.
100+
- Custom navigation templates on the sample page can drive the wizard by updating the bound `ActiveStepIndex` directly, which is enough for feature demonstrations without extra component changes.

.squad/agents/forge/history.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,13 @@
6464

6565
**Deliverable:** Full gap analysis written to `.squad/decisions/inbox/forge-deptportal-analysis.md`
6666

67+
## Learnings
68+
69+
### 2026-05-20T21:07:06.347-04:00: Wizard Web Forms fidelity review
70+
71+
- `src/BlazorWebFormsComponents/Wizard.razor` already uses a table-based shell, but the header and navigation rows live inside a nested content table instead of the outer table layout used by ASP.NET Web Forms Wizard.
72+
- `src/BlazorWebFormsComponents/Wizard.razor.cs` matches the core step model (`ActiveStepIndex`, `DisplaySideBar`, `HeaderText`, destination URLs, key navigation events, `WizardStepType` auto-resolution) and includes SSR form replay via `__wizard_step` and `__wizard_action` fields.
73+
- Declared Wizard surface area overstates actual behavior: `StartNavigationTemplate`, `StepNavigationTemplate`, `FinishNavigationTemplate`, `SideBarButtonStyle`, and `FinishCompleteButtonText` exist in code/docs but are not wired into rendered markup.
74+
- Sidebar fidelity gap: the Blazor Wizard renders flat `<a>/<span><br />` content inside one `<td>` rather than the Web Forms sidebar list/table/button structure, so CSS/JS targeting the original sidebar DOM will not match cleanly.
75+
- Key review files for future parity checks: `src/BlazorWebFormsComponents/Wizard.razor`, `src/BlazorWebFormsComponents/Wizard.razor.cs`, `src/BlazorWebFormsComponents/WizardStep.razor.cs`, `src/BlazorWebFormsComponents.Test/Wizard/Navigation.razor`, and `docs/NavigationControls/Wizard.md`.
76+

.squad/agents/rogue/history.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,3 +115,44 @@ Confirmed 10/10 ComponentRef tests passing. Test coverage is complete — no fur
115115
- L1 migration stayed at 19 seconds; build repair dropped to 63 seconds.
116116
- Startup smoke checks for `/`, `/ProductList`, `/About`, and `/Account/Login` all returned HTTP 200 before test execution.
117117
- Three of the four target fixes (`Entities`/`DataContext`, EDMX T4 exclusion, BLL namespace alignment) were not directly exercised by WingtipToys, so they still need another benchmark for validation.
118+
119+
### 2026-05-20T21:07:06.347-04:00: Wizard bUnit coverage audit
120+
121+
**Task:** Investigate the Wizard component's bUnit test coverage, execute the existing Wizard-filtered test run, and identify missing scenarios.
122+
123+
**Outcome:** `src\BlazorWebFormsComponents.Test\Wizard\Navigation.razor` is currently the only Wizard-specific test file and contains 16 `[Fact]` tests. The requested `dotnet test src\BlazorWebFormsComponents.Test --nologo --filter "Wizard"` run passed 26 tests across `net8.0`, `net9.0`, and `net10.0`; the broader count indicates the filter also matches non-folder tests such as CreateUserWizard coverage, so component-folder counts should be tracked separately from filter output.
124+
125+
**Coverage notes:**
126+
- Existing Wizard coverage focuses on active-step rendering, next/previous navigation, finish and complete behavior, sidebar visibility/navigation, `AllowReturn=false`, `OnNextButtonClick`, `OnFinishButtonClick`, cancel button visibility, `HeaderText`, and `Visible=false`.
127+
- Missing coverage includes explicit verification for all `WizardStepType` values (`Auto`, `Start`, `Step`), programmatic `ActiveStepIndex` updates and `ActiveStepIndexChanged`, `OnActiveStepChanged`, `OnPreviousButtonClick`, `OnCancelButtonClick`, `OnSideBarButtonClick`, cancel/finish destination navigation, template rendering (`HeaderTemplate`, `SideBarTemplate`, navigation templates), and edge cases such as empty, single-step, null-title, and many-step wizards.
128+
- `Wizard.razor.cs` declares `StartNavigationTemplate`, `StepNavigationTemplate`, and `FinishNavigationTemplate`, but `Wizard.razor` never renders them; this is a high-priority QA gap because new tests should first confirm intended behavior and may expose a product bug.
129+
130+
**Key file paths:**
131+
- Tests: `src\BlazorWebFormsComponents.Test\Wizard\Navigation.razor`
132+
- Component: `src\BlazorWebFormsComponents\Wizard.razor` and `src\BlazorWebFormsComponents\Wizard.razor.cs`
133+
- Step child: `src\BlazorWebFormsComponents\WizardStep.razor` and `src\BlazorWebFormsComponents\WizardStep.razor.cs`
134+
- Enum/events: `src\BlazorWebFormsComponents\Enums\WizardStepType.cs`, `src\BlazorWebFormsComponents\WizardNavigationEventArgs.cs`
135+
136+
### 2026-05-20T21:19:29.902-04:00: Wizard callback and edge-case coverage expansion
137+
138+
**Task:** Add the missing Wizard bUnit coverage for callbacks, step-type behavior, and edge cases without modifying `src\BlazorWebFormsComponents.Test\Wizard\Navigation.razor`.
139+
140+
**Outcome:** Added three new Wizard test files — `src\BlazorWebFormsComponents.Test\Wizard\Callbacks.razor`, `src\BlazorWebFormsComponents.Test\Wizard\StepTypes.razor`, and `src\BlazorWebFormsComponents.Test\Wizard\EdgeCases.razor` — covering callback firing, `WizardStepType` rendering behavior, many-step sidebar output, and null/empty title handling. The requested validation command `dotnet test src\BlazorWebFormsComponents.Test --nologo --filter "Wizard"` passed with 123 total tests, 117 succeeded, and 6 skipped across `net8.0`, `net9.0`, and `net10.0`.
141+
142+
**Architecture / behavior notes:**
143+
- `Wizard.razor.cs` raises `OnActiveStepChanged` and `ActiveStepIndexChanged` only from internal navigation handlers (`HandleNextClick`, `HandlePreviousClick`, `HandleFinishClick`, `HandleSideBarNavigation`), not from parent-driven parameter updates.
144+
- `WizardStepType.Auto` resolves by position: first step becomes `Start`, last non-`Complete` step becomes `Finish`, and middle steps become `Step`.
145+
- Sidebar titles fall back to `Step {index + 1}` only when `Title` is `null`; an empty string renders as empty text because the component uses the null-coalescing operator rather than `string.IsNullOrEmpty`.
146+
- Step registration is add-only via `Wizard.AddStep()`; there is no removal path, so dynamic step removal is not currently supported.
147+
148+
**Known gaps captured as skipped tests:**
149+
- Programmatic `ActiveStepIndex` parameter changes do not currently trigger `ActiveStepIndexChanged`.
150+
- Single-step wizards still render start-step navigation instead of suppressing navigation entirely.
151+
- Dynamic step add/remove updates are not supported by the current registration model.
152+
153+
**Key file paths:**
154+
- New tests: `src\BlazorWebFormsComponents.Test\Wizard\Callbacks.razor`, `src\BlazorWebFormsComponents.Test\Wizard\StepTypes.razor`, `src\BlazorWebFormsComponents.Test\Wizard\EdgeCases.razor`
155+
- Existing baseline test: `src\BlazorWebFormsComponents.Test\Wizard\Navigation.razor`
156+
- Component implementation: `src\BlazorWebFormsComponents\Wizard.razor`, `src\BlazorWebFormsComponents\Wizard.razor.cs`, `src\BlazorWebFormsComponents\WizardStep.razor.cs`
157+
158+
≡ Team update (2026-05-21T12:26): Wizard unsupported behaviors remain explicit QA gaps — keep skipped tests for parent-driven `ActiveStepIndex` changes, single-step navigation suppression, and dynamic step add/remove. Tests serve as regression markers while gaps document product deferred behaviors for future implementation — decided by Rogue (per Jeffrey T. Fritz request)

0 commit comments

Comments
 (0)