fix(centralui-tests): register stub IBrowseService in SecuredWritesTests harness (PLAN-07 known-issue resolved)

The Secured Writes page embeds NodeBrowserDialog (@inject IBrowseService) for
the OPC UA tag picker; bUnit resolves the injected service at render time, so
three SecuredWritesTests failed with 'no registered service of type
IBrowseService'. Register a Substitute.For<IBrowseService>() singleton in the
fixture (mirrors NodeBrowserDialogSearchTests). Suite now 7/7 green.

Marks the PLAN-07 'Post-plan known issues' entry and the 00-MASTER-TRACKER
registry cross-reference RESOLVED.
This commit is contained in:
Joseph Doherty
2026-07-09 05:55:53 -04:00
parent 765ff131d8
commit 9049690bdb
3 changed files with 10 additions and 2 deletions
@@ -1265,7 +1265,9 @@ _ = hubClients.Client(connectionId).SendAsync(method, payload).ContinueWith(
## Post-plan known issues
- **SecuredWrites bUnit render tests fail — `IBrowseService` not registered in the test harness (logged 2026-07-09, surfaced during PLAN-03's full-suite run).** Three `CentralUI.Tests/Components/SecuredWritesTests` tests fail at render:
- **✅ RESOLVED 2026-07-09 — SecuredWrites bUnit render tests fixed (`IBrowseService` now registered in the test harness).** Fix applied: `SecuredWritesTests` now registers a `Substitute.For<IBrowseService>()` singleton in its constructor (mirroring the sibling `NodeBrowserDialogSearchTests`), so the embedded `NodeBrowserDialog` resolves its injected service at render time. `dotnet test tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests --filter FullyQualifiedName~SecuredWritesTests`**7/7 passed, 0 failed**. Original report retained below for history.
~~Three `CentralUI.Tests/Components/SecuredWritesTests` tests fail at render:~~
- `Operator_SeesSubmitForm`
- `Operator_Submit_CallsServiceWithEnteredValues`
- `Verifier_OwnSubmission_HasApproveAndRejectDisabled`