Commit Graph

628 Commits

Author SHA1 Message Date
Joseph Doherty 1afb3670c5 test(e2e): add ListAreaIdsByNamePrefixAsync CLI helper for UI-created area teardown
Adds CliRunner.ListAreaIdsByNamePrefixAsync so Playwright tests can locate
and delete areas they created through the UI without needing the id returned
from a CLI create call. Mirrors ListTemplateIdsByNamePrefixAsync. Round-trip
test verifies create → list-by-prefix → delete against the live cluster.
2026-06-06 13:20:11 -04:00
Joseph Doherty 0700777e2f test(e2e): guard ApiSurfaceFixture partial-init delete + seal TransportImportTests (final review nits) 2026-06-06 12:37:21 -04:00
Joseph Doherty 09f14f18ea test(e2e): cap live browser contexts to bound Blazor circuit pressure (fixes full-suite timeouts); import negative-test review fixes 2026-06-06 12:33:06 -04:00
Joseph Doherty b52f7281aa test(e2e): Transport import wrong-passphrase shows error and stays on passphrase step 2026-06-06 12:21:56 -04:00
Joseph Doherty 3f88de932c test(e2e): harden Transport export test — render sentinel + step-scoped Next (review fix) 2026-06-06 12:19:38 -04:00
Joseph Doherty 79586ca5ad test(e2e): row-scope API-key kebab dropdown selectors + visibility-gate items (review fix) 2026-06-06 12:16:50 -04:00
Joseph Doherty 57ca5d6321 test(e2e): Transport Export wizard reaches download summary for a zztest template 2026-06-06 12:13:55 -04:00
Joseph Doherty 73b213442f test(e2e): tighten API-key validation locator to div.text-danger.small (review precision fix) 2026-06-06 12:10:12 -04:00
Joseph Doherty 89231e3245 test(e2e): API-key enable/disable badge transition + delete-with-confirm removes row 2026-06-06 12:08:53 -04:00
Joseph Doherty 9fe3ac30c9 test(e2e): API-key create→token reveal + name/method validation edges 2026-06-06 12:06:09 -04:00
Joseph Doherty 84edf5a134 test(e2e): add ApiSurfaceFixture (inbound api-method for API-key form checkboxes) 2026-06-06 12:00:42 -04:00
Joseph Doherty fecac45d05 test(e2e): InstanceConfigure attribute-override + area reassignment + not-found edge 2026-06-06 11:58:45 -04:00
Joseph Doherty 3e4b0ca44c test(e2e): InstanceConfigure bindings round-trip (bulk assign → save → verify via instance get) 2026-06-06 11:55:23 -04:00
Joseph Doherty 32240919cc test(e2e): address Task 0 review — rename GetInstanceDocumentAsync (ownership), add CreateApiKeyAsync (CLI emits prose not JSON) 2026-06-06 11:44:22 -04:00
Joseph Doherty e618137ce7 test(e2e): add InstanceConfigureFixture (template+attr+connection+area+instance on site-a)
Also extends AddAttributeAsync with an optional dataSourceReference parameter
so the fixture attribute appears in both _bindingDataSourceAttrs (bindings UI)
and _overrideAttrs (overrides UI) on the InstanceConfigure page.
2026-06-06 11:41:52 -04:00
Joseph Doherty a8a515ec8a test(e2e): add CliRunner helpers for data-connection, api-method, api-key teardown, instance read-back 2026-06-06 11:37:57 -04:00
Joseph Doherty 667d141f1a test(e2e): unify toast assertion + extract shared PlaywrightDbConnection (review cleanups) 2026-06-05 11:00:27 -04:00
Joseph Doherty 5546c32593 test(e2e): move deploy/disable preconditions inside try for guaranteed cleanup (review fix)
In Disable_Instance_ShowsOutcomeToast and Enable_Instance_ShowsOutcomeToast, the
precondition CLI calls (DeployInstanceAsync / DisableInstanceAsync) were between
CreateInstanceAsync and the try block. A throw there would skip the finally
DeleteInstanceAsync, leaking the instance. Moved those calls to be the first
statements inside try so cleanup always runs once the instance exists.
2026-06-05 10:52:00 -04:00
Joseph Doherty ad0bc33231 test(e2e): cover Topology Enable/Disable/Delete + fix toast assertion 2026-06-05 10:48:06 -04:00
Joseph Doherty fac0bcbb01 test(e2e): use web-first toast assertion in notification tests (review fix) 2026-06-05 10:47:06 -04:00
Joseph Doherty 1cbf260969 test(e2e): add wizard sentinel waits + tighten audit-link assertion (review fixes) 2026-06-05 10:46:57 -04:00
Joseph Doherty 4d55c0ac95 test(e2e): cover notification retry/discard + parked-messages query 2026-06-05 10:40:06 -04:00
Joseph Doherty 9cc5b7355e test(e2e): cover Transport Import apply round-trip 2026-06-05 10:38:42 -04:00
Joseph Doherty e358c231ce test(e2e): cover Topology Deploy action 2026-06-05 10:38:34 -04:00
Joseph Doherty 043914fd71 test(e2e): scope Site delete dropdown to .dropdown (review fix) 2026-06-05 10:34:07 -04:00
Joseph Doherty 917e5f30bf test(e2e): structural modal discriminator + simpler post-delete wait (review fixes) 2026-06-05 10:34:07 -04:00
Joseph Doherty 8e11f1f900 test(e2e): guard DeploymentFixture partial-init + teardown (review fixes) 2026-06-05 10:30:16 -04:00
Joseph Doherty 19c4412fd1 test(e2e): cover Template create/add-attribute/delete round-trip 2026-06-05 10:28:53 -04:00
Joseph Doherty 3998a6126f test(e2e): cover Site create/edit/delete round-trip
Adds CreateEditDelete_Site_RoundTrips [SkippableFact] to SiteCrudTests.
Exercises the full create → edit → delete UI flow against the live cluster,
with CliRunner best-effort teardown so no zztest-* sites leak on mid-test failure.
2026-06-05 10:28:40 -04:00
Joseph Doherty 271f70b1d2 test(e2e): standardize AuditLog tests on SkippableFact + skip summary log 2026-06-05 10:25:16 -04:00
Joseph Doherty 234ddb5201 test(e2e): add DeploymentFixture (ephemeral instance on site-a) 2026-06-05 10:25:06 -04:00
Joseph Doherty 3d9ef0a477 test(e2e): harden LDAP teardown + tighten nav/health selectors (review fixes) 2026-06-05 10:19:48 -04:00
Joseph Doherty 754f049a98 test(e2e): guard BundleExport comma + document DeleteAreaAsync (review fixes) 2026-06-05 10:11:17 -04:00
Joseph Doherty 12bf08f64a test(e2e): cover LDAP mapping create/edit/delete round-trip 2026-06-05 10:09:15 -04:00
Joseph Doherty 4f4b34ea89 test(e2e): assert Health KPI tiles resolve (singleton-hang guard)
Guards against the Akka singleton Ask hang regression: asserts all nine KPI
tiles on /monitoring/health resolve to numeric values and never show the
em-dash degrade placeholder (—). Covers Notification Outbox, Audit, and
Site Call tile groups. Selector disambiguation: Outbox tiles are div.card,
Site Call tiles are button.card — prevents strict-mode collisions on the
shared "Stuck" and "Parked" labels.
2026-06-05 10:08:32 -04:00
Joseph Doherty 2a25f2aaf8 test(e2e): assert destination renders, not just URL, in nav tests 2026-06-05 10:07:19 -04:00
Joseph Doherty 4a7c46f1db test(e2e): add CliRunner typed fixture helpers 2026-06-05 10:04:05 -04:00
Joseph Doherty bf78e3e7bf test(e2e): harden CliRunner timeout drain + skip-counter (review fixes) 2026-06-05 09:59:41 -04:00
Joseph Doherty 9e914299c8 test(e2e): add CliRunner + ClusterAvailability probe 2026-06-05 09:56:47 -04:00
Joseph Doherty 51e48fca91 test(e2e): reference CLI project so tests can shell out to it 2026-06-05 09:53:51 -04:00
Joseph Doherty 0783547a2d chore(theme): bump ZB.MOM.WW.Theme 0.3.0 -> 0.3.1 (interactive-render nav fix) 2026-06-05 07:19:11 -04:00
Joseph Doherty 15752f8c2d fix(security): make auth cookie name configurable, override per env
The auth cookie name was hardcoded to ZB.MOM.WW.ScadaBridge.Auth. Because
browser cookies are scoped by host+path but NOT by port, two ScadaBridge
clusters on the same host (the local docker stack on localhost:9000 and
docker-env2 on localhost:9100) shared one cookie jar: signing into one
overwrote the other's cookie, and since the clusters use different JWT
signing keys + separate Data Protection key rings, the overwritten side
could no longer validate its cookie and the session died.

