refactor: rename ScadaLink → ZB.MOM.WW.ScadaBridge (code + projects + namespaces)
Solution + 23 src projects + 26 test projects renamed; folders, csproj, namespaces, and ScadaLinkDbContext/ScadaBridgeDbContext class updated. ActorSystem "scadalink" → "scadabridge", Akka seed-node URLs migrated. SQL roles/logins, LDAP domains, CLI command name, and CLI config dir (~/.scadalink → ~/.scadabridge) also renamed. Build green; 5 Host.Tests fail awaiting SQL login rename in next commit. Pre-existing StaleTagMonitor timing flakes unchanged. Rename script committed at tools/rename-to-scadabridge.sh.
This commit is contained in:
@@ -16,9 +16,9 @@
|
||||
|
||||
- **TDD:** write the failing test first, watch it fail, implement, watch it pass.
|
||||
- **Commit with explicit paths only.** NEVER `git add -A` or `git add .`. There are pre-existing uncommitted files under `infra/` that MUST NOT be committed — always `git add <explicit paths>`.
|
||||
- Build the solution with `dotnet build ScadaLink.slnx`. `TreatWarningsAsErrors` is on — zero warnings.
|
||||
- Build the solution with `dotnet build ZB.MOM.WW.ScadaBridge.slnx`. `TreatWarningsAsErrors` is on — zero warnings.
|
||||
- Run a single test project with `dotnet test tests/<Project>/<Project>.csproj`.
|
||||
- Entity/domain POCOs live in `ScadaLink.Commons`; EF fluent configs in `ScadaLink.ConfigurationDatabase`.
|
||||
- Entity/domain POCOs live in `ZB.MOM.WW.ScadaBridge.Commons`; EF fluent configs in `ZB.MOM.WW.ScadaBridge.ConfigurationDatabase`.
|
||||
- Message records follow additive-only evolution — only add new record types, never reorder/remove members of existing ones.
|
||||
|
||||
---
|
||||
@@ -26,16 +26,16 @@
|
||||
## Task 1: Per-site KPI domain type + repository interface method
|
||||
|
||||
**Files:**
|
||||
- Create: `src/ScadaLink.Commons/Types/Notifications/SiteNotificationKpiSnapshot.cs`
|
||||
- Modify: `src/ScadaLink.Commons/Interfaces/Repositories/INotificationOutboxRepository.cs`
|
||||
- Test: `tests/ScadaLink.Commons.Tests/Types/SiteNotificationKpiSnapshotTests.cs`
|
||||
- Create: `src/ZB.MOM.WW.ScadaBridge.Commons/Types/Notifications/SiteNotificationKpiSnapshot.cs`
|
||||
- Modify: `src/ZB.MOM.WW.ScadaBridge.Commons/Interfaces/Repositories/INotificationOutboxRepository.cs`
|
||||
- Test: `tests/ZB.MOM.WW.ScadaBridge.Commons.Tests/Types/SiteNotificationKpiSnapshotTests.cs`
|
||||
|
||||
**Step 1: Write the failing test**
|
||||
|
||||
```csharp
|
||||
using ScadaLink.Commons.Types.Notifications;
|
||||
using ZB.MOM.WW.ScadaBridge.Commons.Types.Notifications;
|
||||
|
||||
namespace ScadaLink.Commons.Tests.Types;
|
||||
namespace ZB.MOM.WW.ScadaBridge.Commons.Tests.Types;
|
||||
|
||||
public class SiteNotificationKpiSnapshotTests
|
||||
{
|
||||
@@ -69,7 +69,7 @@ public class SiteNotificationKpiSnapshotTests
|
||||
|
||||
**Step 2: Run test to verify it fails**
|
||||
|
||||
Run: `dotnet test tests/ScadaLink.Commons.Tests/ScadaLink.Commons.Tests.csproj --filter SiteNotificationKpiSnapshotTests`
|
||||
Run: `dotnet test tests/ZB.MOM.WW.ScadaBridge.Commons.Tests/ZB.MOM.WW.ScadaBridge.Commons.Tests.csproj --filter SiteNotificationKpiSnapshotTests`
|
||||
Expected: FAIL — `SiteNotificationKpiSnapshot` does not exist.
|
||||
|
||||
**Step 3: Write minimal implementation**
|
||||
@@ -77,7 +77,7 @@ Expected: FAIL — `SiteNotificationKpiSnapshot` does not exist.
|
||||
`SiteNotificationKpiSnapshot.cs`:
|
||||
|
||||
```csharp
|
||||
namespace ScadaLink.Commons.Types.Notifications;
|
||||
namespace ZB.MOM.WW.ScadaBridge.Commons.Types.Notifications;
|
||||
|
||||
/// <summary>
|
||||
/// Point-in-time notification-outbox metrics scoped to a single source site.
|
||||
@@ -121,15 +121,15 @@ Add to `INotificationOutboxRepository.cs`, immediately after the `ComputeKpisAsy
|
||||
|
||||
**Step 4: Run test to verify it passes**
|
||||
|
||||
Run: `dotnet test tests/ScadaLink.Commons.Tests/ScadaLink.Commons.Tests.csproj --filter SiteNotificationKpiSnapshotTests`
|
||||
Expected: PASS. (`ScadaLink.ConfigurationDatabase` will not yet compile — the interface method is unimplemented. That is fixed in Task 2; do not build the whole solution at this step.)
|
||||
Run: `dotnet test tests/ZB.MOM.WW.ScadaBridge.Commons.Tests/ZB.MOM.WW.ScadaBridge.Commons.Tests.csproj --filter SiteNotificationKpiSnapshotTests`
|
||||
Expected: PASS. (`ZB.MOM.WW.ScadaBridge.ConfigurationDatabase` will not yet compile — the interface method is unimplemented. That is fixed in Task 2; do not build the whole solution at this step.)
|
||||
|
||||
**Step 5: Commit**
|
||||
|
||||
```bash
|
||||
git add src/ScadaLink.Commons/Types/Notifications/SiteNotificationKpiSnapshot.cs \
|
||||
src/ScadaLink.Commons/Interfaces/Repositories/INotificationOutboxRepository.cs \
|
||||
tests/ScadaLink.Commons.Tests/Types/SiteNotificationKpiSnapshotTests.cs
|
||||
git add src/ZB.MOM.WW.ScadaBridge.Commons/Types/Notifications/SiteNotificationKpiSnapshot.cs \
|
||||
src/ZB.MOM.WW.ScadaBridge.Commons/Interfaces/Repositories/INotificationOutboxRepository.cs \
|
||||
tests/ZB.MOM.WW.ScadaBridge.Commons.Tests/Types/SiteNotificationKpiSnapshotTests.cs
|
||||
git commit -m "feat(notification-outbox): per-site KPI snapshot type + repository contract"
|
||||
```
|
||||
|
||||
@@ -138,14 +138,14 @@ git commit -m "feat(notification-outbox): per-site KPI snapshot type + repositor
|
||||
## Task 2: ComputePerSiteKpisAsync repository implementation
|
||||
|
||||
**Files:**
|
||||
- Modify: `src/ScadaLink.ConfigurationDatabase/Repositories/NotificationOutboxRepository.cs`
|
||||
- Test: `tests/ScadaLink.ConfigurationDatabase.Tests/NotificationOutboxRepositoryPerSiteKpiTests.cs`
|
||||
- Modify: `src/ZB.MOM.WW.ScadaBridge.ConfigurationDatabase/Repositories/NotificationOutboxRepository.cs`
|
||||
- Test: `tests/ZB.MOM.WW.ScadaBridge.ConfigurationDatabase.Tests/NotificationOutboxRepositoryPerSiteKpiTests.cs`
|
||||
|
||||
**Context:** `NotificationOutboxRepository` is an EF Core repository over `ScadaLinkDbContext.Notifications`. The existing global `ComputeKpisAsync` (in the same file) shows the metric definitions and the `DateTimeOffset`-min workaround. The `Notification` entity has a `SourceSiteId` string and a `Status` (`NotificationStatus` enum: `Pending`, `Retrying`, `Delivered`, `Parked`, `Discarded`). Look at an existing repository test in `tests/ScadaLink.ConfigurationDatabase.Tests/` to copy the SQLite-in-memory `ScadaLinkDbContext` setup pattern.
|
||||
**Context:** `NotificationOutboxRepository` is an EF Core repository over `ScadaBridgeDbContext.Notifications`. The existing global `ComputeKpisAsync` (in the same file) shows the metric definitions and the `DateTimeOffset`-min workaround. The `Notification` entity has a `SourceSiteId` string and a `Status` (`NotificationStatus` enum: `Pending`, `Retrying`, `Delivered`, `Parked`, `Discarded`). Look at an existing repository test in `tests/ZB.MOM.WW.ScadaBridge.ConfigurationDatabase.Tests/` to copy the SQLite-in-memory `ScadaBridgeDbContext` setup pattern.
|
||||
|
||||
**Step 1: Write the failing test**
|
||||
|
||||
Mirror the existing repository-test setup (in-memory SQLite `ScadaLinkDbContext`). Seed `Notification` rows across two sites and assert the per-site aggregation:
|
||||
Mirror the existing repository-test setup (in-memory SQLite `ScadaBridgeDbContext`). Seed `Notification` rows across two sites and assert the per-site aggregation:
|
||||
|
||||
```csharp
|
||||
[Fact]
|
||||
@@ -194,7 +194,7 @@ Define the `NewContext()` and `NewNotification(...)` helpers by copying the conv
|
||||
|
||||
**Step 2: Run test to verify it fails**
|
||||
|
||||
Run: `dotnet test tests/ScadaLink.ConfigurationDatabase.Tests/ScadaLink.ConfigurationDatabase.Tests.csproj --filter NotificationOutboxRepositoryPerSiteKpiTests`
|
||||
Run: `dotnet test tests/ZB.MOM.WW.ScadaBridge.ConfigurationDatabase.Tests/ZB.MOM.WW.ScadaBridge.ConfigurationDatabase.Tests.csproj --filter NotificationOutboxRepositoryPerSiteKpiTests`
|
||||
Expected: FAIL — `ComputePerSiteKpisAsync` not implemented.
|
||||
|
||||
**Step 3: Write minimal implementation**
|
||||
@@ -267,14 +267,14 @@ Add to `NotificationOutboxRepository.cs`, after `ComputeKpisAsync`:
|
||||
|
||||
**Step 4: Run test to verify it passes**
|
||||
|
||||
Run: `dotnet test tests/ScadaLink.ConfigurationDatabase.Tests/ScadaLink.ConfigurationDatabase.Tests.csproj --filter NotificationOutboxRepositoryPerSiteKpiTests`
|
||||
Run: `dotnet test tests/ZB.MOM.WW.ScadaBridge.ConfigurationDatabase.Tests/ZB.MOM.WW.ScadaBridge.ConfigurationDatabase.Tests.csproj --filter NotificationOutboxRepositoryPerSiteKpiTests`
|
||||
Expected: PASS.
|
||||
|
||||
**Step 5: Commit**
|
||||
|
||||
```bash
|
||||
git add src/ScadaLink.ConfigurationDatabase/Repositories/NotificationOutboxRepository.cs \
|
||||
tests/ScadaLink.ConfigurationDatabase.Tests/NotificationOutboxRepositoryPerSiteKpiTests.cs
|
||||
git add src/ZB.MOM.WW.ScadaBridge.ConfigurationDatabase/Repositories/NotificationOutboxRepository.cs \
|
||||
tests/ZB.MOM.WW.ScadaBridge.ConfigurationDatabase.Tests/NotificationOutboxRepositoryPerSiteKpiTests.cs
|
||||
git commit -m "feat(notification-outbox): per-site KPI aggregation in the repository"
|
||||
```
|
||||
|
||||
@@ -283,8 +283,8 @@ git commit -m "feat(notification-outbox): per-site KPI aggregation in the reposi
|
||||
## Task 3: Per-site KPI message contracts
|
||||
|
||||
**Files:**
|
||||
- Modify: `src/ScadaLink.Commons/Messages/Notification/NotificationOutboxQueries.cs`
|
||||
- Test: `tests/ScadaLink.Commons.Tests/Messages/NotificationMessagesTests.cs` (add cases)
|
||||
- Modify: `src/ZB.MOM.WW.ScadaBridge.Commons/Messages/Notification/NotificationOutboxQueries.cs`
|
||||
- Test: `tests/ZB.MOM.WW.ScadaBridge.Commons.Tests/Messages/NotificationMessagesTests.cs` (add cases)
|
||||
|
||||
**Context:** `NotificationOutboxQueries.cs` already holds `NotificationKpiRequest` / `NotificationKpiResponse`. The per-site response carries the `SiteNotificationKpiSnapshot` records directly (no flattening — the type is a clean serializable record in Commons). Additive-only: append new records, do not touch existing ones.
|
||||
|
||||
@@ -316,16 +316,16 @@ public void PerSiteNotificationKpiResponse_CarriesPerSiteSnapshots()
|
||||
}
|
||||
```
|
||||
|
||||
Add `using ScadaLink.Commons.Types.Notifications;` to the test file if not present.
|
||||
Add `using ZB.MOM.WW.ScadaBridge.Commons.Types.Notifications;` to the test file if not present.
|
||||
|
||||
**Step 2: Run test to verify it fails**
|
||||
|
||||
Run: `dotnet test tests/ScadaLink.Commons.Tests/ScadaLink.Commons.Tests.csproj --filter NotificationMessagesTests`
|
||||
Run: `dotnet test tests/ZB.MOM.WW.ScadaBridge.Commons.Tests/ZB.MOM.WW.ScadaBridge.Commons.Tests.csproj --filter NotificationMessagesTests`
|
||||
Expected: FAIL — the two records do not exist.
|
||||
|
||||
**Step 3: Write minimal implementation**
|
||||
|
||||
Append to `NotificationOutboxQueries.cs` (add `using ScadaLink.Commons.Types.Notifications;` at the top if absent):
|
||||
Append to `NotificationOutboxQueries.cs` (add `using ZB.MOM.WW.ScadaBridge.Commons.Types.Notifications;` at the top if absent):
|
||||
|
||||
```csharp
|
||||
/// <summary>
|
||||
@@ -348,14 +348,14 @@ public record PerSiteNotificationKpiResponse(
|
||||
|
||||
**Step 4: Run test to verify it passes**
|
||||
|
||||
Run: `dotnet test tests/ScadaLink.Commons.Tests/ScadaLink.Commons.Tests.csproj --filter NotificationMessagesTests`
|
||||
Run: `dotnet test tests/ZB.MOM.WW.ScadaBridge.Commons.Tests/ZB.MOM.WW.ScadaBridge.Commons.Tests.csproj --filter NotificationMessagesTests`
|
||||
Expected: PASS.
|
||||
|
||||
**Step 5: Commit**
|
||||
|
||||
```bash
|
||||
git add src/ScadaLink.Commons/Messages/Notification/NotificationOutboxQueries.cs \
|
||||
tests/ScadaLink.Commons.Tests/Messages/NotificationMessagesTests.cs
|
||||
git add src/ZB.MOM.WW.ScadaBridge.Commons/Messages/Notification/NotificationOutboxQueries.cs \
|
||||
tests/ZB.MOM.WW.ScadaBridge.Commons.Tests/Messages/NotificationMessagesTests.cs
|
||||
git commit -m "feat(notification-outbox): per-site KPI request/response message contracts"
|
||||
```
|
||||
|
||||
@@ -364,8 +364,8 @@ git commit -m "feat(notification-outbox): per-site KPI request/response message
|
||||
## Task 4: NotificationOutboxActor per-site KPI handler
|
||||
|
||||
**Files:**
|
||||
- Modify: `src/ScadaLink.NotificationOutbox/NotificationOutboxActor.cs`
|
||||
- Test: `tests/ScadaLink.NotificationOutbox.Tests/NotificationOutboxActorQueryTests.cs` (add cases)
|
||||
- Modify: `src/ZB.MOM.WW.ScadaBridge.NotificationOutbox/NotificationOutboxActor.cs`
|
||||
- Test: `tests/ZB.MOM.WW.ScadaBridge.NotificationOutbox.Tests/NotificationOutboxActorQueryTests.cs` (add cases)
|
||||
|
||||
**Context:** The actor registers handlers in its constructor and resolves `INotificationOutboxRepository` per-request from a fresh DI scope (`_serviceProvider.CreateScope()`) to avoid a captive dependency. `HandleKpiRequest` / `ComputeKpisAsync` are the exact template to mirror. `StuckCutoff(now)` and `_options.DeliveredKpiWindow` already exist. `NotificationOutboxActorQueryTests.cs` shows how the actor is spun up with a substituted repository.
|
||||
|
||||
@@ -415,7 +415,7 @@ Match the seam the existing KPI test uses (the `CreateActor` helper name may dif
|
||||
|
||||
**Step 2: Run test to verify it fails**
|
||||
|
||||
Run: `dotnet test tests/ScadaLink.NotificationOutbox.Tests/ScadaLink.NotificationOutbox.Tests.csproj --filter NotificationOutboxActorQueryTests`
|
||||
Run: `dotnet test tests/ZB.MOM.WW.ScadaBridge.NotificationOutbox.Tests/ZB.MOM.WW.ScadaBridge.NotificationOutbox.Tests.csproj --filter NotificationOutboxActorQueryTests`
|
||||
Expected: FAIL — `PerSiteNotificationKpiRequest` is unhandled (TestKit reports an unexpected message / no reply).
|
||||
|
||||
**Step 3: Write minimal implementation**
|
||||
@@ -463,14 +463,14 @@ After the `ComputeKpisAsync` method, add:
|
||||
|
||||
**Step 4: Run test to verify it passes**
|
||||
|
||||
Run: `dotnet test tests/ScadaLink.NotificationOutbox.Tests/ScadaLink.NotificationOutbox.Tests.csproj --filter NotificationOutboxActorQueryTests`
|
||||
Run: `dotnet test tests/ZB.MOM.WW.ScadaBridge.NotificationOutbox.Tests/ZB.MOM.WW.ScadaBridge.NotificationOutbox.Tests.csproj --filter NotificationOutboxActorQueryTests`
|
||||
Expected: PASS.
|
||||
|
||||
**Step 5: Commit**
|
||||
|
||||
```bash
|
||||
git add src/ScadaLink.NotificationOutbox/NotificationOutboxActor.cs \
|
||||
tests/ScadaLink.NotificationOutbox.Tests/NotificationOutboxActorQueryTests.cs
|
||||
git add src/ZB.MOM.WW.ScadaBridge.NotificationOutbox/NotificationOutboxActor.cs \
|
||||
tests/ZB.MOM.WW.ScadaBridge.NotificationOutbox.Tests/NotificationOutboxActorQueryTests.cs
|
||||
git commit -m "feat(notification-outbox): actor handler for per-site KPI requests"
|
||||
```
|
||||
|
||||
@@ -479,8 +479,8 @@ git commit -m "feat(notification-outbox): actor handler for per-site KPI request
|
||||
## Task 5: CommunicationService.GetPerSiteNotificationKpisAsync
|
||||
|
||||
**Files:**
|
||||
- Modify: `src/ScadaLink.Communication/CommunicationService.cs`
|
||||
- Test: `tests/ScadaLink.Communication.Tests/CommunicationServiceTests.cs` (add a case)
|
||||
- Modify: `src/ZB.MOM.WW.ScadaBridge.Communication/CommunicationService.cs`
|
||||
- Test: `tests/ZB.MOM.WW.ScadaBridge.Communication.Tests/CommunicationServiceTests.cs` (add a case)
|
||||
|
||||
**Context:** `CommunicationService` has a "Notification Outbox" region. `GetNotificationKpisAsync` is the exact template — it `Ask`s the notification-outbox actor proxy (`GetNotificationOutbox()`) with `_options.QueryTimeout`. The test class wires a real lightweight `ActorSystem` with a scripted actor (the same `SetNotificationOutbox` seam the outbox page tests use).
|
||||
|
||||
@@ -511,7 +511,7 @@ If the test class uses an inline scripted `ReceiveActor` rather than a `CreateSe
|
||||
|
||||
**Step 2: Run test to verify it fails**
|
||||
|
||||
Run: `dotnet test tests/ScadaLink.Communication.Tests/ScadaLink.Communication.Tests.csproj --filter GetPerSiteNotificationKpisAsync`
|
||||
Run: `dotnet test tests/ZB.MOM.WW.ScadaBridge.Communication.Tests/ZB.MOM.WW.ScadaBridge.Communication.Tests.csproj --filter GetPerSiteNotificationKpisAsync`
|
||||
Expected: FAIL — `GetPerSiteNotificationKpisAsync` does not exist.
|
||||
|
||||
**Step 3: Write minimal implementation**
|
||||
@@ -529,19 +529,19 @@ In `CommunicationService.cs`, in the Notification Outbox region, after `GetNotif
|
||||
|
||||
**Step 4: Run test to verify it passes**
|
||||
|
||||
Run: `dotnet test tests/ScadaLink.Communication.Tests/ScadaLink.Communication.Tests.csproj --filter GetPerSiteNotificationKpisAsync`
|
||||
Run: `dotnet test tests/ZB.MOM.WW.ScadaBridge.Communication.Tests/ZB.MOM.WW.ScadaBridge.Communication.Tests.csproj --filter GetPerSiteNotificationKpisAsync`
|
||||
Expected: PASS.
|
||||
|
||||
**Step 5: Build the whole solution** to confirm the backend chain is clean.
|
||||
|
||||
Run: `dotnet build ScadaLink.slnx`
|
||||
Run: `dotnet build ZB.MOM.WW.ScadaBridge.slnx`
|
||||
Expected: Build succeeded, 0 warnings.
|
||||
|
||||
**Step 6: Commit**
|
||||
|
||||
```bash
|
||||
git add src/ScadaLink.Communication/CommunicationService.cs \
|
||||
tests/ScadaLink.Communication.Tests/CommunicationServiceTests.cs
|
||||
git add src/ZB.MOM.WW.ScadaBridge.Communication/CommunicationService.cs \
|
||||
tests/ZB.MOM.WW.ScadaBridge.Communication.Tests/CommunicationServiceTests.cs
|
||||
git commit -m "feat(notification-outbox): CommunicationService per-site KPI accessor"
|
||||
```
|
||||
|
||||
@@ -550,22 +550,22 @@ git commit -m "feat(notification-outbox): CommunicationService per-site KPI acce
|
||||
## Task 6: Move SMTP Configuration page to /notifications/smtp
|
||||
|
||||
**Files:**
|
||||
- Move: `src/ScadaLink.CentralUI/Components/Pages/Admin/SmtpConfiguration.razor` → `src/ScadaLink.CentralUI/Components/Pages/Notifications/SmtpConfiguration.razor`
|
||||
- Move: `src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Pages/Admin/SmtpConfiguration.razor` → `src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Pages/Notifications/SmtpConfiguration.razor`
|
||||
- Move (if present): `Admin/SmtpConfiguration.razor.cs` → `Notifications/SmtpConfiguration.razor.cs`
|
||||
- Modify: `tests/ScadaLink.CentralUI.PlaywrightTests/NavigationTests.cs:30`
|
||||
- Modify: `tests/ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests/NavigationTests.cs:30`
|
||||
|
||||
**Context:** The page currently declares `@page "/admin/smtp"` and lives in the `Admin` Pages folder. Only the route and folder/namespace change — content and `RequireAdmin` policy stay. The Razor namespace follows the folder, so a moved `.razor` resolves to `ScadaLink.CentralUI.Components.Pages.Notifications`. There is no test that renders this page directly; the only reference is the Playwright `NavigationTests` inline data.
|
||||
**Context:** The page currently declares `@page "/admin/smtp"` and lives in the `Admin` Pages folder. Only the route and folder/namespace change — content and `RequireAdmin` policy stay. The Razor namespace follows the folder, so a moved `.razor` resolves to `ZB.MOM.WW.ScadaBridge.CentralUI.Components.Pages.Notifications`. There is no test that renders this page directly; the only reference is the Playwright `NavigationTests` inline data.
|
||||
|
||||
**Step 1:** Create the `Components/Pages/Notifications/` folder by writing the moved file there.
|
||||
|
||||
`git mv` the file:
|
||||
|
||||
```bash
|
||||
git mv src/ScadaLink.CentralUI/Components/Pages/Admin/SmtpConfiguration.razor \
|
||||
src/ScadaLink.CentralUI/Components/Pages/Notifications/SmtpConfiguration.razor
|
||||
git mv src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Pages/Admin/SmtpConfiguration.razor \
|
||||
src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Pages/Notifications/SmtpConfiguration.razor
|
||||
```
|
||||
|
||||
If a code-behind `SmtpConfiguration.razor.cs` exists, `git mv` it too and update its `namespace` to `ScadaLink.CentralUI.Components.Pages.Notifications`.
|
||||
If a code-behind `SmtpConfiguration.razor.cs` exists, `git mv` it too and update its `namespace` to `ZB.MOM.WW.ScadaBridge.CentralUI.Components.Pages.Notifications`.
|
||||
|
||||
**Step 2:** In the moved `Notifications/SmtpConfiguration.razor`, change line 1 from:
|
||||
|
||||
@@ -579,7 +579,7 @@ to:
|
||||
@page "/notifications/smtp"
|
||||
```
|
||||
|
||||
**Step 3:** Update `tests/ScadaLink.CentralUI.PlaywrightTests/NavigationTests.cs` line 30 — change the inline data from:
|
||||
**Step 3:** Update `tests/ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests/NavigationTests.cs` line 30 — change the inline data from:
|
||||
|
||||
```csharp
|
||||
[InlineData("SMTP Configuration", "/admin/smtp")]
|
||||
@@ -593,15 +593,15 @@ to:
|
||||
|
||||
**Step 4: Build to verify**
|
||||
|
||||
Run: `dotnet build src/ScadaLink.CentralUI/ScadaLink.CentralUI.csproj`
|
||||
Run: `dotnet build src/ZB.MOM.WW.ScadaBridge.CentralUI/ZB.MOM.WW.ScadaBridge.CentralUI.csproj`
|
||||
Expected: Build succeeded, 0 warnings.
|
||||
|
||||
**Step 5: Commit**
|
||||
|
||||
```bash
|
||||
git add src/ScadaLink.CentralUI/Components/Pages/Admin/SmtpConfiguration.razor \
|
||||
src/ScadaLink.CentralUI/Components/Pages/Notifications/SmtpConfiguration.razor \
|
||||
tests/ScadaLink.CentralUI.PlaywrightTests/NavigationTests.cs
|
||||
git add src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Pages/Admin/SmtpConfiguration.razor \
|
||||
src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Pages/Notifications/SmtpConfiguration.razor \
|
||||
tests/ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests/NavigationTests.cs
|
||||
git commit -m "refactor(central-ui): move SMTP Configuration page to /notifications/smtp"
|
||||
```
|
||||
|
||||
@@ -612,8 +612,8 @@ git commit -m "refactor(central-ui): move SMTP Configuration page to /notificati
|
||||
## Task 7: New Notification Lists page
|
||||
|
||||
**Files:**
|
||||
- Create: `src/ScadaLink.CentralUI/Components/Pages/Notifications/NotificationLists.razor`
|
||||
- Test: `tests/ScadaLink.CentralUI.Tests/Pages/NotificationListsPageTests.cs`
|
||||
- Create: `src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Pages/Notifications/NotificationLists.razor`
|
||||
- Test: `tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests/Pages/NotificationListsPageTests.cs`
|
||||
|
||||
**Context:** Notification lists are currently shown only inside the "Notification Lists" tab of `Components/Pages/Design/ExternalSystems.razor` (the `RenderNotificationLists` render fragment, lines ~301-380). This task creates a standalone page; Task 8 removes that tab. `INotificationRepository` exposes `GetAllNotificationListsAsync()`, `GetRecipientsByListIdAsync(int)`, `DeleteNotificationListAsync(int)`, `SaveChangesAsync()`. `NotificationList` has `Id` and `Name`; `NotificationRecipient` has `Name` and `EmailAddress`. The page is `RequireDesign`. Look at `NotificationOutboxPageTests.cs` for the bUnit `AuthorizeView` + DI wiring pattern (substituted repositories, a `TestAuthorizationContext`-style claims principal).
|
||||
|
||||
@@ -623,11 +623,11 @@ git commit -m "refactor(central-ui): move SMTP Configuration page to /notificati
|
||||
using Bunit;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using NSubstitute;
|
||||
using ScadaLink.Commons.Entities.Notifications;
|
||||
using ScadaLink.Commons.Interfaces.Repositories;
|
||||
using NotificationListsPage = ScadaLink.CentralUI.Components.Pages.Notifications.NotificationLists;
|
||||
using ZB.MOM.WW.ScadaBridge.Commons.Entities.Notifications;
|
||||
using ZB.MOM.WW.ScadaBridge.Commons.Interfaces.Repositories;
|
||||
using NotificationListsPage = ZB.MOM.WW.ScadaBridge.CentralUI.Components.Pages.Notifications.NotificationLists;
|
||||
|
||||
namespace ScadaLink.CentralUI.Tests.Pages;
|
||||
namespace ZB.MOM.WW.ScadaBridge.CentralUI.Tests.Pages;
|
||||
|
||||
public class NotificationListsPageTests : BunitContext
|
||||
{
|
||||
@@ -665,7 +665,7 @@ public class NotificationListsPageTests : BunitContext
|
||||
|
||||
**Step 2: Run test to verify it fails**
|
||||
|
||||
Run: `dotnet test tests/ScadaLink.CentralUI.Tests/ScadaLink.CentralUI.Tests.csproj --filter NotificationListsPageTests`
|
||||
Run: `dotnet test tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests.csproj --filter NotificationListsPageTests`
|
||||
Expected: FAIL — `NotificationLists` page does not exist.
|
||||
|
||||
**Step 3: Write minimal implementation**
|
||||
@@ -674,9 +674,9 @@ Expected: FAIL — `NotificationLists` page does not exist.
|
||||
|
||||
```razor
|
||||
@page "/notifications/lists"
|
||||
@using ScadaLink.Security
|
||||
@using ScadaLink.Commons.Entities.Notifications
|
||||
@using ScadaLink.Commons.Interfaces.Repositories
|
||||
@using ZB.MOM.WW.ScadaBridge.Security
|
||||
@using ZB.MOM.WW.ScadaBridge.Commons.Entities.Notifications
|
||||
@using ZB.MOM.WW.ScadaBridge.Commons.Interfaces.Repositories
|
||||
@attribute [Authorize(Policy = AuthorizationPolicies.RequireDesign)]
|
||||
@inject INotificationRepository NotificationRepository
|
||||
@inject NavigationManager NavigationManager
|
||||
@@ -814,14 +814,14 @@ Expected: FAIL — `NotificationLists` page does not exist.
|
||||
|
||||
**Step 4: Run test to verify it passes**
|
||||
|
||||
Run: `dotnet test tests/ScadaLink.CentralUI.Tests/ScadaLink.CentralUI.Tests.csproj --filter NotificationListsPageTests`
|
||||
Run: `dotnet test tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests.csproj --filter NotificationListsPageTests`
|
||||
Expected: PASS.
|
||||
|
||||
**Step 5: Commit**
|
||||
|
||||
```bash
|
||||
git add src/ScadaLink.CentralUI/Components/Pages/Notifications/NotificationLists.razor \
|
||||
tests/ScadaLink.CentralUI.Tests/Pages/NotificationListsPageTests.cs
|
||||
git add src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Pages/Notifications/NotificationLists.razor \
|
||||
tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests/Pages/NotificationListsPageTests.cs
|
||||
git commit -m "feat(central-ui): standalone Notification Lists page"
|
||||
```
|
||||
|
||||
@@ -830,8 +830,8 @@ git commit -m "feat(central-ui): standalone Notification Lists page"
|
||||
## Task 8: Move the Notification List form route; drop the External Systems tab
|
||||
|
||||
**Files:**
|
||||
- Modify: `src/ScadaLink.CentralUI/Components/Pages/Design/NotificationListForm.razor`
|
||||
- Modify: `src/ScadaLink.CentralUI/Components/Pages/Design/ExternalSystems.razor`
|
||||
- Modify: `src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Pages/Design/NotificationListForm.razor`
|
||||
- Modify: `src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Pages/Design/ExternalSystems.razor`
|
||||
|
||||
**Context:** `NotificationListForm.razor` has two `@page` routes under `/design/notification-lists/...` and navigates back to `/design/external-systems` (`GoBack()` and the post-`Save()` redirect). `ExternalSystems.razor` is a 4-tab page ("Integration Definitions"): External Systems, Database Connections, **Notification Lists**, Inbound API Methods. Removing the Notification Lists tab leaves three. This task has no behavioral test of its own (Task 7 covers the new lists page); verify by build + a render-smoke check.
|
||||
|
||||
@@ -860,18 +860,18 @@ to:
|
||||
- The `DeleteNotifList(...)` method (~lines 375-380).
|
||||
- The Notification Lists `@code` fields: `_notificationLists`, `_recipients`, `_notifSearch`, `FilteredNotificationLists` (~lines 110-117).
|
||||
- In `LoadAllAsync()`, the lines that populate `_notificationLists` and the `_recipients` loop (~lines 141-148).
|
||||
- The now-unused `@inject INotificationRepository NotificationRepository` (line 9) and `@using ScadaLink.Commons.Entities.Notifications` (line 4) — remove only if nothing else in the file still uses them (verify by search).
|
||||
- The now-unused `@inject INotificationRepository NotificationRepository` (line 9) and `@using ZB.MOM.WW.ScadaBridge.Commons.Entities.Notifications` (line 4) — remove only if nothing else in the file still uses them (verify by search).
|
||||
|
||||
**Step 4: Build to verify**
|
||||
|
||||
Run: `dotnet build src/ScadaLink.CentralUI/ScadaLink.CentralUI.csproj`
|
||||
Run: `dotnet build src/ZB.MOM.WW.ScadaBridge.CentralUI/ZB.MOM.WW.ScadaBridge.CentralUI.csproj`
|
||||
Expected: Build succeeded, 0 warnings. (A warning here usually means a leftover unused `using`/`@inject` — remove it.)
|
||||
|
||||
**Step 5: Commit**
|
||||
|
||||
```bash
|
||||
git add src/ScadaLink.CentralUI/Components/Pages/Design/NotificationListForm.razor \
|
||||
src/ScadaLink.CentralUI/Components/Pages/Design/ExternalSystems.razor
|
||||
git add src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Pages/Design/NotificationListForm.razor \
|
||||
src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Pages/Design/ExternalSystems.razor
|
||||
git commit -m "refactor(central-ui): move Notification List form to /notifications, drop External Systems tab"
|
||||
```
|
||||
|
||||
@@ -880,9 +880,9 @@ git commit -m "refactor(central-ui): move Notification List form to /notificatio
|
||||
## Task 9: New Notification Report page; retire the Outbox page
|
||||
|
||||
**Files:**
|
||||
- Create: `src/ScadaLink.CentralUI/Components/Pages/Notifications/NotificationReport.razor`
|
||||
- Delete: `src/ScadaLink.CentralUI/Components/Pages/Monitoring/NotificationOutbox.razor`
|
||||
- Rename: `tests/ScadaLink.CentralUI.Tests/Pages/NotificationOutboxPageTests.cs` → `NotificationReportPageTests.cs`
|
||||
- Create: `src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Pages/Notifications/NotificationReport.razor`
|
||||
- Delete: `src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Pages/Monitoring/NotificationOutbox.razor`
|
||||
- Rename: `tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests/Pages/NotificationOutboxPageTests.cs` → `NotificationReportPageTests.cs`
|
||||
|
||||
**Context:** `Monitoring/NotificationOutbox.razor` currently combines KPI tiles (markup lines 23-72) with a filterable, paginated notifications table + Retry/Discard (lines 74-253). The new `NotificationReport.razor` keeps everything **except** the KPI tiles. Its existing test, `NotificationOutboxPageTests.cs`, renders the page via a scripted Akka actor seam and asserts on both KPI tiles and table rows.
|
||||
|
||||
@@ -897,39 +897,39 @@ git commit -m "refactor(central-ui): move Notification List form to /notificatio
|
||||
**Step 2: Delete the old page**
|
||||
|
||||
```bash
|
||||
git rm src/ScadaLink.CentralUI/Components/Pages/Monitoring/NotificationOutbox.razor
|
||||
git rm src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Pages/Monitoring/NotificationOutbox.razor
|
||||
```
|
||||
|
||||
**Step 3: Migrate the test.** Rename the test file and update it:
|
||||
|
||||
```bash
|
||||
git mv tests/ScadaLink.CentralUI.Tests/Pages/NotificationOutboxPageTests.cs \
|
||||
tests/ScadaLink.CentralUI.Tests/Pages/NotificationReportPageTests.cs
|
||||
git mv tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests/Pages/NotificationOutboxPageTests.cs \
|
||||
tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests/Pages/NotificationReportPageTests.cs
|
||||
```
|
||||
|
||||
In `NotificationReportPageTests.cs`:
|
||||
- Rename the class to `NotificationReportPageTests`.
|
||||
- Change the page alias: `using NotificationReportPage = ScadaLink.CentralUI.Components.Pages.Notifications.NotificationReport;` and update render calls.
|
||||
- Change the page alias: `using NotificationReportPage = ZB.MOM.WW.ScadaBridge.CentralUI.Components.Pages.Notifications.NotificationReport;` and update render calls.
|
||||
- **Delete the KPI-tile assertions** (any test asserting on Queue Depth / Stuck / Parked tile values, and the `_kpiReply` field if now unused — but `_queryReply`, retry/discard scripting stay).
|
||||
- Keep the table-rendering, filter, pagination, and Retry/Discard tests.
|
||||
|
||||
**Step 4: Run test to verify it passes**
|
||||
|
||||
Run: `dotnet test tests/ScadaLink.CentralUI.Tests/ScadaLink.CentralUI.Tests.csproj --filter NotificationReportPageTests`
|
||||
Run: `dotnet test tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests.csproj --filter NotificationReportPageTests`
|
||||
Expected: PASS.
|
||||
|
||||
Also build the UI project to confirm no dangling references to the deleted page:
|
||||
|
||||
Run: `dotnet build src/ScadaLink.CentralUI/ScadaLink.CentralUI.csproj`
|
||||
Run: `dotnet build src/ZB.MOM.WW.ScadaBridge.CentralUI/ZB.MOM.WW.ScadaBridge.CentralUI.csproj`
|
||||
Expected: Build succeeded, 0 warnings.
|
||||
|
||||
**Step 5: Commit**
|
||||
|
||||
```bash
|
||||
git add src/ScadaLink.CentralUI/Components/Pages/Notifications/NotificationReport.razor \
|
||||
src/ScadaLink.CentralUI/Components/Pages/Monitoring/NotificationOutbox.razor \
|
||||
tests/ScadaLink.CentralUI.Tests/Pages/NotificationOutboxPageTests.cs \
|
||||
tests/ScadaLink.CentralUI.Tests/Pages/NotificationReportPageTests.cs
|
||||
git add src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Pages/Notifications/NotificationReport.razor \
|
||||
src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Pages/Monitoring/NotificationOutbox.razor \
|
||||
tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests/Pages/NotificationOutboxPageTests.cs \
|
||||
tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests/Pages/NotificationReportPageTests.cs
|
||||
git commit -m "refactor(central-ui): split Notification Report out of the Outbox page"
|
||||
```
|
||||
|
||||
@@ -938,8 +938,8 @@ git commit -m "refactor(central-ui): split Notification Report out of the Outbox
|
||||
## Task 10: New Notification KPIs page
|
||||
|
||||
**Files:**
|
||||
- Create: `src/ScadaLink.CentralUI/Components/Pages/Notifications/NotificationKpis.razor`
|
||||
- Test: `tests/ScadaLink.CentralUI.Tests/Pages/NotificationKpisPageTests.cs`
|
||||
- Create: `src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Pages/Notifications/NotificationKpis.razor`
|
||||
- Test: `tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests/Pages/NotificationKpisPageTests.cs`
|
||||
|
||||
**Context:** This page shows the five global KPI tiles (lifted from the old Outbox page, markup lines 30-71) plus a per-source-site breakdown table backed by `CommunicationService.GetPerSiteNotificationKpisAsync` (Task 5). `CommunicationService` is a concrete class with non-virtual methods, so tests drive it through the scripted-actor seam — copy the `ActorSystem` + scripted `ReceiveActor` + `SetNotificationOutbox` setup verbatim from `NotificationReportPageTests.cs` (Task 9). The scripted actor must answer **both** `NotificationKpiRequest` and `PerSiteNotificationKpiRequest`. Site friendly-names come from `ISiteRepository.GetAllSitesAsync()` (`Site.SiteIdentifier` / `Site.Name`), exactly as the old Outbox page resolved the source-site filter.
|
||||
|
||||
@@ -980,11 +980,11 @@ public void ShowsPerSiteEmptyState_WhenNoSites()
|
||||
}
|
||||
```
|
||||
|
||||
Use `using NotificationKpisPage = ScadaLink.CentralUI.Components.Pages.Notifications.NotificationKpis;`.
|
||||
Use `using NotificationKpisPage = ZB.MOM.WW.ScadaBridge.CentralUI.Components.Pages.Notifications.NotificationKpis;`.
|
||||
|
||||
**Step 2: Run test to verify it fails**
|
||||
|
||||
Run: `dotnet test tests/ScadaLink.CentralUI.Tests/ScadaLink.CentralUI.Tests.csproj --filter NotificationKpisPageTests`
|
||||
Run: `dotnet test tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests.csproj --filter NotificationKpisPageTests`
|
||||
Expected: FAIL — `NotificationKpis` page does not exist.
|
||||
|
||||
**Step 3: Write minimal implementation**
|
||||
@@ -993,12 +993,12 @@ Expected: FAIL — `NotificationKpis` page does not exist.
|
||||
|
||||
```razor
|
||||
@page "/notifications/kpis"
|
||||
@attribute [Authorize(Policy = ScadaLink.Security.AuthorizationPolicies.RequireDeployment)]
|
||||
@using ScadaLink.Commons.Entities.Sites
|
||||
@using ScadaLink.Commons.Interfaces.Repositories
|
||||
@using ScadaLink.Commons.Messages.Notification
|
||||
@using ScadaLink.Commons.Types.Notifications
|
||||
@using ScadaLink.Communication
|
||||
@attribute [Authorize(Policy = ZB.MOM.WW.ScadaBridge.Security.AuthorizationPolicies.RequireDeployment)]
|
||||
@using ZB.MOM.WW.ScadaBridge.Commons.Entities.Sites
|
||||
@using ZB.MOM.WW.ScadaBridge.Commons.Interfaces.Repositories
|
||||
@using ZB.MOM.WW.ScadaBridge.Commons.Messages.Notification
|
||||
@using ZB.MOM.WW.ScadaBridge.Commons.Types.Notifications
|
||||
@using ZB.MOM.WW.ScadaBridge.Communication
|
||||
@inject CommunicationService CommunicationService
|
||||
@inject ISiteRepository SiteRepository
|
||||
@inject ILogger<NotificationKpis> Logger
|
||||
@@ -1205,14 +1205,14 @@ Expected: FAIL — `NotificationKpis` page does not exist.
|
||||
|
||||
**Step 4: Run test to verify it passes**
|
||||
|
||||
Run: `dotnet test tests/ScadaLink.CentralUI.Tests/ScadaLink.CentralUI.Tests.csproj --filter NotificationKpisPageTests`
|
||||
Run: `dotnet test tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests.csproj --filter NotificationKpisPageTests`
|
||||
Expected: PASS.
|
||||
|
||||
**Step 5: Commit**
|
||||
|
||||
```bash
|
||||
git add src/ScadaLink.CentralUI/Components/Pages/Notifications/NotificationKpis.razor \
|
||||
tests/ScadaLink.CentralUI.Tests/Pages/NotificationKpisPageTests.cs
|
||||
git add src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Pages/Notifications/NotificationKpis.razor \
|
||||
tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests/Pages/NotificationKpisPageTests.cs
|
||||
git commit -m "feat(central-ui): Notification KPIs page with per-site breakdown"
|
||||
```
|
||||
|
||||
@@ -1221,8 +1221,8 @@ git commit -m "feat(central-ui): Notification KPIs page with per-site breakdown"
|
||||
## Task 11: NavMenu — add the Notifications section
|
||||
|
||||
**Files:**
|
||||
- Modify: `src/ScadaLink.CentralUI/Components/Layout/NavMenu.razor`
|
||||
- Test: `tests/ScadaLink.CentralUI.Tests/Layout/NavMenuTests.cs` (create)
|
||||
- Modify: `src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Layout/NavMenu.razor`
|
||||
- Test: `tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests/Layout/NavMenuTests.cs` (create)
|
||||
|
||||
**Context:** `NavMenu.razor` builds the sidebar. It has gated sections (Admin / Design / Deployment each wrapped in one `AuthorizeView Policy=...`) and a Monitoring section with per-item gating. Two existing items must move out: the **SMTP Configuration** `<li>` in the Admin section and the **Notification Outbox** `<li>` in the Monitoring section. The new Notifications section goes **between the Deployment section and the Monitoring section**. Each item is wrapped in its own per-item `AuthorizeView` (the Monitoring section already does this — copy that shape). The plain-`div` section header needs no gating: every authenticated user holds at least one of Admin/Design/Deployment.
|
||||
|
||||
@@ -1232,10 +1232,10 @@ bUnit-render `NavMenu` under different role principals. Copy the authorization w
|
||||
|
||||
```csharp
|
||||
using Bunit;
|
||||
using ScadaLink.Security;
|
||||
using NavMenu = ScadaLink.CentralUI.Components.Layout.NavMenu;
|
||||
using ZB.MOM.WW.ScadaBridge.Security;
|
||||
using NavMenu = ZB.MOM.WW.ScadaBridge.CentralUI.Components.Layout.NavMenu;
|
||||
|
||||
namespace ScadaLink.CentralUI.Tests.Layout;
|
||||
namespace ZB.MOM.WW.ScadaBridge.CentralUI.Tests.Layout;
|
||||
|
||||
public class NavMenuTests : BunitContext
|
||||
{
|
||||
@@ -1277,7 +1277,7 @@ public class NavMenuTests : BunitContext
|
||||
|
||||
**Step 2: Run test to verify it fails**
|
||||
|
||||
Run: `dotnet test tests/ScadaLink.CentralUI.Tests/ScadaLink.CentralUI.Tests.csproj --filter NavMenuTests`
|
||||
Run: `dotnet test tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests.csproj --filter NavMenuTests`
|
||||
Expected: FAIL — old routes still present, new section absent.
|
||||
|
||||
**Step 3: Write minimal implementation**
|
||||
@@ -1335,14 +1335,14 @@ In `NavMenu.razor`:
|
||||
|
||||
**Step 4: Run test to verify it passes**
|
||||
|
||||
Run: `dotnet test tests/ScadaLink.CentralUI.Tests/ScadaLink.CentralUI.Tests.csproj --filter NavMenuTests`
|
||||
Run: `dotnet test tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests.csproj --filter NavMenuTests`
|
||||
Expected: PASS.
|
||||
|
||||
**Step 5: Commit**
|
||||
|
||||
```bash
|
||||
git add src/ScadaLink.CentralUI/Components/Layout/NavMenu.razor \
|
||||
tests/ScadaLink.CentralUI.Tests/Layout/NavMenuTests.cs
|
||||
git add src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Layout/NavMenu.razor \
|
||||
tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests/Layout/NavMenuTests.cs
|
||||
git commit -m "feat(central-ui): add the Notifications nav section"
|
||||
```
|
||||
|
||||
@@ -1351,8 +1351,8 @@ git commit -m "feat(central-ui): add the Notifications nav section"
|
||||
## Task 12: Health dashboard — link to the KPI page
|
||||
|
||||
**Files:**
|
||||
- Modify: `src/ScadaLink.CentralUI/Components/Pages/Monitoring/Health.razor`
|
||||
- Test: `tests/ScadaLink.CentralUI.Tests/Pages/HealthPageTests.cs` (add a case)
|
||||
- Modify: `src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Pages/Monitoring/Health.razor`
|
||||
- Test: `tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests/Pages/HealthPageTests.cs` (add a case)
|
||||
|
||||
**Context:** `Health.razor` keeps a "Notification Outbox" headline tile row (`<h6 ...>Notification Outbox</h6>` at line ~24, three tiles below). Add a "View details →" link to `/notifications/kpis` next to that heading. The tiles and their data path are unchanged.
|
||||
|
||||
@@ -1371,7 +1371,7 @@ public void RendersLinkToTheNotificationKpisPage()
|
||||
|
||||
**Step 2: Run test to verify it fails**
|
||||
|
||||
Run: `dotnet test tests/ScadaLink.CentralUI.Tests/ScadaLink.CentralUI.Tests.csproj --filter RendersLinkToTheNotificationKpisPage`
|
||||
Run: `dotnet test tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests.csproj --filter RendersLinkToTheNotificationKpisPage`
|
||||
Expected: FAIL — no such link.
|
||||
|
||||
**Step 3: Write minimal implementation**
|
||||
@@ -1393,14 +1393,14 @@ with a heading row carrying the link:
|
||||
|
||||
**Step 4: Run test to verify it passes**
|
||||
|
||||
Run: `dotnet test tests/ScadaLink.CentralUI.Tests/ScadaLink.CentralUI.Tests.csproj --filter HealthPageTests`
|
||||
Run: `dotnet test tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests.csproj --filter HealthPageTests`
|
||||
Expected: PASS.
|
||||
|
||||
**Step 5: Commit**
|
||||
|
||||
```bash
|
||||
git add src/ScadaLink.CentralUI/Components/Pages/Monitoring/Health.razor \
|
||||
tests/ScadaLink.CentralUI.Tests/Pages/HealthPageTests.cs
|
||||
git add src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Pages/Monitoring/Health.razor \
|
||||
tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests/Pages/HealthPageTests.cs
|
||||
git commit -m "feat(central-ui): link Health outbox tiles to the Notification KPIs page"
|
||||
```
|
||||
|
||||
@@ -1412,13 +1412,13 @@ git commit -m "feat(central-ui): link Health outbox tiles to the Notification KP
|
||||
|
||||
**Step 1: Clean build**
|
||||
|
||||
Run: `dotnet build ScadaLink.slnx`
|
||||
Run: `dotnet build ZB.MOM.WW.ScadaBridge.slnx`
|
||||
Expected: Build succeeded, **0 warnings** (`TreatWarningsAsErrors` is on).
|
||||
|
||||
**Step 2: Full test suite**
|
||||
|
||||
Run: `dotnet test ScadaLink.slnx`
|
||||
Expected: all test projects green. If `SandboxTests.Sandbox_LongRunningScript_TimesOut` or an `InstanceActorChildAttributeRace` test fails, that is a known pre-existing CPU-timing flake under parallel load — re-run `tests/ScadaLink.SiteRuntime.Tests` in isolation to confirm it is not a regression from this work.
|
||||
Run: `dotnet test ZB.MOM.WW.ScadaBridge.slnx`
|
||||
Expected: all test projects green. If `SandboxTests.Sandbox_LongRunningScript_TimesOut` or an `InstanceActorChildAttributeRace` test fails, that is a known pre-existing CPU-timing flake under parallel load — re-run `tests/ZB.MOM.WW.ScadaBridge.SiteRuntime.Tests` in isolation to confirm it is not a regression from this work.
|
||||
|
||||
**Step 3: Grep for stale references**
|
||||
|
||||
|
||||
Reference in New Issue
Block a user