diff --git a/docs/ui-consistency/evidence/ot09-deployments/README.md b/docs/ui-consistency/evidence/ot09-deployments/README.md new file mode 100644 index 000000000..d65885604 --- /dev/null +++ b/docs/ui-consistency/evidence/ot09-deployments/README.md @@ -0,0 +1,20 @@ +# OT09 deployment request versus application status + +Frozen scope: Deployments.razor, new DeploymentFeedback, and three test files listed in source-freeze.json. Shared Theme stays published 1.0.1. No actor/backend/authorization policy changes. + +Actual StartDeploymentOutcome is separate from recorded DeploymentStatus. Accepted means in progress, NoChanges is informational, an unknown transport result invents no verdict, and a new accepted ID never borrows the previous deployment’s terminal status. Sealed degradation and full failure metadata remain visible. Short live status is separate from escaped native diagnostic disclosures. Requested ID/revision and UTC machine-readable last-fetched time remain available. Manual Refresh reads the existing bounded scalar history; no automatic polling or artifact fetch was added. Failed refresh preserves rows, timestamp and accepted outcome. Initial unavailability does not masquerade as empty history. Pending request/read guards prevent reentry. Disposal cancels view-owned reads, never an already-dispatched mutation; disposal during auth prevents a new dispatch. + +## Verification + +- tests.log/tests.trx: 37 passed, 0 failed/skipped. Includes 18 feedback cases, 11 page cases, existing drift/API contracts and a real-provider page test. The latter seeds 60 synthetic rows in the owned disposable SQL instance, verifies the real translated query returns 50 rows and excludes ArtifactBlob, then removes its own IDs. The test runner receives private credentials only through child environment; no credentials are retained here. +- Command from repository root: `python3 infra/tools/ui-consistency/with_private_sql.py --state -- dotnet test tests/Server/ZB.MOM.WW.OtOpcUa.AdminUI.Tests/ZB.MOM.WW.OtOpcUa.AdminUI.Tests.csproj -c Release --no-restore --filter "FullyQualifiedName~DeploymentFeedbackTests|FullyQualifiedName~DeploymentRefreshTests|FullyQualifiedName~DeploymentPageSqlServerTests|FullyQualifiedName~DeploymentDriftProbeTests|FullyQualifiedName~DeploymentStatusEndpointTests" --logger "trx;LogFileName=ot09-final-deployment.trx" --results-directory /tmp/ot09-final-deployment-results`. Raw TRX records the exact five classes and all 37 identities. +- fixture-build.log: actual AdminUI component fixture compiles with zero warnings/errors. +- confirmation-matrix.json: 24/24 browser cases, 1440/390 at 100% and real browser 200% (720/195 effective CSS widths), synthetic accept/no-change/rejected/unknown/blocked/initial-read-failure. Actual double-click dispatches once; manual status recovery, failed-refresh retention, no polling/reload/body overflow and retained per-node link are checked. Synthetic fixture uses memory-only records/fabricated actor replies; no fleet writes. + +## Retained failures and corrections + +Two initial harness runs ended on embedded-JavaScript selector quoting SyntaxErrors; the historically named first-fixture-hydration-reset.log is not evidence of a product hydration defect. Both logs are retained. The first complete matrix passed 20/24: case-sensitive checks failed on visually uppercase chip text; one real 195px chip exceeded its panel by 13.24px. accepted-status-195-before.json/png preserve that defect. The local display is now short “Awaiting acks” plus a wrapped full “Awaiting apply acknowledgements” caption; domain enum/status is unchanged. Corrected comparison checks and bounded confirmation pass all24. Zoomed matrix photographs may be poorly framed by Chromium viewport capture after scrolling; DOM geometry remains the recorded measurement. A separate tall-viewport 195px photo is framing confirmation only, not another behavior matrix. + +## Limits / rollout + +This is a component canary and focused test slice, not a full production fleet or deployment test. Full combined consumer suite, whole-route accessibility/zoom matrix, package provenance and rollback remain OT14. No deployment or production configuration mutation was performed. Roll back this scoped source commit if regression is found; keep published package versions immutable. diff --git a/docs/ui-consistency/evidence/ot09-deployments/accept-1440-zoom1.png b/docs/ui-consistency/evidence/ot09-deployments/accept-1440-zoom1.png new file mode 100644 index 000000000..b8105d3af Binary files /dev/null and b/docs/ui-consistency/evidence/ot09-deployments/accept-1440-zoom1.png differ diff --git a/docs/ui-consistency/evidence/ot09-deployments/accept-1440-zoom2.png b/docs/ui-consistency/evidence/ot09-deployments/accept-1440-zoom2.png new file mode 100644 index 000000000..862b63cd4 Binary files /dev/null and b/docs/ui-consistency/evidence/ot09-deployments/accept-1440-zoom2.png differ diff --git a/docs/ui-consistency/evidence/ot09-deployments/accept-390-zoom1.png b/docs/ui-consistency/evidence/ot09-deployments/accept-390-zoom1.png new file mode 100644 index 000000000..b1961486f Binary files /dev/null and b/docs/ui-consistency/evidence/ot09-deployments/accept-390-zoom1.png differ diff --git a/docs/ui-consistency/evidence/ot09-deployments/accept-390-zoom2.png b/docs/ui-consistency/evidence/ot09-deployments/accept-390-zoom2.png new file mode 100644 index 000000000..e32c7f5cc Binary files /dev/null and b/docs/ui-consistency/evidence/ot09-deployments/accept-390-zoom2.png differ diff --git a/docs/ui-consistency/evidence/ot09-deployments/accepted-1440-zoom1.png b/docs/ui-consistency/evidence/ot09-deployments/accepted-1440-zoom1.png new file mode 100644 index 000000000..61f05dab5 Binary files /dev/null and b/docs/ui-consistency/evidence/ot09-deployments/accepted-1440-zoom1.png differ diff --git a/docs/ui-consistency/evidence/ot09-deployments/accepted-1440-zoom2.png b/docs/ui-consistency/evidence/ot09-deployments/accepted-1440-zoom2.png new file mode 100644 index 000000000..c4c725d5b Binary files /dev/null and b/docs/ui-consistency/evidence/ot09-deployments/accepted-1440-zoom2.png differ diff --git a/docs/ui-consistency/evidence/ot09-deployments/accepted-390-zoom1.png b/docs/ui-consistency/evidence/ot09-deployments/accepted-390-zoom1.png new file mode 100644 index 000000000..25364ada6 Binary files /dev/null and b/docs/ui-consistency/evidence/ot09-deployments/accepted-390-zoom1.png differ diff --git a/docs/ui-consistency/evidence/ot09-deployments/accepted-390-zoom2.png b/docs/ui-consistency/evidence/ot09-deployments/accepted-390-zoom2.png new file mode 100644 index 000000000..30037bd59 Binary files /dev/null and b/docs/ui-consistency/evidence/ot09-deployments/accepted-390-zoom2.png differ diff --git a/docs/ui-consistency/evidence/ot09-deployments/accepted-status-195-before.json b/docs/ui-consistency/evidence/ot09-deployments/accepted-status-195-before.json new file mode 100644 index 000000000..138159f87 --- /dev/null +++ b/docs/ui-consistency/evidence/ot09-deployments/accepted-status-195-before.json @@ -0,0 +1,8 @@ +{ + "chipWidth": 151.2421875, + "chipRight": 188.2421875, + "panelRight": 175, + "clipped": true, + "width": 195, + "dpr": 2 +} diff --git a/docs/ui-consistency/evidence/ot09-deployments/accepted-status-195-before.png b/docs/ui-consistency/evidence/ot09-deployments/accepted-status-195-before.png new file mode 100644 index 000000000..d3a479760 Binary files /dev/null and b/docs/ui-consistency/evidence/ot09-deployments/accepted-status-195-before.png differ diff --git a/docs/ui-consistency/evidence/ot09-deployments/accepted-status-195-confirmation.png b/docs/ui-consistency/evidence/ot09-deployments/accepted-status-195-confirmation.png new file mode 100644 index 000000000..bfc6f8382 Binary files /dev/null and b/docs/ui-consistency/evidence/ot09-deployments/accepted-status-195-confirmation.png differ diff --git a/docs/ui-consistency/evidence/ot09-deployments/blocked-1440-zoom1.png b/docs/ui-consistency/evidence/ot09-deployments/blocked-1440-zoom1.png new file mode 100644 index 000000000..b87f2a82c Binary files /dev/null and b/docs/ui-consistency/evidence/ot09-deployments/blocked-1440-zoom1.png differ diff --git a/docs/ui-consistency/evidence/ot09-deployments/blocked-1440-zoom2.png b/docs/ui-consistency/evidence/ot09-deployments/blocked-1440-zoom2.png new file mode 100644 index 000000000..c64255005 Binary files /dev/null and b/docs/ui-consistency/evidence/ot09-deployments/blocked-1440-zoom2.png differ diff --git a/docs/ui-consistency/evidence/ot09-deployments/blocked-390-zoom1.png b/docs/ui-consistency/evidence/ot09-deployments/blocked-390-zoom1.png new file mode 100644 index 000000000..416113aa6 Binary files /dev/null and b/docs/ui-consistency/evidence/ot09-deployments/blocked-390-zoom1.png differ diff --git a/docs/ui-consistency/evidence/ot09-deployments/blocked-390-zoom2.png b/docs/ui-consistency/evidence/ot09-deployments/blocked-390-zoom2.png new file mode 100644 index 000000000..a19848ff2 Binary files /dev/null and b/docs/ui-consistency/evidence/ot09-deployments/blocked-390-zoom2.png differ diff --git a/docs/ui-consistency/evidence/ot09-deployments/confirmation-matrix.json b/docs/ui-consistency/evidence/ot09-deployments/confirmation-matrix.json new file mode 100644 index 000000000..d78252555 --- /dev/null +++ b/docs/ui-consistency/evidence/ot09-deployments/confirmation-matrix.json @@ -0,0 +1,594 @@ +[ + { + "sample": "accept", + "width": 1440, + "zoom": 1, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "acceptedNotCompleted": true, + "acceptedNoBodyOverflow": true, + "acceptedStatusNotClipped": true, + "noUnrequestedPolling": true, + "manualRefreshObservesSealed": true, + "failedRefreshPreservesRowsAndTime": true, + "restoreDoesNotFabricateARead": true, + "explicitRetryClearsError": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "acceptedLayout": { + "width": 1440, + "document": 1440, + "dpr": 1 + }, + "finalLayout": { + "width": 1440, + "document": 1440, + "dpr": 1 + } + }, + "errors": [], + "passed": true + }, + { + "sample": "accept", + "width": 390, + "zoom": 1, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "acceptedNotCompleted": true, + "acceptedNoBodyOverflow": true, + "acceptedStatusNotClipped": true, + "noUnrequestedPolling": true, + "manualRefreshObservesSealed": true, + "failedRefreshPreservesRowsAndTime": true, + "restoreDoesNotFabricateARead": true, + "explicitRetryClearsError": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "acceptedLayout": { + "width": 390, + "document": 390, + "dpr": 1 + }, + "finalLayout": { + "width": 390, + "document": 390, + "dpr": 1 + } + }, + "errors": [], + "passed": true + }, + { + "sample": "accept", + "width": 1440, + "zoom": 2, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "acceptedNotCompleted": true, + "acceptedNoBodyOverflow": true, + "acceptedStatusNotClipped": true, + "noUnrequestedPolling": true, + "manualRefreshObservesSealed": true, + "failedRefreshPreservesRowsAndTime": true, + "restoreDoesNotFabricateARead": true, + "explicitRetryClearsError": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "acceptedLayout": { + "width": 720, + "document": 720, + "dpr": 2 + }, + "finalLayout": { + "width": 720, + "document": 720, + "dpr": 2 + } + }, + "errors": [], + "passed": true + }, + { + "sample": "accept", + "width": 390, + "zoom": 2, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "acceptedNotCompleted": true, + "acceptedNoBodyOverflow": true, + "acceptedStatusNotClipped": true, + "noUnrequestedPolling": true, + "manualRefreshObservesSealed": true, + "failedRefreshPreservesRowsAndTime": true, + "restoreDoesNotFabricateARead": true, + "explicitRetryClearsError": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "acceptedLayout": { + "width": 195, + "document": 195, + "dpr": 2 + }, + "finalLayout": { + "width": 195, + "document": 195, + "dpr": 2 + } + }, + "errors": [], + "passed": true + }, + { + "sample": "nochanges", + "width": 1440, + "zoom": 1, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "noFalseRejection": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "finalLayout": { + "width": 1440, + "document": 1440, + "dpr": 1 + } + }, + "errors": [], + "passed": true + }, + { + "sample": "nochanges", + "width": 390, + "zoom": 1, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "noFalseRejection": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "finalLayout": { + "width": 390, + "document": 390, + "dpr": 1 + } + }, + "errors": [], + "passed": true + }, + { + "sample": "nochanges", + "width": 1440, + "zoom": 2, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "noFalseRejection": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "finalLayout": { + "width": 720, + "document": 720, + "dpr": 2 + } + }, + "errors": [], + "passed": true + }, + { + "sample": "nochanges", + "width": 390, + "zoom": 2, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "noFalseRejection": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "finalLayout": { + "width": 195, + "document": 195, + "dpr": 2 + } + }, + "errors": [], + "passed": true + }, + { + "sample": "rejected", + "width": 1440, + "zoom": 1, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "finalLayout": { + "width": 1440, + "document": 1440, + "dpr": 1 + } + }, + "errors": [], + "passed": true + }, + { + "sample": "rejected", + "width": 390, + "zoom": 1, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "finalLayout": { + "width": 390, + "document": 390, + "dpr": 1 + } + }, + "errors": [], + "passed": true + }, + { + "sample": "rejected", + "width": 1440, + "zoom": 2, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "finalLayout": { + "width": 720, + "document": 720, + "dpr": 2 + } + }, + "errors": [], + "passed": true + }, + { + "sample": "rejected", + "width": 390, + "zoom": 2, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "finalLayout": { + "width": 195, + "document": 195, + "dpr": 2 + } + }, + "errors": [], + "passed": true + }, + { + "sample": "unknown", + "width": 1440, + "zoom": 1, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "noInventedVerdict": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "finalLayout": { + "width": 1440, + "document": 1440, + "dpr": 1 + } + }, + "errors": [], + "passed": true + }, + { + "sample": "unknown", + "width": 390, + "zoom": 1, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "noInventedVerdict": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "finalLayout": { + "width": 390, + "document": 390, + "dpr": 1 + } + }, + "errors": [], + "passed": true + }, + { + "sample": "unknown", + "width": 1440, + "zoom": 2, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "noInventedVerdict": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "finalLayout": { + "width": 720, + "document": 720, + "dpr": 2 + } + }, + "errors": [], + "passed": true + }, + { + "sample": "unknown", + "width": 390, + "zoom": 2, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "noInventedVerdict": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "finalLayout": { + "width": 195, + "document": 195, + "dpr": 2 + } + }, + "errors": [], + "passed": true + }, + { + "sample": "blocked", + "width": 1440, + "zoom": 1, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "finalLayout": { + "width": 1440, + "document": 1440, + "dpr": 1 + } + }, + "errors": [], + "passed": true + }, + { + "sample": "blocked", + "width": 390, + "zoom": 1, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "finalLayout": { + "width": 390, + "document": 390, + "dpr": 1 + } + }, + "errors": [], + "passed": true + }, + { + "sample": "blocked", + "width": 1440, + "zoom": 2, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "finalLayout": { + "width": 720, + "document": 720, + "dpr": 2 + } + }, + "errors": [], + "passed": true + }, + { + "sample": "blocked", + "width": 390, + "zoom": 2, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "finalLayout": { + "width": 195, + "document": 195, + "dpr": 2 + } + }, + "errors": [], + "passed": true + }, + { + "sample": "initial-error", + "width": 1440, + "zoom": 1, + "checks": { + "unavailableNotEmpty": true, + "requestDisabledUntilHistoryRead": true, + "manualRecoveryToConfirmedEmpty": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "finalLayout": { + "width": 1440, + "document": 1440, + "dpr": 1 + } + }, + "errors": [], + "passed": true + }, + { + "sample": "initial-error", + "width": 390, + "zoom": 1, + "checks": { + "unavailableNotEmpty": true, + "requestDisabledUntilHistoryRead": true, + "manualRecoveryToConfirmedEmpty": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "finalLayout": { + "width": 390, + "document": 390, + "dpr": 1 + } + }, + "errors": [], + "passed": true + }, + { + "sample": "initial-error", + "width": 1440, + "zoom": 2, + "checks": { + "unavailableNotEmpty": true, + "requestDisabledUntilHistoryRead": true, + "manualRecoveryToConfirmedEmpty": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "finalLayout": { + "width": 720, + "document": 720, + "dpr": 2 + } + }, + "errors": [], + "passed": true + }, + { + "sample": "initial-error", + "width": 390, + "zoom": 2, + "checks": { + "unavailableNotEmpty": true, + "requestDisabledUntilHistoryRead": true, + "manualRecoveryToConfirmedEmpty": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "finalLayout": { + "width": 195, + "document": 195, + "dpr": 2 + } + }, + "errors": [], + "passed": true + } +] diff --git a/docs/ui-consistency/evidence/ot09-deployments/confirmation.log b/docs/ui-consistency/evidence/ot09-deployments/confirmation.log new file mode 100644 index 000000000..c17cff3aa --- /dev/null +++ b/docs/ui-consistency/evidence/ot09-deployments/confirmation.log @@ -0,0 +1,6 @@ +{ + "origin": "http://127.0.0.1:50624", + "cases": 24, + "passed": 24, + "failed": [] +} diff --git a/docs/ui-consistency/evidence/ot09-deployments/first-fixture-hydration-reset.log b/docs/ui-consistency/evidence/ot09-deployments/first-fixture-hydration-reset.log new file mode 100644 index 000000000..1b5bd699e --- /dev/null +++ b/docs/ui-consistency/evidence/ot09-deployments/first-fixture-hydration-reset.log @@ -0,0 +1,37 @@ +Traceback (most recent call last): + File "/Users/dohertj2/Desktop/OtOpcUa/infra/tools/ui-consistency/check_deployment_feedback.py", line 29, in + page.wait_for_function('(text)=>document.querySelector("section[aria-label=\"Deployment feedback\"] [role=status]").textContent.includes(text)',arg=expected) + ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/opt/homebrew/lib/python3.14/site-packages/playwright/sync_api/_generated.py", line 11599, in wait_for_function + self._sync( + ~~~~~~~~~~^ + self._impl_obj.wait_for_function( + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ...<4 lines>... + ) + ^ + ) + ^ + File "/opt/homebrew/lib/python3.14/site-packages/playwright/_impl/_sync_base.py", line 115, in _sync + return task.result() + ~~~~~~~~~~~^^ + File "/opt/homebrew/lib/python3.14/site-packages/playwright/_impl/_page.py", line 1110, in wait_for_function + return await self._main_frame.wait_for_function(**locals_to_params(locals())) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/opt/homebrew/lib/python3.14/site-packages/playwright/_impl/_frame.py", line 878, in wait_for_function + await self._channel.send("waitForFunction", self._timeout, params) + File "/opt/homebrew/lib/python3.14/site-packages/playwright/_impl/_connection.py", line 69, in send + return await self._connection.wrap_api_call( + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ...<3 lines>... + ) + ^ + File "/opt/homebrew/lib/python3.14/site-packages/playwright/_impl/_connection.py", line 559, in wrap_api_call + raise rewrite_error(error, f"{parsed_st['apiName']}: {error}") from None +playwright._impl._errors.Error: Page.wait_for_function: SyntaxError: missing ) after argument list + at eval () + at predicate (eval at evaluate (:290:30), :4:56) + at next (eval at evaluate (:290:30), :29:29) + at eval (eval at evaluate (:290:30), :42:9) + at UtilityScript.evaluate (:292:16) + at UtilityScript. (:1:44) diff --git a/docs/ui-consistency/evidence/ot09-deployments/first-matrix.json b/docs/ui-consistency/evidence/ot09-deployments/first-matrix.json new file mode 100644 index 000000000..202efe38c --- /dev/null +++ b/docs/ui-consistency/evidence/ot09-deployments/first-matrix.json @@ -0,0 +1,594 @@ +[ + { + "sample": "accept", + "width": 1440, + "zoom": 1, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "acceptedNotCompleted": true, + "acceptedNoBodyOverflow": true, + "acceptedStatusNotClipped": true, + "noUnrequestedPolling": false, + "manualRefreshObservesSealed": true, + "failedRefreshPreservesRowsAndTime": false, + "restoreDoesNotFabricateARead": true, + "explicitRetryClearsError": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "acceptedLayout": { + "width": 1440, + "document": 1440, + "dpr": 1 + }, + "finalLayout": { + "width": 1440, + "document": 1440, + "dpr": 1 + } + }, + "errors": [], + "passed": false + }, + { + "sample": "accept", + "width": 390, + "zoom": 1, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "acceptedNotCompleted": true, + "acceptedNoBodyOverflow": true, + "acceptedStatusNotClipped": true, + "noUnrequestedPolling": false, + "manualRefreshObservesSealed": true, + "failedRefreshPreservesRowsAndTime": false, + "restoreDoesNotFabricateARead": true, + "explicitRetryClearsError": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "acceptedLayout": { + "width": 390, + "document": 390, + "dpr": 1 + }, + "finalLayout": { + "width": 390, + "document": 390, + "dpr": 1 + } + }, + "errors": [], + "passed": false + }, + { + "sample": "accept", + "width": 1440, + "zoom": 2, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "acceptedNotCompleted": true, + "acceptedNoBodyOverflow": true, + "acceptedStatusNotClipped": true, + "noUnrequestedPolling": false, + "manualRefreshObservesSealed": true, + "failedRefreshPreservesRowsAndTime": false, + "restoreDoesNotFabricateARead": true, + "explicitRetryClearsError": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "acceptedLayout": { + "width": 720, + "document": 720, + "dpr": 2 + }, + "finalLayout": { + "width": 720, + "document": 720, + "dpr": 2 + } + }, + "errors": [], + "passed": false + }, + { + "sample": "accept", + "width": 390, + "zoom": 2, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "acceptedNotCompleted": true, + "acceptedNoBodyOverflow": true, + "acceptedStatusNotClipped": false, + "noUnrequestedPolling": false, + "manualRefreshObservesSealed": true, + "failedRefreshPreservesRowsAndTime": false, + "restoreDoesNotFabricateARead": true, + "explicitRetryClearsError": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "acceptedLayout": { + "width": 195, + "document": 195, + "dpr": 2 + }, + "finalLayout": { + "width": 195, + "document": 195, + "dpr": 2 + } + }, + "errors": [], + "passed": false + }, + { + "sample": "nochanges", + "width": 1440, + "zoom": 1, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "noFalseRejection": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "finalLayout": { + "width": 1440, + "document": 1440, + "dpr": 1 + } + }, + "errors": [], + "passed": true + }, + { + "sample": "nochanges", + "width": 390, + "zoom": 1, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "noFalseRejection": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "finalLayout": { + "width": 390, + "document": 390, + "dpr": 1 + } + }, + "errors": [], + "passed": true + }, + { + "sample": "nochanges", + "width": 1440, + "zoom": 2, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "noFalseRejection": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "finalLayout": { + "width": 720, + "document": 720, + "dpr": 2 + } + }, + "errors": [], + "passed": true + }, + { + "sample": "nochanges", + "width": 390, + "zoom": 2, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "noFalseRejection": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "finalLayout": { + "width": 195, + "document": 195, + "dpr": 2 + } + }, + "errors": [], + "passed": true + }, + { + "sample": "rejected", + "width": 1440, + "zoom": 1, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "finalLayout": { + "width": 1440, + "document": 1440, + "dpr": 1 + } + }, + "errors": [], + "passed": true + }, + { + "sample": "rejected", + "width": 390, + "zoom": 1, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "finalLayout": { + "width": 390, + "document": 390, + "dpr": 1 + } + }, + "errors": [], + "passed": true + }, + { + "sample": "rejected", + "width": 1440, + "zoom": 2, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "finalLayout": { + "width": 720, + "document": 720, + "dpr": 2 + } + }, + "errors": [], + "passed": true + }, + { + "sample": "rejected", + "width": 390, + "zoom": 2, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "finalLayout": { + "width": 195, + "document": 195, + "dpr": 2 + } + }, + "errors": [], + "passed": true + }, + { + "sample": "unknown", + "width": 1440, + "zoom": 1, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "noInventedVerdict": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "finalLayout": { + "width": 1440, + "document": 1440, + "dpr": 1 + } + }, + "errors": [], + "passed": true + }, + { + "sample": "unknown", + "width": 390, + "zoom": 1, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "noInventedVerdict": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "finalLayout": { + "width": 390, + "document": 390, + "dpr": 1 + } + }, + "errors": [], + "passed": true + }, + { + "sample": "unknown", + "width": 1440, + "zoom": 2, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "noInventedVerdict": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "finalLayout": { + "width": 720, + "document": 720, + "dpr": 2 + } + }, + "errors": [], + "passed": true + }, + { + "sample": "unknown", + "width": 390, + "zoom": 2, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "noInventedVerdict": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "finalLayout": { + "width": 195, + "document": 195, + "dpr": 2 + } + }, + "errors": [], + "passed": true + }, + { + "sample": "blocked", + "width": 1440, + "zoom": 1, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "finalLayout": { + "width": 1440, + "document": 1440, + "dpr": 1 + } + }, + "errors": [], + "passed": true + }, + { + "sample": "blocked", + "width": 390, + "zoom": 1, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "finalLayout": { + "width": 390, + "document": 390, + "dpr": 1 + } + }, + "errors": [], + "passed": true + }, + { + "sample": "blocked", + "width": 1440, + "zoom": 2, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "finalLayout": { + "width": 720, + "document": 720, + "dpr": 2 + } + }, + "errors": [], + "passed": true + }, + { + "sample": "blocked", + "width": 390, + "zoom": 2, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "finalLayout": { + "width": 195, + "document": 195, + "dpr": 2 + } + }, + "errors": [], + "passed": true + }, + { + "sample": "initial-error", + "width": 1440, + "zoom": 1, + "checks": { + "unavailableNotEmpty": true, + "requestDisabledUntilHistoryRead": true, + "manualRecoveryToConfirmedEmpty": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "finalLayout": { + "width": 1440, + "document": 1440, + "dpr": 1 + } + }, + "errors": [], + "passed": true + }, + { + "sample": "initial-error", + "width": 390, + "zoom": 1, + "checks": { + "unavailableNotEmpty": true, + "requestDisabledUntilHistoryRead": true, + "manualRecoveryToConfirmedEmpty": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "finalLayout": { + "width": 390, + "document": 390, + "dpr": 1 + } + }, + "errors": [], + "passed": true + }, + { + "sample": "initial-error", + "width": 1440, + "zoom": 2, + "checks": { + "unavailableNotEmpty": true, + "requestDisabledUntilHistoryRead": true, + "manualRecoveryToConfirmedEmpty": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "finalLayout": { + "width": 720, + "document": 720, + "dpr": 2 + } + }, + "errors": [], + "passed": true + }, + { + "sample": "initial-error", + "width": 390, + "zoom": 2, + "checks": { + "unavailableNotEmpty": true, + "requestDisabledUntilHistoryRead": true, + "manualRecoveryToConfirmedEmpty": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "finalLayout": { + "width": 195, + "document": 195, + "dpr": 2 + } + }, + "errors": [], + "passed": true + } +] diff --git a/docs/ui-consistency/evidence/ot09-deployments/first-matrix.log b/docs/ui-consistency/evidence/ot09-deployments/first-matrix.log new file mode 100644 index 000000000..503a13baf --- /dev/null +++ b/docs/ui-consistency/evidence/ot09-deployments/first-matrix.log @@ -0,0 +1,147 @@ +{ + "origin": "http://127.0.0.1:50085", + "cases": 24, + "passed": 20, + "failed": [ + { + "sample": "accept", + "width": 1440, + "zoom": 1, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "acceptedNotCompleted": true, + "acceptedNoBodyOverflow": true, + "acceptedStatusNotClipped": true, + "noUnrequestedPolling": false, + "manualRefreshObservesSealed": true, + "failedRefreshPreservesRowsAndTime": false, + "restoreDoesNotFabricateARead": true, + "explicitRetryClearsError": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "acceptedLayout": { + "width": 1440, + "document": 1440, + "dpr": 1 + }, + "finalLayout": { + "width": 1440, + "document": 1440, + "dpr": 1 + } + }, + "errors": [], + "passed": false + }, + { + "sample": "accept", + "width": 390, + "zoom": 1, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "acceptedNotCompleted": true, + "acceptedNoBodyOverflow": true, + "acceptedStatusNotClipped": true, + "noUnrequestedPolling": false, + "manualRefreshObservesSealed": true, + "failedRefreshPreservesRowsAndTime": false, + "restoreDoesNotFabricateARead": true, + "explicitRetryClearsError": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "acceptedLayout": { + "width": 390, + "document": 390, + "dpr": 1 + }, + "finalLayout": { + "width": 390, + "document": 390, + "dpr": 1 + } + }, + "errors": [], + "passed": false + }, + { + "sample": "accept", + "width": 1440, + "zoom": 2, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "acceptedNotCompleted": true, + "acceptedNoBodyOverflow": true, + "acceptedStatusNotClipped": true, + "noUnrequestedPolling": false, + "manualRefreshObservesSealed": true, + "failedRefreshPreservesRowsAndTime": false, + "restoreDoesNotFabricateARead": true, + "explicitRetryClearsError": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "acceptedLayout": { + "width": 720, + "document": 720, + "dpr": 2 + }, + "finalLayout": { + "width": 720, + "document": 720, + "dpr": 2 + } + }, + "errors": [], + "passed": false + }, + { + "sample": "accept", + "width": 390, + "zoom": 2, + "checks": { + "actualOutcomeVisible": true, + "doubleClickDispatchesOnce": true, + "acceptedNotCompleted": true, + "acceptedNoBodyOverflow": true, + "acceptedStatusNotClipped": false, + "noUnrequestedPolling": false, + "manualRefreshObservesSealed": true, + "failedRefreshPreservesRowsAndTime": false, + "restoreDoesNotFabricateARead": true, + "explicitRetryClearsError": true, + "noBodyOverflow": true, + "noPageReload": true, + "statusNotClipped": true, + "perNodeLinkRetained": true + }, + "metrics": { + "acceptedLayout": { + "width": 195, + "document": 195, + "dpr": 2 + }, + "finalLayout": { + "width": 195, + "document": 195, + "dpr": 2 + } + }, + "errors": [], + "passed": false + } + ] +} diff --git a/docs/ui-consistency/evidence/ot09-deployments/fixture-build.log b/docs/ui-consistency/evidence/ot09-deployments/fixture-build.log new file mode 100644 index 000000000..ae6c2db08 --- /dev/null +++ b/docs/ui-consistency/evidence/ot09-deployments/fixture-build.log @@ -0,0 +1,44 @@ + ZB.MOM.WW.OtOpcUa.Analyzers -> /tmp/ot-ui-canary-artifacts/bin/ZB.MOM.WW.OtOpcUa.Analyzers/debug/ZB.MOM.WW.OtOpcUa.Analyzers.dll + ZB.MOM.WW.OtOpcUa.Driver.Modbus.Addressing -> /tmp/ot-ui-canary-artifacts/bin/ZB.MOM.WW.OtOpcUa.Driver.Modbus.Addressing/debug/ZB.MOM.WW.OtOpcUa.Driver.Modbus.Addressing.dll + ZB.MOM.WW.OtOpcUa.Core.Abstractions -> /tmp/ot-ui-canary-artifacts/bin/ZB.MOM.WW.OtOpcUa.Core.Abstractions/debug/ZB.MOM.WW.OtOpcUa.Core.Abstractions.dll + ZB.MOM.WW.OtOpcUa.Driver.Calculation.Contracts -> /tmp/ot-ui-canary-artifacts/bin/ZB.MOM.WW.OtOpcUa.Driver.Calculation.Contracts/debug/ZB.MOM.WW.OtOpcUa.Driver.Calculation.Contracts.dll + ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Contracts -> /tmp/ot-ui-canary-artifacts/bin/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Contracts/debug/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Contracts.dll + ZB.MOM.WW.OtOpcUa.Driver.AbCip.Contracts -> /tmp/ot-ui-canary-artifacts/bin/ZB.MOM.WW.OtOpcUa.Driver.AbCip.Contracts/debug/ZB.MOM.WW.OtOpcUa.Driver.AbCip.Contracts.dll + ZB.MOM.WW.OtOpcUa.Driver.S7.Contracts -> /tmp/ot-ui-canary-artifacts/bin/ZB.MOM.WW.OtOpcUa.Driver.S7.Contracts/debug/ZB.MOM.WW.OtOpcUa.Driver.S7.Contracts.dll + ZB.MOM.WW.OtOpcUa.Driver.AbLegacy.Contracts -> /tmp/ot-ui-canary-artifacts/bin/ZB.MOM.WW.OtOpcUa.Driver.AbLegacy.Contracts/debug/ZB.MOM.WW.OtOpcUa.Driver.AbLegacy.Contracts.dll + ZB.MOM.WW.OtOpcUa.Driver.Sql.Contracts -> /tmp/ot-ui-canary-artifacts/bin/ZB.MOM.WW.OtOpcUa.Driver.Sql.Contracts/debug/ZB.MOM.WW.OtOpcUa.Driver.Sql.Contracts.dll + ZB.MOM.WW.OtOpcUa.Driver.FOCAS.Contracts -> /tmp/ot-ui-canary-artifacts/bin/ZB.MOM.WW.OtOpcUa.Driver.FOCAS.Contracts/debug/ZB.MOM.WW.OtOpcUa.Driver.FOCAS.Contracts.dll + ZB.MOM.WW.OtOpcUa.Driver.TwinCAT.Contracts -> /tmp/ot-ui-canary-artifacts/bin/ZB.MOM.WW.OtOpcUa.Driver.TwinCAT.Contracts/debug/ZB.MOM.WW.OtOpcUa.Driver.TwinCAT.Contracts.dll + ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Contracts -> /tmp/ot-ui-canary-artifacts/bin/ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Contracts/debug/ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Contracts.dll + ZB.MOM.WW.OtOpcUa.Driver.Heidenhain.Contracts -> /tmp/ot-ui-canary-artifacts/bin/ZB.MOM.WW.OtOpcUa.Driver.Heidenhain.Contracts/debug/ZB.MOM.WW.OtOpcUa.Driver.Heidenhain.Contracts.dll + ZB.MOM.WW.OtOpcUa.Commons -> /tmp/ot-ui-canary-artifacts/bin/ZB.MOM.WW.OtOpcUa.Commons/debug/ZB.MOM.WW.OtOpcUa.Commons.dll + ZB.MOM.WW.OtOpcUa.Driver.MTConnect.Contracts -> /tmp/ot-ui-canary-artifacts/bin/ZB.MOM.WW.OtOpcUa.Driver.MTConnect.Contracts/debug/ZB.MOM.WW.OtOpcUa.Driver.MTConnect.Contracts.dll + ZB.MOM.WW.OtOpcUa.Core.AlarmHistorian -> /tmp/ot-ui-canary-artifacts/bin/ZB.MOM.WW.OtOpcUa.Core.AlarmHistorian/debug/ZB.MOM.WW.OtOpcUa.Core.AlarmHistorian.dll + ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Session -> /tmp/ot-ui-canary-artifacts/bin/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Session/debug/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Session.dll + ZB.MOM.WW.OtOpcUa.Driver.Modbus.Contracts -> /tmp/ot-ui-canary-artifacts/bin/ZB.MOM.WW.OtOpcUa.Driver.Modbus.Contracts/debug/ZB.MOM.WW.OtOpcUa.Driver.Modbus.Contracts.dll + ZB.MOM.WW.OtOpcUa.Core.Scripting.Abstractions -> /tmp/ot-ui-canary-artifacts/bin/ZB.MOM.WW.OtOpcUa.Core.Scripting.Abstractions/debug/ZB.MOM.WW.OtOpcUa.Core.Scripting.Abstractions.dll + ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Contracts -> /tmp/ot-ui-canary-artifacts/bin/ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Contracts/debug/ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Contracts.dll + ZB.MOM.WW.OtOpcUa.Cluster -> /tmp/ot-ui-canary-artifacts/bin/ZB.MOM.WW.OtOpcUa.Cluster/debug/ZB.MOM.WW.OtOpcUa.Cluster.dll + ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Browser -> /tmp/ot-ui-canary-artifacts/bin/ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Browser/debug/ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Browser.dll + ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Browser -> /tmp/ot-ui-canary-artifacts/bin/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Browser/debug/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Browser.dll + ZB.MOM.WW.OtOpcUa.Driver.Sql.Dialect -> /tmp/ot-ui-canary-artifacts/bin/ZB.MOM.WW.OtOpcUa.Driver.Sql.Dialect/debug/ZB.MOM.WW.OtOpcUa.Driver.Sql.Dialect.dll + ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Transport -> /tmp/ot-ui-canary-artifacts/bin/ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Transport/debug/ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Transport.dll + ZB.MOM.WW.OtOpcUa.Core.Scripting -> /tmp/ot-ui-canary-artifacts/bin/ZB.MOM.WW.OtOpcUa.Core.Scripting/debug/ZB.MOM.WW.OtOpcUa.Core.Scripting.dll + ZB.MOM.WW.OtOpcUa.Core.VirtualTags -> /tmp/ot-ui-canary-artifacts/bin/ZB.MOM.WW.OtOpcUa.Core.VirtualTags/debug/ZB.MOM.WW.OtOpcUa.Core.VirtualTags.dll + ZB.MOM.WW.OtOpcUa.Core.ScriptedAlarms -> /tmp/ot-ui-canary-artifacts/bin/ZB.MOM.WW.OtOpcUa.Core.ScriptedAlarms/debug/ZB.MOM.WW.OtOpcUa.Core.ScriptedAlarms.dll + ZB.MOM.WW.OtOpcUa.Driver.Sql.Browser -> /tmp/ot-ui-canary-artifacts/bin/ZB.MOM.WW.OtOpcUa.Driver.Sql.Browser/debug/ZB.MOM.WW.OtOpcUa.Driver.Sql.Browser.dll + ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Browser -> /tmp/ot-ui-canary-artifacts/bin/ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Browser/debug/ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Browser.dll + ZB.MOM.WW.OtOpcUa.Configuration -> /tmp/ot-ui-canary-artifacts/bin/ZB.MOM.WW.OtOpcUa.Configuration/debug/ZB.MOM.WW.OtOpcUa.Configuration.dll + ZB.MOM.WW.OtOpcUa.Core -> /tmp/ot-ui-canary-artifacts/bin/ZB.MOM.WW.OtOpcUa.Core/debug/ZB.MOM.WW.OtOpcUa.Core.dll + ZB.MOM.WW.OtOpcUa.Security -> /tmp/ot-ui-canary-artifacts/bin/ZB.MOM.WW.OtOpcUa.Security/debug/ZB.MOM.WW.OtOpcUa.Security.dll + ZB.MOM.WW.OtOpcUa.ControlPlane -> /tmp/ot-ui-canary-artifacts/bin/ZB.MOM.WW.OtOpcUa.ControlPlane/debug/ZB.MOM.WW.OtOpcUa.ControlPlane.dll + ZB.MOM.WW.OtOpcUa.OpcUaServer -> /tmp/ot-ui-canary-artifacts/bin/ZB.MOM.WW.OtOpcUa.OpcUaServer/debug/ZB.MOM.WW.OtOpcUa.OpcUaServer.dll + ZB.MOM.WW.OtOpcUa.Runtime -> /tmp/ot-ui-canary-artifacts/bin/ZB.MOM.WW.OtOpcUa.Runtime/debug/ZB.MOM.WW.OtOpcUa.Runtime.dll + ZB.MOM.WW.OtOpcUa.AdminUI -> /tmp/ot-ui-canary-artifacts/bin/ZB.MOM.WW.OtOpcUa.AdminUI/debug/ZB.MOM.WW.OtOpcUa.AdminUI.dll + OtUiCanary -> /tmp/ot-ui-canary-artifacts/bin/OtUiCanary/debug/OtUiCanary.dll + +Build succeeded. + 0 Warning(s) + 0 Error(s) + +Time Elapsed 00:00:08.77 diff --git a/docs/ui-consistency/evidence/ot09-deployments/initial-error-1440-zoom1.png b/docs/ui-consistency/evidence/ot09-deployments/initial-error-1440-zoom1.png new file mode 100644 index 000000000..2f54bef24 Binary files /dev/null and b/docs/ui-consistency/evidence/ot09-deployments/initial-error-1440-zoom1.png differ diff --git a/docs/ui-consistency/evidence/ot09-deployments/initial-error-1440-zoom2.png b/docs/ui-consistency/evidence/ot09-deployments/initial-error-1440-zoom2.png new file mode 100644 index 000000000..60fc01667 Binary files /dev/null and b/docs/ui-consistency/evidence/ot09-deployments/initial-error-1440-zoom2.png differ diff --git a/docs/ui-consistency/evidence/ot09-deployments/initial-error-390-zoom1.png b/docs/ui-consistency/evidence/ot09-deployments/initial-error-390-zoom1.png new file mode 100644 index 000000000..9de26f045 Binary files /dev/null and b/docs/ui-consistency/evidence/ot09-deployments/initial-error-390-zoom1.png differ diff --git a/docs/ui-consistency/evidence/ot09-deployments/initial-error-390-zoom2.png b/docs/ui-consistency/evidence/ot09-deployments/initial-error-390-zoom2.png new file mode 100644 index 000000000..9ed2743c0 Binary files /dev/null and b/docs/ui-consistency/evidence/ot09-deployments/initial-error-390-zoom2.png differ diff --git a/docs/ui-consistency/evidence/ot09-deployments/nochanges-1440-zoom1.png b/docs/ui-consistency/evidence/ot09-deployments/nochanges-1440-zoom1.png new file mode 100644 index 000000000..49140dca6 Binary files /dev/null and b/docs/ui-consistency/evidence/ot09-deployments/nochanges-1440-zoom1.png differ diff --git a/docs/ui-consistency/evidence/ot09-deployments/nochanges-1440-zoom2.png b/docs/ui-consistency/evidence/ot09-deployments/nochanges-1440-zoom2.png new file mode 100644 index 000000000..11f8c17b3 Binary files /dev/null and b/docs/ui-consistency/evidence/ot09-deployments/nochanges-1440-zoom2.png differ diff --git a/docs/ui-consistency/evidence/ot09-deployments/nochanges-390-zoom1.png b/docs/ui-consistency/evidence/ot09-deployments/nochanges-390-zoom1.png new file mode 100644 index 000000000..7bc87a28f Binary files /dev/null and b/docs/ui-consistency/evidence/ot09-deployments/nochanges-390-zoom1.png differ diff --git a/docs/ui-consistency/evidence/ot09-deployments/nochanges-390-zoom2.png b/docs/ui-consistency/evidence/ot09-deployments/nochanges-390-zoom2.png new file mode 100644 index 000000000..972ee6768 Binary files /dev/null and b/docs/ui-consistency/evidence/ot09-deployments/nochanges-390-zoom2.png differ diff --git a/docs/ui-consistency/evidence/ot09-deployments/rejected-1440-zoom1.png b/docs/ui-consistency/evidence/ot09-deployments/rejected-1440-zoom1.png new file mode 100644 index 000000000..8a3dadbf5 Binary files /dev/null and b/docs/ui-consistency/evidence/ot09-deployments/rejected-1440-zoom1.png differ diff --git a/docs/ui-consistency/evidence/ot09-deployments/rejected-1440-zoom2.png b/docs/ui-consistency/evidence/ot09-deployments/rejected-1440-zoom2.png new file mode 100644 index 000000000..414a28a1f Binary files /dev/null and b/docs/ui-consistency/evidence/ot09-deployments/rejected-1440-zoom2.png differ diff --git a/docs/ui-consistency/evidence/ot09-deployments/rejected-390-zoom1.png b/docs/ui-consistency/evidence/ot09-deployments/rejected-390-zoom1.png new file mode 100644 index 000000000..33db0d024 Binary files /dev/null and b/docs/ui-consistency/evidence/ot09-deployments/rejected-390-zoom1.png differ diff --git a/docs/ui-consistency/evidence/ot09-deployments/rejected-390-zoom2.png b/docs/ui-consistency/evidence/ot09-deployments/rejected-390-zoom2.png new file mode 100644 index 000000000..0c28878d7 Binary files /dev/null and b/docs/ui-consistency/evidence/ot09-deployments/rejected-390-zoom2.png differ diff --git a/docs/ui-consistency/evidence/ot09-deployments/second-fixture-selector-syntax.log b/docs/ui-consistency/evidence/ot09-deployments/second-fixture-selector-syntax.log new file mode 100644 index 000000000..ecce73432 --- /dev/null +++ b/docs/ui-consistency/evidence/ot09-deployments/second-fixture-selector-syntax.log @@ -0,0 +1,37 @@ +Traceback (most recent call last): + File "/Users/dohertj2/Desktop/OtOpcUa/infra/tools/ui-consistency/check_deployment_feedback.py", line 38, in + page.wait_for_function('(text)=>document.querySelector("section[aria-label=\"Deployment feedback\"] [role=status]").textContent.includes(text)',arg=expected) + ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/opt/homebrew/lib/python3.14/site-packages/playwright/sync_api/_generated.py", line 11599, in wait_for_function + self._sync( + ~~~~~~~~~~^ + self._impl_obj.wait_for_function( + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ...<4 lines>... + ) + ^ + ) + ^ + File "/opt/homebrew/lib/python3.14/site-packages/playwright/_impl/_sync_base.py", line 115, in _sync + return task.result() + ~~~~~~~~~~~^^ + File "/opt/homebrew/lib/python3.14/site-packages/playwright/_impl/_page.py", line 1110, in wait_for_function + return await self._main_frame.wait_for_function(**locals_to_params(locals())) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/opt/homebrew/lib/python3.14/site-packages/playwright/_impl/_frame.py", line 878, in wait_for_function + await self._channel.send("waitForFunction", self._timeout, params) + File "/opt/homebrew/lib/python3.14/site-packages/playwright/_impl/_connection.py", line 69, in send + return await self._connection.wrap_api_call( + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ...<3 lines>... + ) + ^ + File "/opt/homebrew/lib/python3.14/site-packages/playwright/_impl/_connection.py", line 559, in wrap_api_call + raise rewrite_error(error, f"{parsed_st['apiName']}: {error}") from None +playwright._impl._errors.Error: Page.wait_for_function: SyntaxError: missing ) after argument list + at eval () + at predicate (eval at evaluate (:290:30), :4:56) + at next (eval at evaluate (:290:30), :29:29) + at eval (eval at evaluate (:290:30), :42:9) + at UtilityScript.evaluate (:292:16) + at UtilityScript. (:1:44) diff --git a/docs/ui-consistency/evidence/ot09-deployments/source-freeze.json b/docs/ui-consistency/evidence/ot09-deployments/source-freeze.json new file mode 100644 index 000000000..27bfdf188 --- /dev/null +++ b/docs/ui-consistency/evidence/ot09-deployments/source-freeze.json @@ -0,0 +1,7 @@ +{ + "src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Pages/Deployments.razor": "fab26869a9a4a245fc7e8105fa875b6555e9703d121e09b666a3c9a79011619b", + "src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Shared/DeploymentFeedback.razor": "d98d8fa6bddaf8ab83b02f1010592dcd06fa6da16e9fc8dd4dc1517504ff514d", + "tests/Server/ZB.MOM.WW.OtOpcUa.AdminUI.Tests/Pages/DeploymentFeedbackTests.cs": "473485f5da230c0c137f6b54bc4598acf4d4e770c0d729b7cdc2f58e6deec25b", + "tests/Server/ZB.MOM.WW.OtOpcUa.AdminUI.Tests/Pages/DeploymentRefreshTests.cs": "f867eddb6fd7fa13f5f7fb5c974ecb5da1219f7d732f1e5f6b54d64af278f21e", + "tests/Server/ZB.MOM.WW.OtOpcUa.AdminUI.Tests/Pages/DeploymentPageSqlServerTests.cs": "c97ae54a7b8d590da099a2bc1899920e5168b8d465406e5b632c2c47f2639059" +} diff --git a/docs/ui-consistency/evidence/ot09-deployments/tests.log b/docs/ui-consistency/evidence/ot09-deployments/tests.log new file mode 100644 index 000000000..d3e816802 --- /dev/null +++ b/docs/ui-consistency/evidence/ot09-deployments/tests.log @@ -0,0 +1,53 @@ + + ZB.MOM.WW.OtOpcUa.Analyzers -> /Users/dohertj2/Desktop/OtOpcUa/src/Tooling/ZB.MOM.WW.OtOpcUa.Analyzers/bin/Release/netstandard2.0/ZB.MOM.WW.OtOpcUa.Analyzers.dll + ZB.MOM.WW.OtOpcUa.Core.Abstractions -> /Users/dohertj2/Desktop/OtOpcUa/src/Core/ZB.MOM.WW.OtOpcUa.Core.Abstractions/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Core.Abstractions.dll + ZB.MOM.WW.OtOpcUa.Driver.Modbus.Addressing -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Modbus.Addressing/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Modbus.Addressing.dll + ZB.MOM.WW.OtOpcUa.Driver.Ab.Transport -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Ab.Transport/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Ab.Transport.dll + ZB.MOM.WW.OtOpcUa.Core.AlarmHistorian -> /Users/dohertj2/Desktop/OtOpcUa/src/Core/ZB.MOM.WW.OtOpcUa.Core.AlarmHistorian/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Core.AlarmHistorian.dll + ZB.MOM.WW.OtOpcUa.Driver.Calculation.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Calculation.Contracts/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Calculation.Contracts.dll + ZB.MOM.WW.OtOpcUa.Driver.FOCAS.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.FOCAS.Contracts/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.FOCAS.Contracts.dll + ZB.MOM.WW.OtOpcUa.Driver.S7.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.S7.Contracts/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.S7.Contracts.dll + ZB.MOM.WW.OtOpcUa.Driver.TwinCAT.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.TwinCAT.Contracts/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.TwinCAT.Contracts.dll + ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Contracts/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Contracts.dll + ZB.MOM.WW.OtOpcUa.Driver.AbLegacy.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.AbLegacy.Contracts/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.AbLegacy.Contracts.dll + ZB.MOM.WW.OtOpcUa.Driver.MTConnect.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.MTConnect.Contracts/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.MTConnect.Contracts.dll + ZB.MOM.WW.OtOpcUa.Driver.AbCip.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.AbCip.Contracts/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.AbCip.Contracts.dll + ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Contracts/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Contracts.dll + ZB.MOM.WW.OtOpcUa.Core.Scripting.Abstractions -> /Users/dohertj2/Desktop/OtOpcUa/src/Core/ZB.MOM.WW.OtOpcUa.Core.Scripting.Abstractions/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Core.Scripting.Abstractions.dll + ZB.MOM.WW.OtOpcUa.Driver.Sql.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Sql.Contracts/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Sql.Contracts.dll + ZB.MOM.WW.OtOpcUa.Driver.Modbus.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Modbus.Contracts/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Modbus.Contracts.dll + ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Contracts/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Contracts.dll + ZB.MOM.WW.OtOpcUa.Driver.Heidenhain.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Heidenhain.Contracts/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Heidenhain.Contracts.dll + ZB.MOM.WW.OtOpcUa.Commons -> /Users/dohertj2/Desktop/OtOpcUa/src/Core/ZB.MOM.WW.OtOpcUa.Commons/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Commons.dll + ZB.MOM.WW.OtOpcUa.Driver.Sql.Dialect -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Sql.Dialect/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Sql.Dialect.dll + ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Transport -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Transport/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Transport.dll + ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Browser -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Browser/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Browser.dll + ZB.MOM.WW.OtOpcUa.Driver.Sql.Browser -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Sql.Browser/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Sql.Browser.dll + ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Browser -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Browser/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Browser.dll + ZB.MOM.WW.OtOpcUa.Cluster -> /Users/dohertj2/Desktop/OtOpcUa/src/Core/ZB.MOM.WW.OtOpcUa.Cluster/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Cluster.dll + ZB.MOM.WW.OtOpcUa.Core.Scripting -> /Users/dohertj2/Desktop/OtOpcUa/src/Core/ZB.MOM.WW.OtOpcUa.Core.Scripting/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Core.Scripting.dll + ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Session -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Session/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Session.dll + ZB.MOM.WW.OtOpcUa.Core.ScriptedAlarms -> /Users/dohertj2/Desktop/OtOpcUa/src/Core/ZB.MOM.WW.OtOpcUa.Core.ScriptedAlarms/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Core.ScriptedAlarms.dll + ZB.MOM.WW.OtOpcUa.Core.VirtualTags -> /Users/dohertj2/Desktop/OtOpcUa/src/Core/ZB.MOM.WW.OtOpcUa.Core.VirtualTags/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Core.VirtualTags.dll + ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Browser -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Browser/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Browser.dll + ZB.MOM.WW.OtOpcUa.Configuration -> /Users/dohertj2/Desktop/OtOpcUa/src/Core/ZB.MOM.WW.OtOpcUa.Configuration/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Configuration.dll + ZB.MOM.WW.OtOpcUa.Core -> /Users/dohertj2/Desktop/OtOpcUa/src/Core/ZB.MOM.WW.OtOpcUa.Core/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Core.dll + ZB.MOM.WW.OtOpcUa.Security -> /Users/dohertj2/Desktop/OtOpcUa/src/Server/ZB.MOM.WW.OtOpcUa.Security/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Security.dll + ZB.MOM.WW.OtOpcUa.ControlPlane -> /Users/dohertj2/Desktop/OtOpcUa/src/Server/ZB.MOM.WW.OtOpcUa.ControlPlane/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.ControlPlane.dll + ZB.MOM.WW.OtOpcUa.OpcUaServer -> /Users/dohertj2/Desktop/OtOpcUa/src/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.OpcUaServer.dll + ZB.MOM.WW.OtOpcUa.Driver.MTConnect -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.MTConnect/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.MTConnect.dll + ZB.MOM.WW.OtOpcUa.Driver.AbLegacy -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.AbLegacy/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.AbLegacy.dll + ZB.MOM.WW.OtOpcUa.Driver.Galaxy -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Galaxy/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Galaxy.dll + ZB.MOM.WW.OtOpcUa.Driver.FOCAS -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.FOCAS/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.FOCAS.dll + ZB.MOM.WW.OtOpcUa.Driver.Heidenhain -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Heidenhain/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Heidenhain.dll + ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.dll + ZB.MOM.WW.OtOpcUa.Driver.AbCip -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.AbCip/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.AbCip.dll + ZB.MOM.WW.OtOpcUa.Driver.Sql -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Sql/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Sql.dll + ZB.MOM.WW.OtOpcUa.Runtime -> /Users/dohertj2/Desktop/OtOpcUa/src/Server/ZB.MOM.WW.OtOpcUa.Runtime/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Runtime.dll + ZB.MOM.WW.OtOpcUa.AdminUI -> /Users/dohertj2/Desktop/OtOpcUa/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.AdminUI.dll + ZB.MOM.WW.OtOpcUa.AdminUI.Tests -> /Users/dohertj2/Desktop/OtOpcUa/tests/Server/ZB.MOM.WW.OtOpcUa.AdminUI.Tests/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.AdminUI.Tests.dll +Test run for /Users/dohertj2/Desktop/OtOpcUa/tests/Server/ZB.MOM.WW.OtOpcUa.AdminUI.Tests/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.AdminUI.Tests.dll (.NETCoreApp,Version=v10.0) +A total of 1 test files matched the specified pattern. +Results File: /tmp/ot09-final-deployment-results/ot09-final-deployment.trx + +Passed! - Failed: 0, Passed: 37, Skipped: 0, Total: 37, Duration: 1 s - ZB.MOM.WW.OtOpcUa.AdminUI.Tests.dll (net10.0) diff --git a/docs/ui-consistency/evidence/ot09-deployments/tests.trx b/docs/ui-consistency/evidence/ot09-deployments/tests.trx new file mode 100644 index 000000000..638306631 --- /dev/null +++ b/docs/ui-consistency/evidence/ot09-deployments/tests.trx @@ -0,0 +1,250 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v3.0.2+dd36e86129 (64-bit .NET 10.0.14) +[xUnit.net 00:00:00.34] Discovering: ZB.MOM.WW.OtOpcUa.AdminUI.Tests +[xUnit.net 00:00:01.05] Discovered: ZB.MOM.WW.OtOpcUa.AdminUI.Tests +[xUnit.net 00:00:01.17] Starting: ZB.MOM.WW.OtOpcUa.AdminUI.Tests +[xUnit.net 00:00:06.28] Finished: ZB.MOM.WW.OtOpcUa.AdminUI.Tests + + + + \ No newline at end of file diff --git a/docs/ui-consistency/evidence/ot09-deployments/unknown-1440-zoom1.png b/docs/ui-consistency/evidence/ot09-deployments/unknown-1440-zoom1.png new file mode 100644 index 000000000..fa927ed61 Binary files /dev/null and b/docs/ui-consistency/evidence/ot09-deployments/unknown-1440-zoom1.png differ diff --git a/docs/ui-consistency/evidence/ot09-deployments/unknown-1440-zoom2.png b/docs/ui-consistency/evidence/ot09-deployments/unknown-1440-zoom2.png new file mode 100644 index 000000000..9c6e71556 Binary files /dev/null and b/docs/ui-consistency/evidence/ot09-deployments/unknown-1440-zoom2.png differ diff --git a/docs/ui-consistency/evidence/ot09-deployments/unknown-390-zoom1.png b/docs/ui-consistency/evidence/ot09-deployments/unknown-390-zoom1.png new file mode 100644 index 000000000..d202a43f4 Binary files /dev/null and b/docs/ui-consistency/evidence/ot09-deployments/unknown-390-zoom1.png differ diff --git a/docs/ui-consistency/evidence/ot09-deployments/unknown-390-zoom2.png b/docs/ui-consistency/evidence/ot09-deployments/unknown-390-zoom2.png new file mode 100644 index 000000000..47a3298ef Binary files /dev/null and b/docs/ui-consistency/evidence/ot09-deployments/unknown-390-zoom2.png differ diff --git a/infra/tools/ui-consistency/check_deployment_feedback.py b/infra/tools/ui-consistency/check_deployment_feedback.py new file mode 100644 index 000000000..f78b26c8a --- /dev/null +++ b/infra/tools/ui-consistency/check_deployment_feedback.py @@ -0,0 +1,62 @@ +"""Actual deployment-page feedback over a serial, fabricated memory-only fixture.""" +import json,re,sys,uuid +from pathlib import Path +from playwright.sync_api import sync_playwright +sys.path.insert(0,'/Users/dohertj2/.codex/worktrees/scada-ui-consistency/scadaproj/components/ui-theme/validation/theme-1.0.0/canary') +from browser_zoom import zoom_browser,set_browser_zoom +origin=re.search(r'Now listening on: (http://127.0.0.1:\d+)',Path('/tmp/ot-pilot-host.log').read_text()).group(1) +out=Path('docs/ui-consistency/evidence/ot09-deployments');out.mkdir(exist_ok=True) +results=[] +with sync_playwright() as p: + with zoom_browser(p) as (context,worker): + for sample in ['accept','nochanges','rejected','unknown','blocked','initial-error']: + for width,zoom in [(1440,1),(390,1),(1440,2),(390,2)]: + page=context.new_page();page.set_viewport_size({'width':width,'height':1000});errors=[];navigations=[] + page.on('pageerror',lambda e:errors.append(str(e)));page.on('framenavigated',lambda f:navigations.append(f.url) if f==page.main_frame else None) + page.goto(origin+'/deployment-pilot?sample='+sample+'&run='+uuid.uuid4().hex,wait_until='networkidle');set_browser_zoom(worker,page,zoom) + status=page.locator('section[aria-label="Deployment feedback"] [role=status]');status.wait_for() + for attempt in range(3): + page.locator('#fixture-observe').click() + try: page.locator('#fixture-interactive-state').filter(has_text='ready').wait_for(timeout=1500);break + except Exception: + if attempt==2:raise + checks={};metrics={} + def layout():return page.evaluate('({width:innerWidth,document:document.documentElement.scrollWidth,dpr:devicePixelRatio})') + if sample!='initial-error': + previous=page.locator('[data-testid=deployment-last-fetched]').get_attribute('datetime') + page.locator('[data-testid=deployment-refresh]').click() + page.wait_for_function('(before)=>document.querySelector("[data-testid=deployment-last-fetched]").getAttribute("datetime")!==before',arg=previous) + if sample=='initial-error': + checks['unavailableNotEmpty']='history is unavailable' in status.inner_text() and 'No deployment history' not in status.inner_text() + checks['requestDisabledUntilHistoryRead']=page.locator('[data-testid=deployment-request]').is_disabled() + page.locator('#fixture-restore-read').click();page.locator('[data-testid=deployment-refresh]').click();status.filter(has_text='No deployment history').wait_for() + checks['manualRecoveryToConfirmedEmpty']=not page.locator('[data-testid=deployment-request]').is_disabled() + else: + page.wait_for_function('!document.querySelector("[data-testid=deployment-request]").disabled') + page.locator('[data-testid=deployment-request]').dblclick() + expected={'accept':'Request accepted','nochanges':'No configuration changes','rejected':'Request rejected','unknown':'could not be confirmed','blocked':'This request was not started'}[sample] + status.filter(has_text=expected).wait_for() + checks['actualOutcomeVisible']=expected in status.inner_text() + page.locator('#fixture-observe').click();page.wait_for_function('document.querySelector("#fixture-request-count").textContent.trim()==="1"') + checks['doubleClickDispatchesOnce']=page.locator('#fixture-request-count').inner_text().strip()=='1' + if sample=='accept': + checks['acceptedNotCompleted']='in progress' in status.inner_text() and 'completed' not in status.inner_text() + metrics['acceptedLayout']=layout();checks['acceptedNoBodyOverflow']=metrics['acceptedLayout']['width']==metrics['acceptedLayout']['document'] + checks['acceptedStatusNotClipped']=status.locator('.chip').evaluate_all('els=>els.every(e=>{const r=e.getBoundingClientRect(),p=e.closest("section").getBoundingClientRect();return r.left>=p.left&&r.right<=p.right;})') + status.scroll_into_view_if_needed();page.screenshot(path=str(out/f'accepted-{width}-zoom{zoom}.png'),full_page=False) + page.locator('#fixture-seal').click();checks['noUnrequestedPolling']='awaiting apply acknowledgements' in status.inner_text().lower() + page.locator('[data-testid=deployment-refresh]').click();status.filter(has_text='Sealed').wait_for() + checks['manualRefreshObservesSealed']=True + fetched=page.locator('[data-testid=deployment-last-fetched]').get_attribute('datetime') + page.locator('#fixture-fail-read').click();page.locator('[data-testid=deployment-refresh]').click();page.get_by_role('alert').filter(has_text='History refresh failed').wait_for() + checks['failedRefreshPreservesRowsAndTime']=page.locator('tbody tr').count()==1 and 'sealed' in status.inner_text().lower() and page.locator('[data-testid=deployment-last-fetched]').get_attribute('datetime')==fetched + page.locator('#fixture-restore-read').click();checks['restoreDoesNotFabricateARead']=page.get_by_role('alert').filter(has_text='History refresh failed').count()==1 + page.locator('[data-testid=deployment-refresh]').click();page.get_by_role('alert').filter(has_text='History refresh failed').wait_for(state='detached');checks['explicitRetryClearsError']=True + elif sample=='nochanges':checks['noFalseRejection']='Request rejected' not in status.inner_text() + elif sample=='unknown':checks['noInventedVerdict']='Request accepted' not in status.inner_text() and 'Request rejected' not in status.inner_text() + metrics['finalLayout']=layout();checks['noBodyOverflow']=metrics['finalLayout']['width']==metrics['finalLayout']['document'];checks['noPageReload']=len(navigations)==1;checks['statusNotClipped']=status.locator('.chip').evaluate_all('els=>els.every(e=>{const r=e.getBoundingClientRect(),p=e.closest("section").getBoundingClientRect();return r.left>=p.left&&r.right<=p.right;})') + checks['perNodeLinkRetained']=page.get_by_role('link',name='View per-node application status').get_attribute('href')=='/fleet' + record={'sample':sample,'width':width,'zoom':zoom,'checks':checks,'metrics':metrics,'errors':errors};record['passed']=all(checks.values()) and not errors + results.append(record);status.scroll_into_view_if_needed();page.screenshot(path=str(out/f'{sample}-{width}-zoom{zoom}.png'),full_page=False);page.close();(out/'confirmation-matrix.json').write_text(json.dumps(results,indent=2)+'\n') +print(json.dumps({'origin':origin,'cases':len(results),'passed':sum(r['passed'] for r in results),'failed':[r for r in results if not r['passed']]},indent=2)) +raise SystemExit(0 if all(r['passed'] for r in results) else 1) diff --git a/infra/tools/ui-consistency/with_private_sql.py b/infra/tools/ui-consistency/with_private_sql.py new file mode 100644 index 000000000..8747096e5 --- /dev/null +++ b/infra/tools/ui-consistency/with_private_sql.py @@ -0,0 +1,23 @@ +"""Run OT dotnet tests against the explicitly owned loopback SQL fixture only. + +The state file is private and never copied into source/evidence. Password values +are placed in the child environment, never printed or included in process args. +""" +import argparse,json,os,re,subprocess +from pathlib import Path +parser=argparse.ArgumentParser() +parser.add_argument('--state',required=True,type=Path) +parser.add_argument('command',nargs=argparse.REMAINDER) +args=parser.parse_args() +command=args.command[1:] if args.command[:1]==['--'] else args.command +if command[:2]!=['dotnet','test']:parser.error('This fixture runner permits dotnet test only') +state=json.loads(args.state.read_text()) +match=re.fullmatch(r'127\.0\.0\.1,(\d+)',state['server']) +if not match or not state['name'].startswith('codex-ot-ui-sql-'):parser.error('An owned loopback SQL fixture is required') +label=subprocess.check_output(['docker','inspect',state['name'],'--format','{{index .Config.Labels "codex.task"}}'],text=True).strip() +binding=subprocess.check_output(['docker','port',state['name'],'1433/tcp'],text=True).strip() +if label!='scada-ui-consistency-ot14' or binding!='127.0.0.1:'+match[1]:parser.error('Fixture ownership/binding validation failed') +environment=os.environ.copy() +environment['OTOPCUA_CONFIG_TEST_SERVER']=state['server'] +environment['OTOPCUA_CONFIG_TEST_SA_PASSWORD']=state['password'] +raise SystemExit(subprocess.call(command,env=environment)) diff --git a/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Pages/Deployments.razor b/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Pages/Deployments.razor index a0ca9953d..fc8099bda 100644 --- a/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Pages/Deployments.razor +++ b/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Pages/Deployments.razor @@ -16,6 +16,7 @@ @inject ZB.MOM.WW.OtOpcUa.AdminUI.Deployments.DeploymentDriftProbe DriftProbe @inject ILogger Logger @rendermode InteractiveServer +@implements IDisposable Deployments · OtOpcUa @@ -23,8 +24,13 @@