Add SecurityOptions.CookieName (default = canonical ZB.MOM.WW.ScadaBridge.Auth,
blank falls back to the default) applied via the SecurityOptions-bound cookie
PostConfigure. Override it to ...Auth.env2 in both docker-env2 Central nodes so
the two local clusters no longer collide; the primary cluster keeps the default
so its live sessions and production are unaffected. Adds 3 Security.Tests cases.
2026-06-03 13:11:29 -04:00
Joseph Doherty b9516e6721 feat(centralui): LoginCard sign-in
Replace hand-rolled Bootstrap card with the shared <LoginCard> from ZB.MOM.WW.Theme.
Update ComponentRenderingTests assertions to match LoginCard's rendered structure
(h1.login-title, div.panel.notice.login-error, "Sign in" button text).
2026-06-03 03:34:12 -04:00
Joseph Doherty 957203ec7b feat(centralui): MainLayout/NavMenu delegate to ZB.MOM.WW.Theme ThemeShell + kit nav 2026-06-03 03:31:10 -04:00
Joseph Doherty b3de8408fa feat(audit): ScadaBridge IAuditActorAccessor + wire audit Actor from Auth principal at authenticated emit sites (Phase 3) 2026-06-02 15:33:01 -04:00
Joseph Doherty bc0e5bfd37 docs(audit): ScadaBridge C7 review — correct 'six persisted' computed-col wording (5 persisted + IngestedAtUtc non-persisted) + stale perf iteration comment 2026-06-02 15:08:49 -04:00
Joseph Doherty 635461c0fd chore(audit): ScadaBridge C7 — perf re-baseline + CollapseAuditLogToCanonical projection test + index-test fix + dead-cref cleanup (Task 2.5)
Perf re-baseline (HotPathLatencyTests): empirical p95 on Apple M-series Release
build: 4KB DetailsJson slow path ≈14 µs, small-DetailsJson no-redactors ≈2 µs,
true no-op fast path ≈0 µs. Thresholds updated: 200 µs / 30 µs / 5 µs (≈15×
headroom for contested CI runners). Old thresholds (50 µs / 10 µs) were set for
the pre-C3 typed-field path; canonical JSON parse+rewrite is empirically faster.
Adds a third test (Filter_Apply_NoDetailsJson_FastPath) that asserts same-instance
return on the DetailsJson-null + within-cap fast path. Env-var overrides retained.