Deployments

- + @* lmxopcua#903: the chip says nothing about sync until a composition taken after this page opened has @@ -41,18 +47,35 @@ In sync break; case DriftState.Failed: - Drift check failed + Drift check failed + Refresh status to retry. See the host log for details. break; }
-@if (_lastMessage is not null) +
+ Last fetched: + @if (_loading && _hasLoaded) { Reading deployment history… } + View per-node application status +
+@if (_requestedDeploymentId is { } requested) { -
- @_lastMessage -
+

Requested deployment: @requested

+ @if (_requestedRevisionHash is not null) {

Requested revision: @_requestedRevisionHash

} } - + +@if (_loadError is not null) +{ +
+ + +
+} +@if (_deployments.Count > 0) +{
@@ -84,6 +107,7 @@
+}
@code { @@ -100,43 +124,49 @@ string? FailureReason); private IReadOnlyList _deployments = Array.Empty(); - private bool _busy; - private bool _lastSuccess; - private string? _lastMessage; + private bool _busy, _refreshing, _requestPending, _requestResultUnavailable; + private bool _loading = true, _hasLoaded, _disposed; + private bool _initialDriftPending = true; + private StartDeploymentOutcome? _requestOutcome; + private Guid? _requestedDeploymentId; + private string? _requestMessage, _loadError, _requestedRevisionHash; + private DateTime? _lastFetchedUtc; + private readonly CancellationTokenSource _reads = new(); private enum DriftState { None, Checking, Drift, InSync, Failed } - private DriftState _driftState; - protected override async Task OnInitializedAsync() - { - await ReloadAsync(); - } + // A newly accepted request never borrows another historical deployment's terminal status. + private DeploymentRow? FeedbackRow => _requestOutcome == StartDeploymentOutcome.Accepted + ? _deployments.FirstOrDefault(d => d.DeploymentId == _requestedDeploymentId) + : _deployments.FirstOrDefault(); + + protected override async Task OnInitializedAsync() => await ReloadAsync(); protected override async Task OnAfterRenderAsync(bool firstRender) { - // Interactive render only (OnAfterRender never runs during prerender), so a page visit pays for one - // composition, after the table is already on screen. - if (firstRender) + // Compose only after interactive attachment, as before; serialize it with user actions. + if (!_initialDriftPending || _disposed || !_hasLoaded || _busy || _refreshing) return; + _initialDriftPending = false; + _refreshing = true; + StateHasChanged(); + try { await RefreshDriftAsync(); } + finally { - await RefreshDriftAsync(); - StateHasChanged(); + _refreshing = false; + if (!_disposed) StateHasChanged(); } } private async Task RefreshDriftAsync() { - // Drift: if no sealed deployment yet, no drift to report. Otherwise the probe compares the latest sealed - // revision hash to a fresh composition of the live-edit state. + if (_disposed) return; + _initialDriftPending = false; var latestSealed = _deployments.FirstOrDefault(d => d.Status == DeploymentStatus.Sealed); - if (latestSealed is null) - { - _driftState = DriftState.None; - return; - } - + if (latestSealed is null) { _driftState = DriftState.None; return; } try { - var drift = await DriftProbe.GetDriftAsync(latestSealed.RevisionHash, CancellationToken.None); + var drift = await DriftProbe.GetDriftAsync(latestSealed.RevisionHash, _reads.Token); + if (_disposed) return; _driftState = drift switch { true => DriftState.Drift, @@ -144,67 +174,110 @@ null => DriftState.None, }; } + catch (OperationCanceledException) when (_disposed) { } catch (Exception ex) { + if (_disposed) return; Logger.LogWarning(ex, "Deployments: drift check against revision {RevisionHash} failed.", latestSealed.RevisionHash); _driftState = DriftState.Failed; } } - private async Task ReloadAsync() + private async Task ReloadAsync() { - await using var db = await DbFactory.CreateDbContextAsync(); - _deployments = await db.Deployments - .AsNoTracking() - .OrderByDescending(d => d.CreatedAtUtc) - .Select(d => new DeploymentRow( - d.DeploymentId, - d.RevisionHash, - d.Status, - d.CreatedBy, - d.CreatedAtUtc, - d.SealedAtUtc, - d.FailureReason)) - .Take(50) - .ToListAsync(); + if (_disposed) return false; + var cancellation = _reads.Token; + _loading = true; + _loadError = null; + StateHasChanged(); + try + { + await using var db = await DbFactory.CreateDbContextAsync(cancellation); + var rows = await db.Deployments + .AsNoTracking() + .OrderByDescending(d => d.CreatedAtUtc) + .Select(d => new DeploymentRow( + d.DeploymentId, + d.RevisionHash, + d.Status, + d.CreatedBy, + d.CreatedAtUtc, + d.SealedAtUtc, + d.FailureReason)) + .Take(50) + .ToListAsync(cancellation); + if (_disposed) return false; + _deployments = rows; + _hasLoaded = true; + _lastFetchedUtc = DateTime.UtcNow; + // Only these successful rows establish the next drift check's context. + _driftState = rows.Any(d => d.Status == DeploymentStatus.Sealed) ? DriftState.Checking : DriftState.None; + return true; + } + catch (OperationCanceledException) when (_disposed) { return false; } + catch (Exception ex) + { + if (!_disposed) + { + _loadError = ex.Message; + Logger.LogWarning(ex, "Deployments: history refresh failed; preserving last successful rows."); + } + return false; + } + finally { _loading = false; } + } - // The verdict for these rows is not known yet; RefreshDriftAsync answers it. - _driftState = _deployments.Any(d => d.Status == DeploymentStatus.Sealed) ? DriftState.Checking : DriftState.None; + private async Task RefreshStatusAsync() + { + if (_disposed || _busy || _refreshing || _loading) return; + _refreshing = true; + try { if (await ReloadAsync()) await RefreshDriftAsync(); } + finally { _refreshing = false; } } private async Task StartDeploymentAsync() { - _busy = true; - _lastMessage = null; + if (_disposed || _busy || _refreshing || _loading || !_hasLoaded) return; + _busy = _requestPending = true; + _requestOutcome = null; + _requestedDeploymentId = null; + _requestedRevisionHash = null; + _requestMessage = null; + _requestResultUnavailable = false; try { var auth = await AuthState.GetAuthenticationStateAsync(); + if (_disposed) return; var createdBy = auth.User.Identity?.Name ?? "(anonymous)"; - var result = await AdminOps.StartDeploymentAsync( - createdBy: createdBy, - ct: CancellationToken.None); - - _lastSuccess = result.Outcome == StartDeploymentOutcome.Accepted; - _lastMessage = result.Outcome switch - { - StartDeploymentOutcome.Accepted => $"Deployment {Short(result.DeploymentId!.Value.Value)} dispatched (rev {DisplayText.Abbreviate(result.RevisionHash!.Value.Value, 12)}).", - StartDeploymentOutcome.AnotherDeploymentInFlight => result.Message ?? "Another deployment is already in flight.", - StartDeploymentOutcome.NoChanges => "No changes detected since the last sealed deployment.", - _ => result.Message ?? "Deployment rejected.", - }; - await ReloadAsync(); - await RefreshDriftAsync(); + // A dispatched mutation continues if the view closes; only history reads use page cancellation. + var result = await AdminOps.StartDeploymentAsync(createdBy: createdBy, ct: CancellationToken.None); + if (_disposed) return; + _requestPending = false; + _requestOutcome = result.Outcome; + _requestMessage = result.Message; + _requestedDeploymentId = result.Outcome == StartDeploymentOutcome.Accepted ? result.DeploymentId?.Value : null; + _requestedRevisionHash = result.Outcome == StartDeploymentOutcome.Accepted ? result.RevisionHash?.Value : null; + // A failed follow-up read cannot retroactively turn an accepted request into rejection. + if (await ReloadAsync()) await RefreshDriftAsync(); } catch (Exception ex) { - _lastSuccess = false; - _lastMessage = $"Deploy failed: {ex.Message}"; - } - finally - { - _busy = false; + if (_disposed) return; + _requestResultUnavailable = true; + _requestMessage = ex.Message; + Logger.LogWarning(ex, "Deployments: request result could not be confirmed."); } + finally { _busy = _requestPending = false; } } private static string Short(Guid id) => id.ToString("N")[..8]; + + /// Stops view-owned reads without cancelling an already-dispatched deployment request. + public void Dispose() + { + if (_disposed) return; + _disposed = true; + _reads.Cancel(); + _reads.Dispose(); + } } diff --git a/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Shared/DeploymentFeedback.razor b/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Shared/DeploymentFeedback.razor new file mode 100644 index 000000000..a5e578ee8 --- /dev/null +++ b/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Shared/DeploymentFeedback.razor @@ -0,0 +1,108 @@ +@using ZB.MOM.WW.OtOpcUa.Commons.Messages.Admin +@using ZB.MOM.WW.OtOpcUa.Configuration.Enums +
+
+ @if (InitialLoading) + { +

Loading deployment history…

+ } + else + { + @if (RequestPending) + { +

Waiting for request acceptance…

+ } + else if (RequestResultUnavailable) + { +

The request result could not be confirmed. Refresh status before retrying.

+ } + else if (RequestOutcome == StartDeploymentOutcome.Accepted) + { +

@(Status is null or DeploymentStatus.Dispatching or DeploymentStatus.AwaitingApplyAcks ? "Request accepted — deployment in progress." : "Request accepted.")

+ } + else if (RequestOutcome == StartDeploymentOutcome.NoChanges) + { +

No configuration changes; no new deployment was requested.

+ } + else if (RequestOutcome == StartDeploymentOutcome.AnotherDeploymentInFlight) + { +

Another deployment is already in progress. This request was not started.

+ } + else if (RequestOutcome == StartDeploymentOutcome.Rejected) + { +

Request rejected. @(string.IsNullOrEmpty(RequestMessage) ? "No reason was supplied." : "Open the request details below for the recorded reason.")

+ } + + @if (!HistoryAvailable) + { +

Deployment history is unavailable. Refresh to try again.

+ } + else if (Status is not null) + { +
+ @ContextLabel: @(Status == DeploymentStatus.AwaitingApplyAcks ? "Awaiting acks" : RecordedLabel) + @if (Status == DeploymentStatus.AwaitingApplyAcks) + { +
Awaiting apply acknowledgements
+ } +
+ } + else if (RequestOutcome == StartDeploymentOutcome.Accepted) + { +

The requested deployment status is not yet observed in the loaded history. Refresh status to check application progress.

+ } + else + { +

No deployment history recorded.

+ } + } +
+ @* Full diagnostics are outside the live region: opening one must not announce an entire payload. *@ + @if (!string.IsNullOrEmpty(RequestMessage)) + { +
+ } + @if (!string.IsNullOrEmpty(FailureReason)) + { +
+ } +
+@code { + /// The actual actor reply outcome, absent before a confirmed reply. + [Parameter] public StartDeploymentOutcome? RequestOutcome { get; set; } + /// True only while waiting for the request reply, not while application proceeds. + [Parameter] public bool RequestPending { get; set; } + /// A transport failure left the reply unknown; it does not establish server rejection. + [Parameter] public bool RequestResultUnavailable { get; set; } + /// Complete existing request metadata, disclosed outside the short live outcome. + [Parameter] public string? RequestMessage { get; set; } + /// The recorded status of the explicitly named loaded deployment. + [Parameter] public DeploymentStatus? Status { get; set; } + /// Complete recorded application failure metadata, including sealed degradation. + [Parameter] public string? FailureReason { get; set; } + /// The initial history query is still pending, distinct from a confirmed empty read. + [Parameter] public bool InitialLoading { get; set; } + /// Whether any history read has succeeded; false avoids inventing an empty history. + [Parameter] public bool HistoryAvailable { get; set; } = true; + /// Identifies whose recorded status is shown, e.g. the requested deployment. + [Parameter] public string ContextLabel { get; set; } = "Most recent recorded deployment"; + + private string RecordedLabel => Status switch + { + DeploymentStatus.Dispatching => "Dispatching", + DeploymentStatus.AwaitingApplyAcks => "Awaiting apply acknowledgements", + DeploymentStatus.Sealed when !string.IsNullOrEmpty(FailureReason) => "Sealed (degraded)", + DeploymentStatus.Sealed => "Sealed", + DeploymentStatus.PartiallyFailed => "Partially failed", + DeploymentStatus.TimedOut => "Timed out", + _ => $"Unknown status ({(int?)Status})", + }; + private StatusState RecordedState => Status switch + { + DeploymentStatus.Sealed when string.IsNullOrEmpty(FailureReason) => StatusState.Ok, + DeploymentStatus.Sealed => StatusState.Warn, + DeploymentStatus.PartiallyFailed or DeploymentStatus.TimedOut => StatusState.Bad, + DeploymentStatus.Dispatching or DeploymentStatus.AwaitingApplyAcks => StatusState.Info, + _ => StatusState.Idle, + }; +} diff --git a/tests/Server/ZB.MOM.WW.OtOpcUa.AdminUI.Tests/Pages/DeploymentFeedbackTests.cs b/tests/Server/ZB.MOM.WW.OtOpcUa.AdminUI.Tests/Pages/DeploymentFeedbackTests.cs new file mode 100644 index 000000000..bee3539b1 --- /dev/null +++ b/tests/Server/ZB.MOM.WW.OtOpcUa.AdminUI.Tests/Pages/DeploymentFeedbackTests.cs @@ -0,0 +1,114 @@ +using Bunit; +using Shouldly; +using Xunit; +using ZB.MOM.WW.OtOpcUa.AdminUI.Components.Shared; +using ZB.MOM.WW.OtOpcUa.Commons.Messages.Admin; +using ZB.MOM.WW.OtOpcUa.Configuration.Enums; + +namespace ZB.MOM.WW.OtOpcUa.AdminUI.Tests.Pages; + +/// Acceptance, recorded application state, unavailable reads and no-change outcomes stay distinct. +[Trait("Category","Unit")] +public sealed class DeploymentFeedbackTests : BunitContext +{ + [Theory] + [InlineData(DeploymentStatus.Dispatching)] + [InlineData(DeploymentStatus.AwaitingApplyAcks)] + public void AcceptedRequest_IsNotCompletedApplication(DeploymentStatus status) + { + var cut=Render(p=>p.Add(x=>x.RequestOutcome,StartDeploymentOutcome.Accepted).Add(x=>x.Status,status)); + cut.Find("[role=status]").TextContent.ShouldContain("in progress"); + cut.Find("[role=status]").TextContent.ShouldNotContain("completed"); + } + + [Theory] + [InlineData(DeploymentStatus.Dispatching,"Dispatching")] + [InlineData(DeploymentStatus.AwaitingApplyAcks,"Awaiting apply acknowledgements")] + [InlineData(DeploymentStatus.Sealed,"Sealed")] + [InlineData(DeploymentStatus.PartiallyFailed,"Partially failed")] + [InlineData(DeploymentStatus.TimedOut,"Timed out")] + public void RealRecordedStatuses_RemainDistinct(DeploymentStatus status,string label) + { + var cut=Render(p=>p.Add(x=>x.Status,status)); + cut.Find("[role=status]").TextContent.ShouldContain(label); + } + + [Fact] + public void SealedWithReason_IsDegraded_AndFullReasonIsOutsideLiveAnnouncement() + { + var text=""+new string('x',2000); + var cut=Render(p=>p.Add(x=>x.Status,DeploymentStatus.Sealed).Add(x=>x.FailureReason,text)); + cut.Find("[role=status]").TextContent.ShouldContain("Sealed (degraded)"); + cut.Find("pre").TextContent.ShouldBe(text); + cut.FindAll("script").ShouldBeEmpty(); + cut.FindAll("[role=status] pre").ShouldBeEmpty(); + } + + [Fact] + public void NoChanges_IsInformational_AndKeepsPriorRecordedStatus() + { + var cut=Render(p=>p.Add(x=>x.RequestOutcome,StartDeploymentOutcome.NoChanges).Add(x=>x.Status,DeploymentStatus.TimedOut)); + var text=cut.Find("[role=status]").TextContent; + text.ShouldContain("No configuration changes");text.ShouldContain("Timed out");text.ShouldNotContain("rejected"); + } + + [Fact] + public void InitialPending_IsNotEmptyHistory() + { + var cut=Render(p=>p.Add(x=>x.InitialLoading,true)); + cut.Find("[role=status]").TextContent.ShouldContain("Loading deployment history"); + cut.Find("[role=status]").TextContent.ShouldNotContain("No deployment history"); + } + + [Fact] + public void FailedInitialRead_IsNotEmptyHistory() + { + var cut=Render(p=>p.Add(x=>x.HistoryAvailable,false)); + cut.Find("[role=status]").TextContent.ShouldContain("history is unavailable"); + cut.Find("[role=status]").TextContent.ShouldNotContain("No deployment history"); + } + + [Fact] + public void ConfirmedEmptyRead_IsExplicitEmptyHistory() + { + var cut=Render(); + cut.Find("[role=status]").TextContent.ShouldContain("No deployment history"); + } + + [Fact] + public void AcceptedButNotYetObserved_IsNotEmptyHistory() + { + var cut=Render(p=>p.Add(x=>x.RequestOutcome,StartDeploymentOutcome.Accepted)); + var text=cut.Find("[role=status]").TextContent;text.ShouldContain("Request accepted");text.ShouldContain("not yet observed");text.ShouldNotContain("No deployment history"); + } + + [Fact] + public void TransportFailure_DoesNotInventRejectionOrSuccess() + { + var cut=Render(p=>p.Add(x=>x.RequestResultUnavailable,true)); + var text=cut.Find("[role=status]").TextContent;text.ShouldContain("could not be confirmed");text.ShouldNotContain("Request rejected");text.ShouldNotContain("Request accepted"); + } + + [Theory] + [InlineData(StartDeploymentOutcome.Rejected,"Request rejected")] + [InlineData(StartDeploymentOutcome.AnotherDeploymentInFlight,"This request was not started")] + public void KnownUnacceptedRequest_IsExplicit(StartDeploymentOutcome outcome,string expected) + { + var cut=Render(p=>p.Add(x=>x.RequestOutcome,outcome)); + cut.Find("[role=status]").TextContent.ShouldContain(expected); + } + + [Fact] + public void WaitingForActorReply_IsNotAcceptance() + { + var cut=Render(p=>p.Add(x=>x.RequestPending,true)); + var text=cut.Find("[role=status]").TextContent;text.ShouldContain("Waiting for request acceptance");text.ShouldNotContain("Request accepted"); + } + [Fact] + public void RejectedWithoutReason_DoesNotPromiseAMissingDisclosure() + { + var cut=Render(p=>p.Add(x=>x.RequestOutcome,StartDeploymentOutcome.Rejected)); + cut.Find("[role=status]").TextContent.ShouldContain("No reason was supplied"); + cut.FindAll("details").ShouldBeEmpty(); + } +} diff --git a/tests/Server/ZB.MOM.WW.OtOpcUa.AdminUI.Tests/Pages/DeploymentPageSqlServerTests.cs b/tests/Server/ZB.MOM.WW.OtOpcUa.AdminUI.Tests/Pages/DeploymentPageSqlServerTests.cs new file mode 100644 index 000000000..95b462158 --- /dev/null +++ b/tests/Server/ZB.MOM.WW.OtOpcUa.AdminUI.Tests/Pages/DeploymentPageSqlServerTests.cs @@ -0,0 +1,65 @@ +using System.Data.Common; +using System.Reflection; +using Bunit; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Diagnostics; +using Microsoft.Extensions.DependencyInjection; +using Shouldly; +using Xunit; +using ZB.MOM.WW.OtOpcUa.AdminUI.Deployments; +using ZB.MOM.WW.OtOpcUa.Commons.Interfaces; +using ZB.MOM.WW.OtOpcUa.Configuration; +using ZB.MOM.WW.OtOpcUa.Configuration.Entities; +using ZB.MOM.WW.OtOpcUa.Configuration.Enums; +using DeploymentPage = ZB.MOM.WW.OtOpcUa.AdminUI.Components.Pages.Deployments; + +namespace ZB.MOM.WW.OtOpcUa.AdminUI.Tests.Pages; + +/// Real-provider page reads stay bounded and exclude whole-fleet artifact payloads. +[Collection(nameof(AdminUiSqlServerCollection))] +public sealed class DeploymentPageSqlServerTests(AdminUiSqlServerFixture sql) : BunitContext +{ + [SqlServerFact] + public async Task HistoryRead_IsTranslatedBoundedAndDoesNotSelectArtifactBlobs() + { + var ids=Enumerable.Range(0,60).Select(_=>Guid.NewGuid()).ToArray(); + try + { + await using(var db=await sql.Factory.CreateDbContextAsync(Xunit.TestContext.Current.CancellationToken)) + { + db.Deployments.AddRange(ids.Select((id,i)=>new Deployment { + DeploymentId=id,RevisionHash=new string('a',64),CreatedBy="isolated-ui-fixture", + Status=DeploymentStatus.Dispatching,CreatedAtUtc=new DateTime(4000,1,1,0,0,0,DateTimeKind.Utc).AddSeconds(i), + ArtifactBlob=new byte[64*1024] })); + await db.SaveChangesAsync(Xunit.TestContext.Current.CancellationToken); + } + var commands=new ReadCommands(); + var options=new DbContextOptionsBuilder().UseSqlServer(sql.ConnectionString).AddInterceptors(commands).Options; + var factory=new SqlFactory(options); + AddAuthorization().SetAuthorized("isolated-fixture"); + Services.AddSingleton>(factory); + Services.AddSingleton(new DeploymentDriftProbe(factory,_=>Task.FromResult(new string('a',64)))); + Services.AddSingleton(DispatchProxy.Create()); + var cut=Render(); + cut.WaitForAssertion(()=>cut.FindAll("tbody tr").Count.ShouldBe(50),TimeSpan.FromSeconds(10)); + commands.Text.ShouldNotBeEmpty(); + string.Join("\n",commands.Text).ShouldNotContain("ArtifactBlob"); + } + finally + { + await using var cleanup=await sql.Factory.CreateDbContextAsync(Xunit.TestContext.Current.CancellationToken); + await cleanup.Deployments.Where(d=>ids.Contains(d.DeploymentId)).ExecuteDeleteAsync(Xunit.TestContext.Current.CancellationToken); + } + } + private sealed class SqlFactory(DbContextOptions options) : IDbContextFactory + { + public OtOpcUaConfigDbContext CreateDbContext()=>new(options); + public Task CreateDbContextAsync(CancellationToken ct=default)=>Task.FromResult(CreateDbContext()); + } + private sealed class ReadCommands : DbCommandInterceptor + { + public List Text {get;}=[]; + public override ValueTask> ReaderExecutingAsync(DbCommand command,CommandEventData eventData,InterceptionResult result,CancellationToken cancellationToken=default) + {Text.Add(command.CommandText);return ValueTask.FromResult(result);} + } +} diff --git a/tests/Server/ZB.MOM.WW.OtOpcUa.AdminUI.Tests/Pages/DeploymentRefreshTests.cs b/tests/Server/ZB.MOM.WW.OtOpcUa.AdminUI.Tests/Pages/DeploymentRefreshTests.cs new file mode 100644 index 000000000..bed623e80 --- /dev/null +++ b/tests/Server/ZB.MOM.WW.OtOpcUa.AdminUI.Tests/Pages/DeploymentRefreshTests.cs @@ -0,0 +1,219 @@ +using System.Reflection; +using Bunit; +using Microsoft.EntityFrameworkCore; +using Microsoft.AspNetCore.Components.Authorization; +using System.Security.Claims; +using Microsoft.Extensions.DependencyInjection; +using Shouldly; +using Xunit; +using ZB.MOM.WW.OtOpcUa.AdminUI.Deployments; +using ZB.MOM.WW.OtOpcUa.AdminUI.Tests.Uns; +using ZB.MOM.WW.OtOpcUa.Commons.Interfaces; +using ZB.MOM.WW.OtOpcUa.Commons.Messages.Admin; +using ZB.MOM.WW.OtOpcUa.Configuration; +using ZB.MOM.WW.OtOpcUa.Configuration.Entities; +using ZB.MOM.WW.OtOpcUa.Configuration.Enums; +using DeploymentPage = ZB.MOM.WW.OtOpcUa.AdminUI.Components.Pages.Deployments; + +namespace ZB.MOM.WW.OtOpcUa.AdminUI.Tests.Pages; + +/// Manual deployment status reads and request replies retain their independent meanings. +[Trait("Category","Unit")] +public sealed class DeploymentRefreshTests : BunitContext +{ + private readonly string _database = "deployment-ui-"+Guid.NewGuid().ToString("N"); + private ControlledFactory Configure(bool seed=true) + { + AddAuthorization().SetAuthorized("fixture"); + if (seed) + { + using var db=RawTreeTestDb.CreateNamed(_database); + db.Deployments.Add(new Deployment { DeploymentId=Guid.Parse("4ffec608-caa6-47f4-a9ca-71815c791648"), RevisionHash=new string('a',64), CreatedBy="fixture", Status=DeploymentStatus.AwaitingApplyAcks }); + db.SaveChanges(); + } + var factory=new ControlledFactory(_database); + Services.AddSingleton>(factory); + Services.AddSingleton(new DeploymentDriftProbe(factory,_=>Task.FromResult(new string('a',64)))); + Services.AddSingleton(DispatchProxy.Create()); + return factory; + } + private RequestProxy Request => (RequestProxy)Services.GetRequiredService(); + + [Fact] + public void ManualRefresh_ObservesLaterApplicationStatusWithoutReloadingPage() + { + Configure();var cut=Render(); + using (var db=RawTreeTestDb.CreateNamed(_database)) { var row=db.Deployments.Single();row.Status=DeploymentStatus.Sealed;row.SealedAtUtc=DateTime.UtcNow;db.SaveChanges(); } + cut.Find("[data-testid=deployment-refresh]").Click(); + cut.WaitForAssertion(()=>cut.Find("[role=status]").TextContent.ShouldContain("Sealed")); + cut.Find("[data-testid=deployment-last-fetched]").TextContent.ShouldContain("UTC"); + } + + [Fact] + public void FailedInitialHistoryRead_DoesNotBecomeEmptyOrKillThePage() + { + var factory=Configure(false);factory.Read=_=>Task.FromException(new IOException("Synthetic read failure")); + var cut=Render(); + cut.WaitForAssertion(()=>cut.Find("[role=status]").TextContent.ShouldContain("history is unavailable")); + cut.Find("[role=status]").TextContent.ShouldNotContain("No deployment history"); + factory.Read=null;cut.Find("[data-testid=deployment-refresh]").Click(); + cut.WaitForAssertion(()=>cut.Find("[role=status]").TextContent.ShouldContain("No deployment history")); + } + + [Fact] + public void AcceptedRequest_RemainsAcceptedWhenFollowingHistoryReadFails() + { + var factory=Configure();var cut=Render(); + Request.Start=()=> { factory.Read=_=>Task.FromException(new IOException("Synthetic follow-up read failure"));return Task.FromResult(new StartDeploymentResult(StartDeploymentOutcome.Accepted,new(Guid.NewGuid()),new(new string('b',64)),null,new(Guid.NewGuid()))); }; + cut.Find("[data-testid=deployment-request]").Click(); + cut.WaitForAssertion(()=>cut.Find("[role=status]").TextContent.ShouldContain("Request accepted")); + cut.Find("[role=status]").TextContent.ShouldContain("not yet observed"); + cut.Markup.ShouldNotContain("Deploy failed");cut.FindAll("tbody tr").Count.ShouldBe(1);cut.Markup.ShouldContain(new string('b',64)); + } + + [Fact] + public async Task PendingRefresh_BlocksQueuedRefreshAndRequestReentry() + { + var factory=Configure();var cut=Render(); + var entered=new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + var pending=new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + factory.Read=_=>{entered.TrySetResult();return pending.Task;}; + var refreshing=cut.Find("[data-testid=deployment-refresh]").TriggerEventAsync("onclick",new Microsoft.AspNetCore.Components.Web.MouseEventArgs()); + await entered.Task.WaitAsync(TimeSpan.FromSeconds(10),Xunit.TestContext.Current.CancellationToken); + try + { + await cut.Find("[data-testid=deployment-refresh]").TriggerEventAsync("onclick",new Microsoft.AspNetCore.Components.Web.MouseEventArgs()); + await cut.Find("[data-testid=deployment-request]").TriggerEventAsync("onclick",new Microsoft.AspNetCore.Components.Web.MouseEventArgs()); + factory.Attempts.ShouldBe(2);Request.Calls.ShouldBe(0); + } + finally {factory.Read=null;pending.TrySetResult(RawTreeTestDb.CreateNamed(_database));await refreshing;} + } + + [Fact] + public async Task PendingRequest_BlocksQueuedRequestsAndStatusRefresh() + { + var factory=Configure();var cut=Render(); + var entered=new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + var pending=new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + Request.Start=()=>{entered.TrySetResult();return pending.Task;}; + var submitting=cut.Find("[data-testid=deployment-request]").TriggerEventAsync("onclick",new Microsoft.AspNetCore.Components.Web.MouseEventArgs()); + await entered.Task.WaitAsync(TimeSpan.FromSeconds(10),Xunit.TestContext.Current.CancellationToken); + try + { + await cut.Find("[data-testid=deployment-request]").TriggerEventAsync("onclick",new Microsoft.AspNetCore.Components.Web.MouseEventArgs()); + await cut.Find("[data-testid=deployment-refresh]").TriggerEventAsync("onclick",new Microsoft.AspNetCore.Components.Web.MouseEventArgs()); + Request.Calls.ShouldBe(1);factory.Attempts.ShouldBe(1); + } + finally { pending.TrySetResult(new StartDeploymentResult(StartDeploymentOutcome.NoChanges,null,null,null,new(Guid.NewGuid())));await submitting; } + cut.Find("[role=status]").TextContent.ShouldContain("No configuration changes"); + } + + [Fact] + public void MissingActorReply_IsUnconfirmedRatherThanRejected() + { + Configure();var cut=Render();Request.Start=()=>Task.FromException(new IOException("Synthetic unknown reply")); + cut.Find("[data-testid=deployment-request]").Click(); + cut.WaitForAssertion(()=>cut.Find("[role=status]").TextContent.ShouldContain("could not be confirmed")); + cut.Find("[role=status]").TextContent.ShouldNotContain("Request rejected"); + } + + [Fact] + public async Task DelayedInitialHistory_ComposesDriftOnceAfterRowsBecomeAvailable() + { + var factory=Configure(); + using (var db=RawTreeTestDb.CreateNamed(_database)) {db.Deployments.Single().Status=DeploymentStatus.Sealed;db.SaveChanges();} + var pending=new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + factory.Read=_=>pending.Task; + var compositions=0; + Services.AddSingleton(new DeploymentDriftProbe(factory,_=>{compositions++;return Task.FromResult(new string('a',64));})); + var cut=Render(); + cut.Find("[role=status]").TextContent.ShouldContain("Loading deployment history"); + compositions.ShouldBe(0); + factory.Read=null;pending.SetResult(RawTreeTestDb.CreateNamed(_database)); + cut.WaitForAssertion(()=>cut.Find("[data-testid=drift-chip]").TextContent.ShouldBe("In sync")); + compositions.ShouldBe(1); + } + + [Fact] + public void FailedRefresh_PreservesLastSuccessfulRowsAndFetchedTime() + { + var factory=Configure();var cut=Render(); + var fetched=cut.Find("[data-testid=deployment-last-fetched]").GetAttribute("datetime"); + factory.Read=_=>Task.FromException(new IOException("Synthetic stale read")); + cut.Find("[data-testid=deployment-refresh]").Click(); + cut.WaitForAssertion(()=>cut.Find("[role=alert]").TextContent.ShouldContain("last successful reading")); + cut.Find("[data-testid=deployment-last-fetched]").GetAttribute("datetime").ShouldBe(fetched); + cut.FindAll("tbody tr").Count.ShouldBe(1); + cut.Find("[role=status]").TextContent.ShouldContain("Awaiting apply acknowledgements"); + } + + [Fact] + public async Task Disposal_CancelsOnlyTheViewOwnedHistoryRead() + { + var factory=Configure(false); + var canceled=new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + var pending=new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + factory.Read=async ct=> + { + try {return await pending.Task.WaitAsync(ct);} + catch(OperationCanceledException) {canceled.TrySetResult();throw;} + }; + var cut=Render(); + cut.Find("[role=status]").TextContent.ShouldContain("Loading deployment history"); + await DisposeComponentsAsync(); + await canceled.Task.WaitAsync(TimeSpan.FromSeconds(10),Xunit.TestContext.Current.CancellationToken); + Renderer.UnhandledException.IsCompletedSuccessfully.ShouldBeFalse(); + } + + [Fact] + public async Task Disposal_DoesNotCancelOrReplayAnAlreadyDispatchedRequest() + { + var factory=Configure();var cut=Render();var client=Request; + var entered=new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + var pending=new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + var completed=false; + client.Start=async ()=>{entered.TrySetResult();var reply=await pending.Task;completed=true;return reply;}; + var submitting=cut.Find("[data-testid=deployment-request]").TriggerEventAsync("onclick",new Microsoft.AspNetCore.Components.Web.MouseEventArgs()); + await entered.Task.WaitAsync(TimeSpan.FromSeconds(10),Xunit.TestContext.Current.CancellationToken); + await DisposeComponentsAsync(); + pending.SetResult(new StartDeploymentResult(StartDeploymentOutcome.Accepted,new(Guid.NewGuid()),new(new string('b',64)),null,new(Guid.NewGuid()))); + await submitting; + completed.ShouldBeTrue();client.Calls.ShouldBe(1);client.LastToken.CanBeCanceled.ShouldBeFalse();factory.Attempts.ShouldBe(1); + } + + [Fact] + public async Task DisposalDuringUsernameRead_DoesNotDispatchANewRequest() + { + Configure(); + var state=new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + Services.AddSingleton(new DeferredState(state.Task)); + var cut=Render();var client=Request; + var submitting=cut.Find("[data-testid=deployment-request]").TriggerEventAsync("onclick",new Microsoft.AspNetCore.Components.Web.MouseEventArgs()); + await DisposeComponentsAsync(); + state.SetResult(new AuthenticationState(new ClaimsPrincipal(new ClaimsIdentity([new Claim(ClaimTypes.Name,"fixture")],"fixture")))); + await submitting;client.Calls.ShouldBe(0); + } + + private sealed class DeferredState(Task state) : AuthenticationStateProvider + {public override Task GetAuthenticationStateAsync()=>state;} + + public sealed class ControlledFactory(string name) : IDbContextFactory + { + public int Attempts {get;private set;} + public Func>? Read {get;set;} + public OtOpcUaConfigDbContext CreateDbContext()=>RawTreeTestDb.CreateNamed(name); + public Task CreateDbContextAsync(CancellationToken ct=default) + {Attempts++;return Read?.Invoke(ct)??Task.FromResult(CreateDbContext());} + } + public class RequestProxy : DispatchProxy + { + public int Calls {get;private set;} + public CancellationToken LastToken {get;private set;} + public Func> Start {get;set;}=()=>Task.FromException(new NotSupportedException("Synthetic operation not configured")); + protected override object? Invoke(MethodInfo? method,object?[]? args) + { + if(method?.Name!=nameof(IAdminOperationsClient.StartDeploymentAsync))throw new NotSupportedException("Synthetic fixture rejects other operations"); + Calls++;LastToken=(CancellationToken)args![1]!;return Start(); + } + } +}