CollapseAuditLogToCanonicalMigrationTests (new): three MSSQL-gated [SkippableFact]
tests verifying Action/Category/Outcome projection, NULL Actor, DetailsJson codec
round-trip, and all six persisted computed columns (Kind/Status/SourceSiteId/
ExecutionId/ParentExecutionId) for ApiOutbound, InboundAuthFailure, and Failed-
status rows.

AddAuditLogTableMigrationTests: rename CreatesFiveNamedIndexes →
CreatesNineNamedIndexes; expand coverage from 5 original indexes to all 9 named
non-clustered indexes present after CollapseAuditLogToCanonical (adds
IX_AuditLog_Execution, IX_AuditLog_ParentExecution, IX_AuditLog_Node_Occurred,
UX_AuditLog_EventId).

Dead-cref cleanup: zero references to the deleted IAuditPayloadFilter /
DefaultAuditPayloadFilter / SafeDefaultAuditPayloadFilter types remain in any
.cs file (source or test). 26 occurrences across 13 files replaced with correct
references to IAuditRedactor / ScadaBridgeAuditRedactor / SafeDefaultAuditRedactor
or reworded as plain prose.

Residual sweep: no unused transitional code found beyond the acknowledged
"C3 transitional shim" comments on IngestedAtUtc stamping (active code, not dead).
2026-06-02 14:59:23 -04:00
Joseph Doherty 68a6bd1720 feat(audit)!: ScadaBridge C5 — collapse central dbo.AuditLog to 10 canonical cols + persisted computed cols; CollapseAuditLogToCanonical migration; repo writes canonical directly (Task 2.5) 2026-06-02 14:06:46 -04:00
Joseph Doherty 1737d15f04 fix(audit): ScadaBridge C4 review — enable PRAGMA foreign_keys + MarkForwarded state guard (no Reconciled demotion) + test (Task 2.5) 2026-06-02 13:23:36 -04:00
Joseph Doherty 946d3e2aef feat(audit): ScadaBridge C4 — site SQLite two-table (audit_event canonical + audit_forward_state sidecar), forwarding on sidecar, IsCachedKind drain split (Task 2.5) 2026-06-02 13:11:20 -04:00