Unify gateway styling and preserve identity through recovery
@@ -0,0 +1,14 @@
|
||||
[
|
||||
{
|
||||
"mode": "compact",
|
||||
"aStillOpen": true,
|
||||
"focusedDiagnosticStillSessionA": true,
|
||||
"originalElementStillConnected": true
|
||||
},
|
||||
{
|
||||
"mode": "table",
|
||||
"aStillOpen": true,
|
||||
"focusedDiagnosticStillSessionA": true,
|
||||
"originalElementStillConnected": true
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1 @@
|
||||
[{"mode": "compact", "aStillOpen": true, "focusedDiagnosticStillSessionA": true, "originalElementStillConnected": true}, {"mode": "table", "aStillOpen": true, "focusedDiagnosticStillSessionA": true, "originalElementStillConnected": true}]
|
||||
@@ -0,0 +1,14 @@
|
||||
[
|
||||
{
|
||||
"mode": "compact",
|
||||
"aStillOpen": false,
|
||||
"focusedDiagnosticStillSessionA": false,
|
||||
"originalElementStillConnected": true
|
||||
},
|
||||
{
|
||||
"mode": "table",
|
||||
"aStillOpen": false,
|
||||
"focusedDiagnosticStillSessionA": false,
|
||||
"originalElementStillConnected": true
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,6 @@
|
||||
[{"mode": "compact", "aStillOpen": false, "focusedDiagnosticStillSessionA": false, "originalElementStillConnected": true}, {"mode": "table", "aStillOpen": false, "focusedDiagnosticStillSessionA": false, "originalElementStillConnected": true}]
|
||||
Traceback (most recent call last):
|
||||
File "/Users/dohertj2/Desktop/MxAccessGateway/docs/ui-validation/fault_identity.py", line 10, in <module>
|
||||
(OUT/(sys.argv[1]+'.json')).write_text(json.dumps(rows,indent=2));print(json.dumps(rows));assert all(r['aStillOpen'] and r['focusedDiagnosticStillSessionA'] for r in rows)
|
||||
~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
AssertionError
|
||||
|
After Width: | Height: | Size: 94 KiB |
|
After Width: | Height: | Size: 100 KiB |
|
After Width: | Height: | Size: 111 KiB |
|
After Width: | Height: | Size: 63 KiB |
@@ -0,0 +1,274 @@
|
||||
{
|
||||
"cases": [
|
||||
{
|
||||
"case": "retry",
|
||||
"width": 1440,
|
||||
"dpr": 1,
|
||||
"attemptDelta": 2,
|
||||
"watchRetained": true,
|
||||
"focusStable": true
|
||||
},
|
||||
{
|
||||
"case": "navigation",
|
||||
"principal": "admin",
|
||||
"width": 1440,
|
||||
"hrefs": [
|
||||
"/",
|
||||
"/sessions",
|
||||
"/workers",
|
||||
"/events",
|
||||
"/alarms",
|
||||
"/galaxy",
|
||||
"/browse",
|
||||
"/apikeys",
|
||||
"/admin/secrets",
|
||||
"/settings"
|
||||
],
|
||||
"footerKeyboardReachable": true
|
||||
},
|
||||
{
|
||||
"case": "navigation",
|
||||
"principal": "viewer",
|
||||
"width": 1440,
|
||||
"hrefs": [
|
||||
"/",
|
||||
"/sessions",
|
||||
"/workers",
|
||||
"/events",
|
||||
"/alarms",
|
||||
"/galaxy",
|
||||
"/browse",
|
||||
"/apikeys",
|
||||
"/settings"
|
||||
],
|
||||
"footerKeyboardReachable": true
|
||||
},
|
||||
{
|
||||
"case": "navigation",
|
||||
"principal": "anonymous",
|
||||
"width": 1440,
|
||||
"hrefs": [
|
||||
"/",
|
||||
"/sessions",
|
||||
"/workers",
|
||||
"/events",
|
||||
"/galaxy",
|
||||
"/browse",
|
||||
"/apikeys",
|
||||
"/settings",
|
||||
"/login"
|
||||
],
|
||||
"footerKeyboardReachable": true
|
||||
},
|
||||
{
|
||||
"case": "retry",
|
||||
"width": 1024,
|
||||
"dpr": 1,
|
||||
"attemptDelta": 2,
|
||||
"watchRetained": true,
|
||||
"focusStable": true
|
||||
},
|
||||
{
|
||||
"case": "navigation",
|
||||
"principal": "admin",
|
||||
"width": 1024,
|
||||
"hrefs": [
|
||||
"/",
|
||||
"/sessions",
|
||||
"/workers",
|
||||
"/events",
|
||||
"/alarms",
|
||||
"/galaxy",
|
||||
"/browse",
|
||||
"/apikeys",
|
||||
"/admin/secrets",
|
||||
"/settings"
|
||||
],
|
||||
"footerKeyboardReachable": true
|
||||
},
|
||||
{
|
||||
"case": "navigation",
|
||||
"principal": "viewer",
|
||||
"width": 1024,
|
||||
"hrefs": [
|
||||
"/",
|
||||
"/sessions",
|
||||
"/workers",
|
||||
"/events",
|
||||
"/alarms",
|
||||
"/galaxy",
|
||||
"/browse",
|
||||
"/apikeys",
|
||||
"/settings"
|
||||
],
|
||||
"footerKeyboardReachable": true
|
||||
},
|
||||
{
|
||||
"case": "navigation",
|
||||
"principal": "anonymous",
|
||||
"width": 1024,
|
||||
"hrefs": [
|
||||
"/",
|
||||
"/sessions",
|
||||
"/workers",
|
||||
"/events",
|
||||
"/galaxy",
|
||||
"/browse",
|
||||
"/apikeys",
|
||||
"/settings",
|
||||
"/login"
|
||||
],
|
||||
"footerKeyboardReachable": true
|
||||
},
|
||||
{
|
||||
"case": "retry",
|
||||
"width": 390,
|
||||
"dpr": 1,
|
||||
"attemptDelta": 2,
|
||||
"watchRetained": true,
|
||||
"focusStable": true
|
||||
},
|
||||
{
|
||||
"case": "navigation",
|
||||
"principal": "admin",
|
||||
"width": 390,
|
||||
"hrefs": [
|
||||
"/",
|
||||
"/sessions",
|
||||
"/workers",
|
||||
"/events",
|
||||
"/alarms",
|
||||
"/galaxy",
|
||||
"/browse",
|
||||
"/apikeys",
|
||||
"/admin/secrets",
|
||||
"/settings"
|
||||
],
|
||||
"footerKeyboardReachable": true
|
||||
},
|
||||
{
|
||||
"case": "navigation",
|
||||
"principal": "viewer",
|
||||
"width": 390,
|
||||
"hrefs": [
|
||||
"/",
|
||||
"/sessions",
|
||||
"/workers",
|
||||
"/events",
|
||||
"/alarms",
|
||||
"/galaxy",
|
||||
"/browse",
|
||||
"/apikeys",
|
||||
"/settings"
|
||||
],
|
||||
"footerKeyboardReachable": true
|
||||
},
|
||||
{
|
||||
"case": "navigation",
|
||||
"principal": "anonymous",
|
||||
"width": 390,
|
||||
"hrefs": [
|
||||
"/",
|
||||
"/sessions",
|
||||
"/workers",
|
||||
"/events",
|
||||
"/galaxy",
|
||||
"/browse",
|
||||
"/apikeys",
|
||||
"/settings",
|
||||
"/login"
|
||||
],
|
||||
"footerKeyboardReachable": true
|
||||
},
|
||||
{
|
||||
"case": "retry",
|
||||
"width": 720,
|
||||
"dpr": 2,
|
||||
"attemptDelta": 2,
|
||||
"watchRetained": true,
|
||||
"focusStable": true
|
||||
},
|
||||
{
|
||||
"case": "navigation",
|
||||
"principal": "admin",
|
||||
"width": 720,
|
||||
"hrefs": [
|
||||
"/",
|
||||
"/sessions",
|
||||
"/workers",
|
||||
"/events",
|
||||
"/alarms",
|
||||
"/galaxy",
|
||||
"/browse",
|
||||
"/apikeys",
|
||||
"/admin/secrets",
|
||||
"/settings"
|
||||
],
|
||||
"footerKeyboardReachable": true
|
||||
},
|
||||
{
|
||||
"case": "navigation",
|
||||
"principal": "viewer",
|
||||
"width": 720,
|
||||
"hrefs": [
|
||||
"/",
|
||||
"/sessions",
|
||||
"/workers",
|
||||
"/events",
|
||||
"/alarms",
|
||||
"/galaxy",
|
||||
"/browse",
|
||||
"/apikeys",
|
||||
"/settings"
|
||||
],
|
||||
"footerKeyboardReachable": true
|
||||
},
|
||||
{
|
||||
"case": "navigation",
|
||||
"principal": "anonymous",
|
||||
"width": 720,
|
||||
"hrefs": [
|
||||
"/",
|
||||
"/sessions",
|
||||
"/workers",
|
||||
"/events",
|
||||
"/galaxy",
|
||||
"/browse",
|
||||
"/apikeys",
|
||||
"/settings",
|
||||
"/login"
|
||||
],
|
||||
"footerKeyboardReachable": true
|
||||
},
|
||||
{
|
||||
"case": "reduced-motion",
|
||||
"elements": [
|
||||
{
|
||||
"animation": "none",
|
||||
"opacity": "1"
|
||||
},
|
||||
{
|
||||
"animation": "none",
|
||||
"opacity": "1"
|
||||
},
|
||||
{
|
||||
"animation": "none",
|
||||
"opacity": "1"
|
||||
},
|
||||
{
|
||||
"animation": "none",
|
||||
"opacity": "1"
|
||||
},
|
||||
{
|
||||
"animation": "none",
|
||||
"opacity": "1"
|
||||
},
|
||||
{
|
||||
"animation": "none",
|
||||
"opacity": "1"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"errors": []
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"cases": 2, "errors": []}
|
||||
@@ -0,0 +1,11 @@
|
||||
Determining projects to restore...
|
||||
All projects are up-to-date for restore.
|
||||
ZB.MOM.WW.MxGateway.Contracts -> /tmp/mx-ui-final-artifacts/bin/ZB.MOM.WW.MxGateway.Contracts/release_net10.0/ZB.MOM.WW.MxGateway.Contracts.dll
|
||||
ZB.MOM.WW.MxGateway.Server -> /tmp/mx-ui-final-artifacts/bin/ZB.MOM.WW.MxGateway.Server/release/ZB.MOM.WW.MxGateway.Server.dll
|
||||
MxUiCanary -> /tmp/mx-ui-final-artifacts/bin/MxUiCanary/release/MxUiCanary.dll
|
||||
|
||||
Build succeeded.
|
||||
0 Warning(s)
|
||||
0 Error(s)
|
||||
|
||||
Time Elapsed 00:00:01.37
|
||||
@@ -0,0 +1,7 @@
|
||||
ZB.MOM.WW.MxGateway.Contracts -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Contracts/bin/Debug/net10.0/ZB.MOM.WW.MxGateway.Contracts.dll
|
||||
ZB.MOM.WW.MxGateway.Server -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Server/bin/Debug/net10.0/ZB.MOM.WW.MxGateway.Server.dll
|
||||
ZB.MOM.WW.MxGateway.Tests -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Tests/bin/Debug/net10.0/ZB.MOM.WW.MxGateway.Tests.dll
|
||||
Test run for /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Tests/bin/Debug/net10.0/ZB.MOM.WW.MxGateway.Tests.dll (.NETCoreApp,Version=v10.0)
|
||||
A total of 1 test files matched the specified pattern.
|
||||
|
||||
Passed! - Failed: 0, Passed: 6, Skipped: 0, Total: 6, Duration: 26 ms - ZB.MOM.WW.MxGateway.Tests.dll (net10.0)
|
||||
@@ -0,0 +1,21 @@
|
||||
ZB.MOM.WW.MxGateway.Contracts -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Contracts/bin/Debug/net10.0/ZB.MOM.WW.MxGateway.Contracts.dll
|
||||
ZB.MOM.WW.MxGateway.Server -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Server/bin/Debug/net10.0/ZB.MOM.WW.MxGateway.Server.dll
|
||||
ZB.MOM.WW.MxGateway.Tests -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Tests/bin/Debug/net10.0/ZB.MOM.WW.MxGateway.Tests.dll
|
||||
Test run for /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Tests/bin/Debug/net10.0/ZB.MOM.WW.MxGateway.Tests.dll (.NETCoreApp,Version=v10.0)
|
||||
A total of 1 test files matched the specified pattern.
|
||||
[xUnit.net 00:00:00.39] ZB.MOM.WW.MxGateway.Tests.Configuration.GatewayConfigPathSpellingTests.OrdinaryLocalShareToContentRoot_IsInsideOnWindows [SKIP]
|
||||
[xUnit.net 00:00:00.39] ZB.MOM.WW.MxGateway.Tests.Configuration.GatewayConfigPathSpellingTests.DevicePrefixedAndLoopbackShareSpellings_AreInsideOnWindows [SKIP]
|
||||
Skipped ZB.MOM.WW.MxGateway.Tests.Configuration.GatewayConfigPathSpellingTests.OrdinaryLocalShareToContentRoot_IsInsideOnWindows [1 ms]
|
||||
Skipped ZB.MOM.WW.MxGateway.Tests.Configuration.GatewayConfigPathSpellingTests.DevicePrefixedAndLoopbackShareSpellings_AreInsideOnWindows [1 ms]
|
||||
[xUnit.net 00:00:00.39] ZB.MOM.WW.MxGateway.Tests.Configuration.GatewayConfigPathSpellingTests.ShortNameSpelling_IsInsideOnWindows [SKIP]
|
||||
[xUnit.net 00:00:00.39] ZB.MOM.WW.MxGateway.Tests.Configuration.GatewayConfigPathSpellingTests.DriveAndRootRelativePaths_AreNotAbsoluteOnWindows [SKIP]
|
||||
Skipped ZB.MOM.WW.MxGateway.Tests.Configuration.GatewayConfigPathSpellingTests.ShortNameSpelling_IsInsideOnWindows [1 ms]
|
||||
Skipped ZB.MOM.WW.MxGateway.Tests.Configuration.GatewayConfigPathSpellingTests.DriveAndRootRelativePaths_AreNotAbsoluteOnWindows [1 ms]
|
||||
[xUnit.net 00:00:00.41] ZB.MOM.WW.MxGateway.Tests.Gateway.Sessions.WorkerPipeSecurityTests.CreatePipe_OnWindows_AppliesCurrentUserOnlyAcl [SKIP]
|
||||
[xUnit.net 00:00:00.41] ZB.MOM.WW.MxGateway.Tests.Gateway.Sessions.WorkerPipeSecurityTests.Create_GrantsOnlyTheUser [SKIP]
|
||||
Skipped ZB.MOM.WW.MxGateway.Tests.Gateway.Sessions.WorkerPipeSecurityTests.CreatePipe_OnWindows_AppliesCurrentUserOnlyAcl [1 ms]
|
||||
Skipped ZB.MOM.WW.MxGateway.Tests.Gateway.Sessions.WorkerPipeSecurityTests.Create_GrantsOnlyTheUser [1 ms]
|
||||
WARNING: Overwriting results file: /tmp/mx-final-results/mx-final.trx
|
||||
Results File: /tmp/mx-final-results/mx-final.trx
|
||||
|
||||
Passed! - Failed: 0, Passed: 1460, Skipped: 6, Total: 1466, Duration: 47 s - ZB.MOM.WW.MxGateway.Tests.dll (net10.0)
|
||||
@@ -0,0 +1,86 @@
|
||||
[
|
||||
{
|
||||
"route": "/",
|
||||
"title": "MXAccess Gateway \u2014 Overview",
|
||||
"principal": "admin",
|
||||
"width": 1440,
|
||||
"active": "/"
|
||||
},
|
||||
{
|
||||
"route": "/browse",
|
||||
"title": "MXAccess Gateway \u2014 Browse",
|
||||
"principal": "admin",
|
||||
"width": 1440,
|
||||
"active": "/browse"
|
||||
},
|
||||
{
|
||||
"route": "/apikeys",
|
||||
"title": "MXAccess Gateway \u2014 API keys",
|
||||
"principal": "admin",
|
||||
"width": 1440,
|
||||
"active": "/apikeys"
|
||||
},
|
||||
{
|
||||
"route": "/",
|
||||
"title": "MXAccess Gateway \u2014 Overview",
|
||||
"principal": "viewer",
|
||||
"width": 1440,
|
||||
"active": "/"
|
||||
},
|
||||
{
|
||||
"route": "/browse",
|
||||
"title": "MXAccess Gateway \u2014 Browse",
|
||||
"principal": "viewer",
|
||||
"width": 1440,
|
||||
"active": "/browse"
|
||||
},
|
||||
{
|
||||
"route": "/apikeys",
|
||||
"title": "MXAccess Gateway \u2014 API keys",
|
||||
"principal": "viewer",
|
||||
"width": 1440,
|
||||
"active": "/apikeys"
|
||||
},
|
||||
{
|
||||
"route": "/",
|
||||
"title": "MXAccess Gateway \u2014 Overview",
|
||||
"principal": "admin",
|
||||
"width": 390,
|
||||
"active": "/"
|
||||
},
|
||||
{
|
||||
"route": "/browse",
|
||||
"title": "MXAccess Gateway \u2014 Browse",
|
||||
"principal": "admin",
|
||||
"width": 390,
|
||||
"active": "/browse"
|
||||
},
|
||||
{
|
||||
"route": "/apikeys",
|
||||
"title": "MXAccess Gateway \u2014 API keys",
|
||||
"principal": "admin",
|
||||
"width": 390,
|
||||
"active": "/apikeys"
|
||||
},
|
||||
{
|
||||
"route": "/",
|
||||
"title": "MXAccess Gateway \u2014 Overview",
|
||||
"principal": "viewer",
|
||||
"width": 390,
|
||||
"active": "/"
|
||||
},
|
||||
{
|
||||
"route": "/browse",
|
||||
"title": "MXAccess Gateway \u2014 Browse",
|
||||
"principal": "viewer",
|
||||
"width": 390,
|
||||
"active": "/browse"
|
||||
},
|
||||
{
|
||||
"route": "/apikeys",
|
||||
"title": "MXAccess Gateway \u2014 API keys",
|
||||
"principal": "viewer",
|
||||
"width": 390,
|
||||
"active": "/apikeys"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"zb.mom.ww.secrets.ui": {
|
||||
"version": "1.0.1",
|
||||
"sha256": "cd0efe497b2efa7acb61e634b727e802e883700d7c63681f895bcc4d0c6b816a",
|
||||
"source": "https://gitea.dohertylan.com/api/packages/dohertj2/nuget/index.json"
|
||||
},
|
||||
"zb.mom.ww.secrets.abstractions": {
|
||||
"version": "0.6.6",
|
||||
"sha256": "5cb0386469638bda89eb6c9afa25ead397b86730c3c5e43e4e496269d316acdc",
|
||||
"source": "https://gitea.dohertylan.com/api/packages/dohertj2/nuget/index.json"
|
||||
},
|
||||
"zb.mom.ww.theme": {
|
||||
"version": "1.0.1",
|
||||
"sha256": "995b117b0245577598c91404ed7957c071ebe3413696c8be48b419c9deb1bd5d",
|
||||
"source": "https://gitea.dohertylan.com/api/packages/dohertj2/nuget/index.json"
|
||||
},
|
||||
"corePackagePreserved": "ZB.MOM.WW.Secrets/0.6.2",
|
||||
"testPackagesInProductionGraph": false
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
ZB.MOM.WW.MxGateway.Contracts -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Contracts/bin/Debug/net10.0/ZB.MOM.WW.MxGateway.Contracts.dll
|
||||
ZB.MOM.WW.MxGateway.Server -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Server/bin/Debug/net10.0/ZB.MOM.WW.MxGateway.Server.dll
|
||||
ZB.MOM.WW.MxGateway.Tests -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Tests/bin/Debug/net10.0/ZB.MOM.WW.MxGateway.Tests.dll
|
||||
Test run for /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Tests/bin/Debug/net10.0/ZB.MOM.WW.MxGateway.Tests.dll (.NETCoreApp,Version=v10.0)
|
||||
A total of 1 test files matched the specified pattern.
|
||||
[xUnit.net 00:00:00.49] ZB.MOM.WW.MxGateway.Tests.Gateway.Sessions.WorkerPipeSecurityTests.CreatePipe_OnWindows_AppliesCurrentUserOnlyAcl [SKIP]
|
||||
[xUnit.net 00:00:00.49] ZB.MOM.WW.MxGateway.Tests.Gateway.Sessions.WorkerPipeSecurityTests.Create_GrantsOnlyTheUser [SKIP]
|
||||
Skipped ZB.MOM.WW.MxGateway.Tests.Gateway.Sessions.WorkerPipeSecurityTests.CreatePipe_OnWindows_AppliesCurrentUserOnlyAcl [1 ms]
|
||||
Skipped ZB.MOM.WW.MxGateway.Tests.Gateway.Sessions.WorkerPipeSecurityTests.Create_GrantsOnlyTheUser [1 ms]
|
||||
[xUnit.net 00:00:00.80] ZB.MOM.WW.MxGateway.Tests.Configuration.GatewayConfigPathSpellingTests.OrdinaryLocalShareToContentRoot_IsInsideOnWindows [SKIP]
|
||||
[xUnit.net 00:00:00.80] ZB.MOM.WW.MxGateway.Tests.Configuration.GatewayConfigPathSpellingTests.DevicePrefixedAndLoopbackShareSpellings_AreInsideOnWindows [SKIP]
|
||||
Skipped ZB.MOM.WW.MxGateway.Tests.Configuration.GatewayConfigPathSpellingTests.OrdinaryLocalShareToContentRoot_IsInsideOnWindows [1 ms]
|
||||
Skipped ZB.MOM.WW.MxGateway.Tests.Configuration.GatewayConfigPathSpellingTests.DevicePrefixedAndLoopbackShareSpellings_AreInsideOnWindows [1 ms]
|
||||
[xUnit.net 00:00:00.81] ZB.MOM.WW.MxGateway.Tests.Configuration.GatewayConfigPathSpellingTests.ShortNameSpelling_IsInsideOnWindows [SKIP]
|
||||
[xUnit.net 00:00:00.81] ZB.MOM.WW.MxGateway.Tests.Configuration.GatewayConfigPathSpellingTests.DriveAndRootRelativePaths_AreNotAbsoluteOnWindows [SKIP]
|
||||
Skipped ZB.MOM.WW.MxGateway.Tests.Configuration.GatewayConfigPathSpellingTests.ShortNameSpelling_IsInsideOnWindows [1 ms]
|
||||
Skipped ZB.MOM.WW.MxGateway.Tests.Configuration.GatewayConfigPathSpellingTests.DriveAndRootRelativePaths_AreNotAbsoluteOnWindows [1 ms]
|
||||
Results File: /tmp/mx-final-results/mx-final.trx
|
||||
|
||||
Passed! - Failed: 0, Passed: 1458, Skipped: 6, Total: 1464, Duration: 47 s - ZB.MOM.WW.MxGateway.Tests.dll (net10.0)
|
||||
@@ -0,0 +1,11 @@
|
||||
ZB.MOM.WW.MxGateway.Contracts -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Contracts/bin/Debug/net48/ZB.MOM.WW.MxGateway.Contracts.dll
|
||||
ZB.MOM.WW.MxGateway.Contracts -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Contracts/bin/Debug/net10.0/ZB.MOM.WW.MxGateway.Contracts.dll
|
||||
ZB.MOM.WW.MxGateway.Server -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Server/bin/Debug/net10.0/ZB.MOM.WW.MxGateway.Server.dll
|
||||
ZB.MOM.WW.MxGateway.Tests -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Tests/bin/Debug/net10.0/ZB.MOM.WW.MxGateway.Tests.dll
|
||||
ZB.MOM.WW.MxGateway.IntegrationTests -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.IntegrationTests/bin/Debug/net10.0/ZB.MOM.WW.MxGateway.IntegrationTests.dll
|
||||
|
||||
Build succeeded.
|
||||
0 Warning(s)
|
||||
0 Error(s)
|
||||
|
||||
Time Elapsed 00:00:01.61
|
||||
@@ -0,0 +1,59 @@
|
||||
[
|
||||
{
|
||||
"runtimeAssembly": "ZB.MOM.WW.Theme",
|
||||
"version": "1.0.1",
|
||||
"bytesMatchOfficialPackage": true
|
||||
},
|
||||
{
|
||||
"asset": "css/theme.css",
|
||||
"package": "ZB.MOM.WW.Theme",
|
||||
"http": 200,
|
||||
"sha256": "7a6da7aefcf036f971f18816e3ceb129f1abb4a39f6db33d449420b814cfb4a6"
|
||||
},
|
||||
{
|
||||
"asset": "css/layout.css",
|
||||
"package": "ZB.MOM.WW.Theme",
|
||||
"http": 200,
|
||||
"sha256": "1a4960c5552110f9d1521621816117e6496646b55d919c85f3a815ae98e3a781"
|
||||
},
|
||||
{
|
||||
"asset": "fonts/ibm-plex-sans-400.woff2",
|
||||
"package": "ZB.MOM.WW.Theme",
|
||||
"http": 200,
|
||||
"sha256": "db71f8a28ad8501544fb4e7668e3c6d0b731760b6f20de3525ebaeba597f1922"
|
||||
},
|
||||
{
|
||||
"asset": "fonts/ibm-plex-sans-600.woff2",
|
||||
"package": "ZB.MOM.WW.Theme",
|
||||
"http": 200,
|
||||
"sha256": "31535a91ce3f6b8ed3ddedadab1e49957e2220263a640df1a3f14f6fdfe15eb6"
|
||||
},
|
||||
{
|
||||
"asset": "fonts/ibm-plex-mono-500.woff2",
|
||||
"package": "ZB.MOM.WW.Theme",
|
||||
"http": 200,
|
||||
"sha256": "756026ff72eb76fd971ac4b7504cec55eef62109d2684c2cad8da32170b80b37"
|
||||
},
|
||||
{
|
||||
"runtimeAssembly": "ZB.MOM.WW.Secrets.Ui",
|
||||
"version": "1.0.1",
|
||||
"bytesMatchOfficialPackage": true
|
||||
},
|
||||
{
|
||||
"asset": "js/secrets-dialog.js",
|
||||
"package": "ZB.MOM.WW.Secrets.Ui",
|
||||
"http": 200,
|
||||
"sha256": "1c6ff0ebae1d9d1581e88fc8d2a374b35a27713941cf42782548b76e6a988e24"
|
||||
},
|
||||
{
|
||||
"asset": "js/secrets-reveal.js",
|
||||
"package": "ZB.MOM.WW.Secrets.Ui",
|
||||
"http": 200,
|
||||
"sha256": "7d5dd46f1add9e1c52556d6005d0049db2b4ac049ca94c5ee01966e05cf53246"
|
||||
},
|
||||
{
|
||||
"runtimeAssembly": "ZB.MOM.WW.Secrets.Abstractions",
|
||||
"version": "0.6.6",
|
||||
"bytesMatchOfficialPackage": true
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,11 @@
|
||||
ZB.MOM.WW.MxGateway.Contracts -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Contracts/bin/Debug/net48/ZB.MOM.WW.MxGateway.Contracts.dll
|
||||
ZB.MOM.WW.MxGateway.Contracts -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Contracts/bin/Debug/net10.0/ZB.MOM.WW.MxGateway.Contracts.dll
|
||||
ZB.MOM.WW.MxGateway.Server -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Server/bin/Debug/net10.0/ZB.MOM.WW.MxGateway.Server.dll
|
||||
ZB.MOM.WW.MxGateway.IntegrationTests -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.IntegrationTests/bin/Debug/net10.0/ZB.MOM.WW.MxGateway.IntegrationTests.dll
|
||||
ZB.MOM.WW.MxGateway.Tests -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Tests/bin/Debug/net10.0/ZB.MOM.WW.MxGateway.Tests.dll
|
||||
|
||||
Build succeeded.
|
||||
0 Warning(s)
|
||||
0 Error(s)
|
||||
|
||||
Time Elapsed 00:00:01.59
|
||||
@@ -0,0 +1,7 @@
|
||||
ZB.MOM.WW.MxGateway.Contracts -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Contracts/bin/Debug/net10.0/ZB.MOM.WW.MxGateway.Contracts.dll
|
||||
ZB.MOM.WW.MxGateway.Server -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Server/bin/Debug/net10.0/ZB.MOM.WW.MxGateway.Server.dll
|
||||
ZB.MOM.WW.MxGateway.Tests -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Tests/bin/Debug/net10.0/ZB.MOM.WW.MxGateway.Tests.dll
|
||||
Test run for /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Tests/bin/Debug/net10.0/ZB.MOM.WW.MxGateway.Tests.dll (.NETCoreApp,Version=v10.0)
|
||||
A total of 1 test files matched the specified pattern.
|
||||
|
||||
Passed! - Failed: 0, Passed: 9, Skipped: 0, Total: 9, Duration: 32 ms - ZB.MOM.WW.MxGateway.Tests.dll (net10.0)
|
||||
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"cases": 9,
|
||||
"overflow": [],
|
||||
"firstViewportMessages": [
|
||||
[
|
||||
"mixed",
|
||||
1440,
|
||||
{
|
||||
"x": 924,
|
||||
"y": 160.734375,
|
||||
"width": 480.609375,
|
||||
"withinFirstViewport": true
|
||||
}
|
||||
],
|
||||
[
|
||||
"mixed",
|
||||
390,
|
||||
{
|
||||
"x": 450.1875,
|
||||
"y": 237.84375,
|
||||
"width": 333,
|
||||
"withinFirstViewport": false
|
||||
}
|
||||
],
|
||||
[
|
||||
"mixed",
|
||||
720,
|
||||
{
|
||||
"x": 456.578125,
|
||||
"y": 204.234375,
|
||||
"width": 333.0078125,
|
||||
"withinFirstViewport": false
|
||||
}
|
||||
]
|
||||
],
|
||||
"errors": []
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"cases": 9,
|
||||
"overflow": [],
|
||||
"firstViewportMessages": [
|
||||
[
|
||||
"mixed",
|
||||
1440,
|
||||
{
|
||||
"x": 255.390625,
|
||||
"y": 147.109375,
|
||||
"width": 1149.21875,
|
||||
"withinFirstViewport": true
|
||||
}
|
||||
],
|
||||
[
|
||||
"mixed",
|
||||
390,
|
||||
{
|
||||
"x": 28.984375,
|
||||
"y": 224.21875,
|
||||
"width": 332.03125,
|
||||
"withinFirstViewport": true
|
||||
}
|
||||
],
|
||||
[
|
||||
"mixed",
|
||||
720,
|
||||
{
|
||||
"x": 35.3984375,
|
||||
"y": 190.6171875,
|
||||
"width": 649.203125,
|
||||
"withinFirstViewport": true
|
||||
}
|
||||
]
|
||||
],
|
||||
"errors": []
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
Determining projects to restore...
|
||||
All projects are up-to-date for restore.
|
||||
ZB.MOM.WW.MxGateway.Contracts -> /tmp/mx-ui-overview-artifacts/bin/ZB.MOM.WW.MxGateway.Contracts/release_net10.0/ZB.MOM.WW.MxGateway.Contracts.dll
|
||||
ZB.MOM.WW.MxGateway.Server -> /tmp/mx-ui-overview-artifacts/bin/ZB.MOM.WW.MxGateway.Server/release/ZB.MOM.WW.MxGateway.Server.dll
|
||||
MxUiCanary -> /tmp/mx-ui-overview-artifacts/bin/MxUiCanary/release/MxUiCanary.dll
|
||||
|
||||
Build succeeded.
|
||||
0 Warning(s)
|
||||
0 Error(s)
|
||||
|
||||
Time Elapsed 00:00:00.99
|
||||
@@ -0,0 +1,9 @@
|
||||
Determining projects to restore...
|
||||
All projects are up-to-date for restore.
|
||||
ZB.MOM.WW.MxGateway.Contracts -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Contracts/bin/Release/net10.0/ZB.MOM.WW.MxGateway.Contracts.dll
|
||||
ZB.MOM.WW.MxGateway.Server -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Server/bin/Release/net10.0/ZB.MOM.WW.MxGateway.Server.dll
|
||||
ZB.MOM.WW.MxGateway.Tests -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Tests/bin/Release/net10.0/ZB.MOM.WW.MxGateway.Tests.dll
|
||||
Test run for /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Tests/bin/Release/net10.0/ZB.MOM.WW.MxGateway.Tests.dll (.NETCoreApp,Version=v10.0)
|
||||
A total of 1 test files matched the specified pattern.
|
||||
|
||||
Passed! - Failed: 0, Passed: 3, Skipped: 0, Total: 3, Duration: 62 ms - ZB.MOM.WW.MxGateway.Tests.dll (net10.0)
|
||||
@@ -0,0 +1,27 @@
|
||||
Determining projects to restore...
|
||||
All projects are up-to-date for restore.
|
||||
ZB.MOM.WW.MxGateway.Contracts -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Contracts/bin/Release/net10.0/ZB.MOM.WW.MxGateway.Contracts.dll
|
||||
ZB.MOM.WW.MxGateway.Server -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Server/bin/Release/net10.0/ZB.MOM.WW.MxGateway.Server.dll
|
||||
ZB.MOM.WW.MxGateway.Tests -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Tests/bin/Release/net10.0/ZB.MOM.WW.MxGateway.Tests.dll
|
||||
Test run for /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Tests/bin/Release/net10.0/ZB.MOM.WW.MxGateway.Tests.dll (.NETCoreApp,Version=v10.0)
|
||||
A total of 1 test files matched the specified pattern.
|
||||
[xUnit.net 00:00:00.21] ZB.MOM.WW.MxGateway.Tests.Dashboard.DashboardHomeRenderTests.LongFault_HasKeyboardDisclosureAndEscapedCompleteDiagnostic [FAIL]
|
||||
[xUnit.net 00:00:00.21] ZB.MOM.WW.MxGateway.Tests.Dashboard.DashboardHomeRenderTests.FaultSnapshot_LeadsWithActionableFaultAndPreservesAllCounters [FAIL]
|
||||
Failed ZB.MOM.WW.MxGateway.Tests.Dashboard.DashboardHomeRenderTests.LongFault_HasKeyboardDisclosureAndEscapedCompleteDiagnostic [2 ms]
|
||||
Error Message:
|
||||
Assert.Contains() Failure: Sub-string not found
|
||||
String: "<div class="dashboard-page-header"><div><"···
|
||||
Not found: "<details class="fault-diagnostic""
|
||||
Stack Trace:
|
||||
at ZB.MOM.WW.MxGateway.Tests.Dashboard.DashboardHomeRenderTests.LongFault_HasKeyboardDisclosureAndEscapedCompleteDiagnostic() in /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Tests/Dashboard/DashboardHomeRenderTests.cs:line 38
|
||||
--- End of stack trace from previous location ---
|
||||
Failed ZB.MOM.WW.MxGateway.Tests.Dashboard.DashboardHomeRenderTests.FaultSnapshot_LeadsWithActionableFaultAndPreservesAllCounters [< 1 ms]
|
||||
Error Message:
|
||||
Assert.Contains() Failure: Sub-string not found
|
||||
String: "<div class="dashboard-page-header"><div><"···
|
||||
Not found: "href="sessions/fixture-session""
|
||||
Stack Trace:
|
||||
at ZB.MOM.WW.MxGateway.Tests.Dashboard.DashboardHomeRenderTests.FaultSnapshot_LeadsWithActionableFaultAndPreservesAllCounters() in /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Tests/Dashboard/DashboardHomeRenderTests.cs:line 21
|
||||
--- End of stack trace from previous location ---
|
||||
|
||||
Failed! - Failed: 2, Passed: 1, Skipped: 0, Total: 3, Duration: 40 ms - ZB.MOM.WW.MxGateway.Tests.dll (net10.0)
|
||||
@@ -0,0 +1,30 @@
|
||||
Traceback (most recent call last):
|
||||
File "/Users/dohertj2/Desktop/MxAccessGateway/docs/ui-validation/final_browser.py", line 16, in <module>
|
||||
before=page.request.get(BASE+'/fixtures/browse-counts').json()['attempts'];page.request.post(BASE+'/fixtures/fail-next-browse');page.get_by_role('button',name='Expand Pump01',exact=True).click();retry=page.get_by_role('button',name='Retry loading Pump01',exact=True);retry.wait_for()
|
||||
~~~~~~~~~~~~~~^^
|
||||
File "/opt/homebrew/lib/python3.14/site-packages/playwright/sync_api/_generated.py", line 18074, in wait_for
|
||||
self._sync(self._impl_obj.wait_for(timeout=timeout, state=state))
|
||||
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
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/_locator.py", line 710, in wait_for
|
||||
await self._frame.wait_for_selector(
|
||||
self._selector, strict=True, timeout=timeout, state=state
|
||||
)
|
||||
File "/opt/homebrew/lib/python3.14/site-packages/playwright/_impl/_frame.py", line 369, in wait_for_selector
|
||||
await self._channel.send(
|
||||
"waitForSelector", self._timeout, locals_to_params(locals())
|
||||
)
|
||||
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.TimeoutError: Locator.wait_for: Timeout 30000ms exceeded.
|
||||
Call log:
|
||||
- waiting for get_by_role("button", name="Retry loading Pump01", exact=True) to be visible
|
||||
|
||||
|
After Width: | Height: | Size: 79 KiB |
|
After Width: | Height: | Size: 85 KiB |
|
After Width: | Height: | Size: 114 KiB |
|
After Width: | Height: | Size: 63 KiB |
@@ -0,0 +1,274 @@
|
||||
{
|
||||
"cases": [
|
||||
{
|
||||
"case": "retry",
|
||||
"width": 1440,
|
||||
"dpr": 1,
|
||||
"attemptDelta": 2,
|
||||
"watchRetained": true,
|
||||
"focusStable": true
|
||||
},
|
||||
{
|
||||
"case": "navigation",
|
||||
"principal": "admin",
|
||||
"width": 1440,
|
||||
"hrefs": [
|
||||
"/",
|
||||
"/sessions",
|
||||
"/workers",
|
||||
"/events",
|
||||
"/alarms",
|
||||
"/galaxy",
|
||||
"/browse",
|
||||
"/apikeys",
|
||||
"/admin/secrets",
|
||||
"/settings"
|
||||
],
|
||||
"footerKeyboardReachable": true
|
||||
},
|
||||
{
|
||||
"case": "navigation",
|
||||
"principal": "viewer",
|
||||
"width": 1440,
|
||||
"hrefs": [
|
||||
"/",
|
||||
"/sessions",
|
||||
"/workers",
|
||||
"/events",
|
||||
"/alarms",
|
||||
"/galaxy",
|
||||
"/browse",
|
||||
"/apikeys",
|
||||
"/settings"
|
||||
],
|
||||
"footerKeyboardReachable": true
|
||||
},
|
||||
{
|
||||
"case": "navigation",
|
||||
"principal": "anonymous",
|
||||
"width": 1440,
|
||||
"hrefs": [
|
||||
"/",
|
||||
"/sessions",
|
||||
"/workers",
|
||||
"/events",
|
||||
"/galaxy",
|
||||
"/browse",
|
||||
"/apikeys",
|
||||
"/settings",
|
||||
"/login"
|
||||
],
|
||||
"footerKeyboardReachable": true
|
||||
},
|
||||
{
|
||||
"case": "retry",
|
||||
"width": 1024,
|
||||
"dpr": 1,
|
||||
"attemptDelta": 2,
|
||||
"watchRetained": true,
|
||||
"focusStable": true
|
||||
},
|
||||
{
|
||||
"case": "navigation",
|
||||
"principal": "admin",
|
||||
"width": 1024,
|
||||
"hrefs": [
|
||||
"/",
|
||||
"/sessions",
|
||||
"/workers",
|
||||
"/events",
|
||||
"/alarms",
|
||||
"/galaxy",
|
||||
"/browse",
|
||||
"/apikeys",
|
||||
"/admin/secrets",
|
||||
"/settings"
|
||||
],
|
||||
"footerKeyboardReachable": true
|
||||
},
|
||||
{
|
||||
"case": "navigation",
|
||||
"principal": "viewer",
|
||||
"width": 1024,
|
||||
"hrefs": [
|
||||
"/",
|
||||
"/sessions",
|
||||
"/workers",
|
||||
"/events",
|
||||
"/alarms",
|
||||
"/galaxy",
|
||||
"/browse",
|
||||
"/apikeys",
|
||||
"/settings"
|
||||
],
|
||||
"footerKeyboardReachable": true
|
||||
},
|
||||
{
|
||||
"case": "navigation",
|
||||
"principal": "anonymous",
|
||||
"width": 1024,
|
||||
"hrefs": [
|
||||
"/",
|
||||
"/sessions",
|
||||
"/workers",
|
||||
"/events",
|
||||
"/galaxy",
|
||||
"/browse",
|
||||
"/apikeys",
|
||||
"/settings",
|
||||
"/login"
|
||||
],
|
||||
"footerKeyboardReachable": true
|
||||
},
|
||||
{
|
||||
"case": "retry",
|
||||
"width": 390,
|
||||
"dpr": 1,
|
||||
"attemptDelta": 2,
|
||||
"watchRetained": true,
|
||||
"focusStable": true
|
||||
},
|
||||
{
|
||||
"case": "navigation",
|
||||
"principal": "admin",
|
||||
"width": 390,
|
||||
"hrefs": [
|
||||
"/",
|
||||
"/sessions",
|
||||
"/workers",
|
||||
"/events",
|
||||
"/alarms",
|
||||
"/galaxy",
|
||||
"/browse",
|
||||
"/apikeys",
|
||||
"/admin/secrets",
|
||||
"/settings"
|
||||
],
|
||||
"footerKeyboardReachable": true
|
||||
},
|
||||
{
|
||||
"case": "navigation",
|
||||
"principal": "viewer",
|
||||
"width": 390,
|
||||
"hrefs": [
|
||||
"/",
|
||||
"/sessions",
|
||||
"/workers",
|
||||
"/events",
|
||||
"/alarms",
|
||||
"/galaxy",
|
||||
"/browse",
|
||||
"/apikeys",
|
||||
"/settings"
|
||||
],
|
||||
"footerKeyboardReachable": true
|
||||
},
|
||||
{
|
||||
"case": "navigation",
|
||||
"principal": "anonymous",
|
||||
"width": 390,
|
||||
"hrefs": [
|
||||
"/",
|
||||
"/sessions",
|
||||
"/workers",
|
||||
"/events",
|
||||
"/galaxy",
|
||||
"/browse",
|
||||
"/apikeys",
|
||||
"/settings",
|
||||
"/login"
|
||||
],
|
||||
"footerKeyboardReachable": true
|
||||
},
|
||||
{
|
||||
"case": "retry",
|
||||
"width": 720,
|
||||
"dpr": 2,
|
||||
"attemptDelta": 2,
|
||||
"watchRetained": true,
|
||||
"focusStable": true
|
||||
},
|
||||
{
|
||||
"case": "navigation",
|
||||
"principal": "admin",
|
||||
"width": 720,
|
||||
"hrefs": [
|
||||
"/",
|
||||
"/sessions",
|
||||
"/workers",
|
||||
"/events",
|
||||
"/alarms",
|
||||
"/galaxy",
|
||||
"/browse",
|
||||
"/apikeys",
|
||||
"/admin/secrets",
|
||||
"/settings"
|
||||
],
|
||||
"footerKeyboardReachable": true
|
||||
},
|
||||
{
|
||||
"case": "navigation",
|
||||
"principal": "viewer",
|
||||
"width": 720,
|
||||
"hrefs": [
|
||||
"/",
|
||||
"/sessions",
|
||||
"/workers",
|
||||
"/events",
|
||||
"/alarms",
|
||||
"/galaxy",
|
||||
"/browse",
|
||||
"/apikeys",
|
||||
"/settings"
|
||||
],
|
||||
"footerKeyboardReachable": true
|
||||
},
|
||||
{
|
||||
"case": "navigation",
|
||||
"principal": "anonymous",
|
||||
"width": 720,
|
||||
"hrefs": [
|
||||
"/",
|
||||
"/sessions",
|
||||
"/workers",
|
||||
"/events",
|
||||
"/galaxy",
|
||||
"/browse",
|
||||
"/apikeys",
|
||||
"/settings",
|
||||
"/login"
|
||||
],
|
||||
"footerKeyboardReachable": true
|
||||
},
|
||||
{
|
||||
"case": "reduced-motion",
|
||||
"elements": [
|
||||
{
|
||||
"animation": "none",
|
||||
"opacity": "1"
|
||||
},
|
||||
{
|
||||
"animation": "none",
|
||||
"opacity": "1"
|
||||
},
|
||||
{
|
||||
"animation": "none",
|
||||
"opacity": "1"
|
||||
},
|
||||
{
|
||||
"animation": "none",
|
||||
"opacity": "1"
|
||||
},
|
||||
{
|
||||
"animation": "none",
|
||||
"opacity": "1"
|
||||
},
|
||||
{
|
||||
"animation": "none",
|
||||
"opacity": "1"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"errors": []
|
||||
}
|
||||
|
After Width: | Height: | Size: 68 KiB |
|
After Width: | Height: | Size: 68 KiB |
@@ -0,0 +1,78 @@
|
||||
{
|
||||
"withLocalPrimary": {
|
||||
"normal": {
|
||||
"color": "rgb(255, 255, 255)",
|
||||
"backgroundColor": "rgb(47, 95, 208)",
|
||||
"borderColor": "rgb(47, 95, 208)",
|
||||
"outlineColor": "rgb(255, 255, 255)",
|
||||
"outlineWidth": "0px",
|
||||
"boxShadow": "none",
|
||||
"opacity": "1"
|
||||
},
|
||||
"hover": {
|
||||
"color": "rgb(255, 255, 255)",
|
||||
"backgroundColor": "rgb(30, 63, 153)",
|
||||
"borderColor": "rgb(30, 63, 153)",
|
||||
"outlineColor": "rgb(255, 255, 255)",
|
||||
"outlineWidth": "0px",
|
||||
"boxShadow": "none",
|
||||
"opacity": "1"
|
||||
},
|
||||
"focus": {
|
||||
"color": "rgb(255, 255, 255)",
|
||||
"backgroundColor": "rgb(30, 63, 153)",
|
||||
"borderColor": "rgb(30, 63, 153)",
|
||||
"outlineColor": "rgb(30, 63, 153)",
|
||||
"outlineWidth": "2px",
|
||||
"boxShadow": "none",
|
||||
"opacity": "1"
|
||||
},
|
||||
"disabled": {
|
||||
"color": "rgb(255, 255, 255)",
|
||||
"backgroundColor": "rgb(47, 95, 208)",
|
||||
"borderColor": "rgb(47, 95, 208)",
|
||||
"outlineColor": "rgb(255, 255, 255)",
|
||||
"outlineWidth": "0px",
|
||||
"boxShadow": "none",
|
||||
"opacity": "0.65"
|
||||
}
|
||||
},
|
||||
"withoutLocalPrimary": {
|
||||
"normal": {
|
||||
"color": "rgb(255, 255, 255)",
|
||||
"backgroundColor": "rgb(47, 95, 208)",
|
||||
"borderColor": "rgb(47, 95, 208)",
|
||||
"outlineColor": "rgb(255, 255, 255)",
|
||||
"outlineWidth": "0px",
|
||||
"boxShadow": "none",
|
||||
"opacity": "1"
|
||||
},
|
||||
"hover": {
|
||||
"color": "rgb(255, 255, 255)",
|
||||
"backgroundColor": "rgb(30, 63, 153)",
|
||||
"borderColor": "rgb(30, 63, 153)",
|
||||
"outlineColor": "rgb(255, 255, 255)",
|
||||
"outlineWidth": "0px",
|
||||
"boxShadow": "none",
|
||||
"opacity": "1"
|
||||
},
|
||||
"focus": {
|
||||
"color": "rgb(255, 255, 255)",
|
||||
"backgroundColor": "rgb(30, 63, 153)",
|
||||
"borderColor": "rgb(30, 63, 153)",
|
||||
"outlineColor": "rgb(30, 63, 153)",
|
||||
"outlineWidth": "2px",
|
||||
"boxShadow": "none",
|
||||
"opacity": "1"
|
||||
},
|
||||
"disabled": {
|
||||
"color": "rgb(255, 255, 255)",
|
||||
"backgroundColor": "rgb(47, 95, 208)",
|
||||
"borderColor": "rgb(47, 95, 208)",
|
||||
"outlineColor": "rgb(255, 255, 255)",
|
||||
"outlineWidth": "0px",
|
||||
"boxShadow": "none",
|
||||
"opacity": "0.65"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,282 @@
|
||||
{
|
||||
"before": {
|
||||
"texts": [
|
||||
{
|
||||
"text": "Good",
|
||||
"fg": "rgb(47, 158, 68)",
|
||||
"bg": "rgb(233, 246, 236)",
|
||||
"contrast": 3.0940123100031176
|
||||
},
|
||||
{
|
||||
"text": "Bad",
|
||||
"fg": "rgb(224, 49, 49)",
|
||||
"bg": "rgb(252, 234, 234)",
|
||||
"contrast": 3.889060446727155
|
||||
},
|
||||
{
|
||||
"text": "Active",
|
||||
"fg": "rgb(224, 49, 49)",
|
||||
"bg": "rgb(252, 234, 234)",
|
||||
"contrast": 3.889060446727155
|
||||
},
|
||||
{
|
||||
"text": "Acknowledged",
|
||||
"fg": "rgb(232, 146, 12)",
|
||||
"bg": "rgb(253, 241, 221)",
|
||||
"contrast": 2.1996593071409705
|
||||
},
|
||||
{
|
||||
"text": "Unknown",
|
||||
"fg": "rgb(134, 142, 150)",
|
||||
"bg": "rgb(238, 240, 242)",
|
||||
"contrast": 2.906981512371258
|
||||
},
|
||||
{
|
||||
"text": "Secondary text",
|
||||
"fg": "rgb(98, 105, 112)",
|
||||
"bg": "rgb(255, 255, 255)",
|
||||
"contrast": 5.564484353037145
|
||||
},
|
||||
{
|
||||
"text": "Success text",
|
||||
"fg": "rgb(35, 111, 52)",
|
||||
"bg": "rgb(255, 255, 255)",
|
||||
"contrast": 6.185881447238118
|
||||
},
|
||||
{
|
||||
"text": "Warning text",
|
||||
"fg": "rgb(133, 80, 0)",
|
||||
"bg": "rgb(255, 255, 255)",
|
||||
"contrast": 6.6777466698617465
|
||||
},
|
||||
{
|
||||
"text": "Danger text",
|
||||
"fg": "rgb(180, 33, 33)",
|
||||
"bg": "rgb(255, 255, 255)",
|
||||
"contrast": 6.603434368361208
|
||||
},
|
||||
{
|
||||
"text": "Information text",
|
||||
"fg": "rgb(30, 63, 153)",
|
||||
"bg": "rgb(255, 255, 255)",
|
||||
"contrast": 9.433165060131532
|
||||
},
|
||||
{
|
||||
"text": "Success notice",
|
||||
"fg": "rgb(47, 158, 68)",
|
||||
"bg": "rgb(233, 246, 236)",
|
||||
"contrast": 3.0940123100031176
|
||||
},
|
||||
{
|
||||
"text": "Error notice",
|
||||
"fg": "rgb(224, 49, 49)",
|
||||
"bg": "rgb(252, 234, 234)",
|
||||
"contrast": 3.889060446727155
|
||||
},
|
||||
{
|
||||
"text": "Information notice",
|
||||
"fg": "rgb(30, 63, 153)",
|
||||
"bg": "rgb(231, 236, 251)",
|
||||
"contrast": 7.990777005942016
|
||||
},
|
||||
{
|
||||
"text": "Warning notice",
|
||||
"fg": "rgb(133, 80, 0)",
|
||||
"bg": "rgb(253, 241, 221)",
|
||||
"contrast": 5.979044404341219
|
||||
}
|
||||
],
|
||||
"states": {
|
||||
"normal": {
|
||||
"fg": "rgb(255, 255, 255)",
|
||||
"bg": "rgb(47, 95, 208)",
|
||||
"border": "rgb(47, 95, 208)",
|
||||
"outline": "0px",
|
||||
"outlineColor": "rgb(255, 255, 255)",
|
||||
"disabled": false,
|
||||
"busy": "false"
|
||||
},
|
||||
"hover": {
|
||||
"fg": "rgb(255, 255, 255)",
|
||||
"bg": "rgb(30, 63, 153)",
|
||||
"border": "rgb(30, 63, 153)",
|
||||
"outline": "0px",
|
||||
"outlineColor": "rgb(255, 255, 255)",
|
||||
"disabled": false,
|
||||
"busy": "false"
|
||||
},
|
||||
"active": {
|
||||
"fg": "rgb(255, 255, 255)",
|
||||
"bg": "rgb(30, 63, 153)",
|
||||
"border": "rgb(30, 63, 153)",
|
||||
"outline": "0px",
|
||||
"outlineColor": "rgb(255, 255, 255)",
|
||||
"disabled": false,
|
||||
"busy": "false"
|
||||
},
|
||||
"pointerFocus": {
|
||||
"fg": "rgb(255, 255, 255)",
|
||||
"bg": "rgb(30, 63, 153)",
|
||||
"border": "rgb(30, 63, 153)",
|
||||
"outline": "0px",
|
||||
"outlineColor": "rgb(255, 255, 255)",
|
||||
"disabled": false,
|
||||
"busy": "false"
|
||||
},
|
||||
"focus": {
|
||||
"fg": "rgb(255, 255, 255)",
|
||||
"bg": "rgb(30, 63, 153)",
|
||||
"border": "rgb(30, 63, 153)",
|
||||
"outline": "2px",
|
||||
"outlineColor": "rgb(30, 63, 153)",
|
||||
"disabled": false,
|
||||
"busy": "false"
|
||||
}
|
||||
},
|
||||
"fieldFocus": {
|
||||
"outline": "2px",
|
||||
"color": "rgb(30, 63, 153)",
|
||||
"shadow": "rgba(0, 0, 0, 0) 0px 0px 0px 0px"
|
||||
}
|
||||
},
|
||||
"after": {
|
||||
"texts": [
|
||||
{
|
||||
"text": "Good",
|
||||
"fg": "rgb(35, 111, 52)",
|
||||
"bg": "rgb(233, 246, 236)",
|
||||
"contrast": 5.554998206317173
|
||||
},
|
||||
{
|
||||
"text": "Bad",
|
||||
"fg": "rgb(180, 33, 33)",
|
||||
"bg": "rgb(252, 234, 234)",
|
||||
"contrast": 5.6903741760936315
|
||||
},
|
||||
{
|
||||
"text": "Active",
|
||||
"fg": "rgb(180, 33, 33)",
|
||||
"bg": "rgb(252, 234, 234)",
|
||||
"contrast": 5.6903741760936315
|
||||
},
|
||||
{
|
||||
"text": "Acknowledged",
|
||||
"fg": "rgb(133, 80, 0)",
|
||||
"bg": "rgb(253, 241, 221)",
|
||||
"contrast": 5.979044404341219
|
||||
},
|
||||
{
|
||||
"text": "Unknown",
|
||||
"fg": "rgb(83, 93, 102)",
|
||||
"bg": "rgb(238, 240, 242)",
|
||||
"contrast": 5.881363117248676
|
||||
},
|
||||
{
|
||||
"text": "Secondary text",
|
||||
"fg": "rgb(98, 105, 112)",
|
||||
"bg": "rgb(255, 255, 255)",
|
||||
"contrast": 5.564484353037145
|
||||
},
|
||||
{
|
||||
"text": "Success text",
|
||||
"fg": "rgb(35, 111, 52)",
|
||||
"bg": "rgb(255, 255, 255)",
|
||||
"contrast": 6.185881447238118
|
||||
},
|
||||
{
|
||||
"text": "Warning text",
|
||||
"fg": "rgb(133, 80, 0)",
|
||||
"bg": "rgb(255, 255, 255)",
|
||||
"contrast": 6.6777466698617465
|
||||
},
|
||||
{
|
||||
"text": "Danger text",
|
||||
"fg": "rgb(180, 33, 33)",
|
||||
"bg": "rgb(255, 255, 255)",
|
||||
"contrast": 6.603434368361208
|
||||
},
|
||||
{
|
||||
"text": "Information text",
|
||||
"fg": "rgb(30, 63, 153)",
|
||||
"bg": "rgb(255, 255, 255)",
|
||||
"contrast": 9.433165060131532
|
||||
},
|
||||
{
|
||||
"text": "Success notice",
|
||||
"fg": "rgb(35, 111, 52)",
|
||||
"bg": "rgb(233, 246, 236)",
|
||||
"contrast": 5.554998206317173
|
||||
},
|
||||
{
|
||||
"text": "Error notice",
|
||||
"fg": "rgb(180, 33, 33)",
|
||||
"bg": "rgb(252, 234, 234)",
|
||||
"contrast": 5.6903741760936315
|
||||
},
|
||||
{
|
||||
"text": "Information notice",
|
||||
"fg": "rgb(30, 63, 153)",
|
||||
"bg": "rgb(231, 236, 251)",
|
||||
"contrast": 7.990777005942016
|
||||
},
|
||||
{
|
||||
"text": "Warning notice",
|
||||
"fg": "rgb(133, 80, 0)",
|
||||
"bg": "rgb(253, 241, 221)",
|
||||
"contrast": 5.979044404341219
|
||||
}
|
||||
],
|
||||
"states": {
|
||||
"normal": {
|
||||
"fg": "rgb(255, 255, 255)",
|
||||
"bg": "rgb(47, 95, 208)",
|
||||
"border": "rgb(47, 95, 208)",
|
||||
"outline": "0px",
|
||||
"outlineColor": "rgb(255, 255, 255)",
|
||||
"disabled": false,
|
||||
"busy": "false"
|
||||
},
|
||||
"hover": {
|
||||
"fg": "rgb(255, 255, 255)",
|
||||
"bg": "rgb(30, 63, 153)",
|
||||
"border": "rgb(30, 63, 153)",
|
||||
"outline": "0px",
|
||||
"outlineColor": "rgb(255, 255, 255)",
|
||||
"disabled": false,
|
||||
"busy": "false"
|
||||
},
|
||||
"active": {
|
||||
"fg": "rgb(255, 255, 255)",
|
||||
"bg": "rgb(30, 63, 153)",
|
||||
"border": "rgb(30, 63, 153)",
|
||||
"outline": "0px",
|
||||
"outlineColor": "rgb(255, 255, 255)",
|
||||
"disabled": false,
|
||||
"busy": "false"
|
||||
},
|
||||
"pointerFocus": {
|
||||
"fg": "rgb(255, 255, 255)",
|
||||
"bg": "rgb(30, 63, 153)",
|
||||
"border": "rgb(30, 63, 153)",
|
||||
"outline": "0px",
|
||||
"outlineColor": "rgb(255, 255, 255)",
|
||||
"disabled": false,
|
||||
"busy": "false"
|
||||
},
|
||||
"focus": {
|
||||
"fg": "rgb(255, 255, 255)",
|
||||
"bg": "rgb(30, 63, 153)",
|
||||
"border": "rgb(30, 63, 153)",
|
||||
"outline": "2px",
|
||||
"outlineColor": "rgb(30, 63, 153)",
|
||||
"disabled": false,
|
||||
"busy": "false"
|
||||
}
|
||||
},
|
||||
"fieldFocus": {
|
||||
"outline": "2px",
|
||||
"color": "rgb(30, 63, 153)",
|
||||
"shadow": "none"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 57 KiB |
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"cases": [
|
||||
{
|
||||
"case": "retry",
|
||||
"width": 390,
|
||||
"dpr": 1,
|
||||
"attemptDelta": 2,
|
||||
"watchRetained": true,
|
||||
"focusStable": true
|
||||
},
|
||||
{
|
||||
"case": "reduced-motion",
|
||||
"elements": [
|
||||
{
|
||||
"animation": "none",
|
||||
"opacity": "1"
|
||||
},
|
||||
{
|
||||
"animation": "none",
|
||||
"opacity": "1"
|
||||
},
|
||||
{
|
||||
"animation": "none",
|
||||
"opacity": "1"
|
||||
},
|
||||
{
|
||||
"animation": "none",
|
||||
"opacity": "1"
|
||||
},
|
||||
{
|
||||
"animation": "none",
|
||||
"opacity": "1"
|
||||
},
|
||||
{
|
||||
"animation": "none",
|
||||
"opacity": "1"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"errors": []
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
Determining projects to restore...
|
||||
All projects are up-to-date for restore.
|
||||
ZB.MOM.WW.MxGateway.Contracts -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Contracts/bin/Release/net10.0/ZB.MOM.WW.MxGateway.Contracts.dll
|
||||
ZB.MOM.WW.MxGateway.Server -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Server/bin/Release/net10.0/ZB.MOM.WW.MxGateway.Server.dll
|
||||
ZB.MOM.WW.MxGateway.Tests -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Tests/bin/Release/net10.0/ZB.MOM.WW.MxGateway.Tests.dll
|
||||
Test run for /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Tests/bin/Release/net10.0/ZB.MOM.WW.MxGateway.Tests.dll (.NETCoreApp,Version=v10.0)
|
||||
A total of 1 test files matched the specified pattern.
|
||||
Results File: /Users/dohertj2/Desktop/MxAccessGateway/docs/ui-validation/evidence/mx06-recheck/peer-tree-lifecycle.trx
|
||||
|
||||
Passed! - Failed: 0, Passed: 2, Skipped: 0, Total: 2, Duration: 37 ms - ZB.MOM.WW.MxGateway.Tests.dll (net10.0)
|
||||
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TestRun id="a681e969-b2ba-4828-8b90-8809d68a7cef" name="@Josephs-MBP 2026-11-13 19:59:22" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
|
||||
<Times creation="2026-11-13T19:59:22.4950550-05:00" queuing="2026-11-13T19:59:22.4950550-05:00" start="2026-11-13T19:59:22.0105510-05:00" finish="2026-11-13T19:59:22.4975270-05:00" />
|
||||
<TestSettings name="default" id="86dc9d7d-3bd5-43d6-9d83-62c0667cdc52">
|
||||
<Deployment runDeploymentRoot="_Josephs-MBP_2026-11-13_19_59_22" />
|
||||
</TestSettings>
|
||||
<Results>
|
||||
<UnitTestResult executionId="0cb68013-db30-48ce-a8b2-1a1b9c335d19" testId="20620390-d44d-839f-9815-7d4f7da861df" testName="ZB.MOM.WW.MxGateway.Tests.Dashboard.BrowseTreeRetryLifecycleTests.Retry_RendererDisposedWhileFocusPending_DoesNotDispatchAfterDisposal" computerName="Josephs-MBP" duration="00:00:00.0017136" startTime="2026-11-13T19:59:22.4417980-05:00" endTime="2026-11-13T19:59:22.4418420-05:00" testType="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b" outcome="Passed" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" relativeResultsDirectory="0cb68013-db30-48ce-a8b2-1a1b9c335d19" />
|
||||
<UnitTestResult executionId="dc784319-d2e1-4198-a3d8-57d3f3e3d5d5" testId="6eb63b4b-a456-7ccf-6726-adc2c4cd9194" testName="ZB.MOM.WW.MxGateway.Tests.Dashboard.BrowseTreeRetryLifecycleTests.Retry_NodeReplacedWhileFocusPending_DoesNotDispatchForEitherIdentity" computerName="Josephs-MBP" duration="00:00:00.0297695" startTime="2026-11-13T19:59:22.4044750-05:00" endTime="2026-11-13T19:59:22.4371120-05:00" testType="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b" outcome="Passed" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" relativeResultsDirectory="dc784319-d2e1-4198-a3d8-57d3f3e3d5d5" />
|
||||
</Results>
|
||||
<TestDefinitions>
|
||||
<UnitTest name="ZB.MOM.WW.MxGateway.Tests.Dashboard.BrowseTreeRetryLifecycleTests.Retry_RendererDisposedWhileFocusPending_DoesNotDispatchAfterDisposal" storage="/users/dohertj2/desktop/mxaccessgateway/src/zb.mom.ww.mxgateway.tests/bin/release/net10.0/zb.mom.ww.mxgateway.tests.dll" id="20620390-d44d-839f-9815-7d4f7da861df">
|
||||
<Execution id="0cb68013-db30-48ce-a8b2-1a1b9c335d19" />
|
||||
<TestMethod codeBase="/Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Tests/bin/Release/net10.0/ZB.MOM.WW.MxGateway.Tests.dll" adapterTypeName="executor://xunit/VsTestRunner3/netcore/" className="ZB.MOM.WW.MxGateway.Tests.Dashboard.BrowseTreeRetryLifecycleTests" name="Retry_RendererDisposedWhileFocusPending_DoesNotDispatchAfterDisposal" />
|
||||
</UnitTest>
|
||||
<UnitTest name="ZB.MOM.WW.MxGateway.Tests.Dashboard.BrowseTreeRetryLifecycleTests.Retry_NodeReplacedWhileFocusPending_DoesNotDispatchForEitherIdentity" storage="/users/dohertj2/desktop/mxaccessgateway/src/zb.mom.ww.mxgateway.tests/bin/release/net10.0/zb.mom.ww.mxgateway.tests.dll" id="6eb63b4b-a456-7ccf-6726-adc2c4cd9194">
|
||||
<Execution id="dc784319-d2e1-4198-a3d8-57d3f3e3d5d5" />
|
||||
<TestMethod codeBase="/Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Tests/bin/Release/net10.0/ZB.MOM.WW.MxGateway.Tests.dll" adapterTypeName="executor://xunit/VsTestRunner3/netcore/" className="ZB.MOM.WW.MxGateway.Tests.Dashboard.BrowseTreeRetryLifecycleTests" name="Retry_NodeReplacedWhileFocusPending_DoesNotDispatchForEitherIdentity" />
|
||||
</UnitTest>
|
||||
</TestDefinitions>
|
||||
<TestEntries>
|
||||
<TestEntry testId="20620390-d44d-839f-9815-7d4f7da861df" executionId="0cb68013-db30-48ce-a8b2-1a1b9c335d19" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" />
|
||||
<TestEntry testId="6eb63b4b-a456-7ccf-6726-adc2c4cd9194" executionId="dc784319-d2e1-4198-a3d8-57d3f3e3d5d5" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" />
|
||||
</TestEntries>
|
||||
<TestLists>
|
||||
<TestList name="Results Not in a List" id="8c84fa94-04c1-424b-9868-57a2d4851a1d" />
|
||||
<TestList name="All Loaded Results" id="19431567-8539-422a-85d7-44ee4e166bda" />
|
||||
</TestLists>
|
||||
<ResultSummary outcome="Completed">
|
||||
<Counters total="2" executed="2" passed="2" failed="0" error="0" timeout="0" aborted="0" inconclusive="0" passedButRunAborted="0" notRunnable="0" notExecuted="0" disconnected="0" warning="0" completed="0" inProgress="0" pending="0" />
|
||||
<Output>
|
||||
<StdOut>[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v3.1.4+50e68bbb8b (64-bit .NET 10.0.14)
|
||||
[xUnit.net 00:00:00.07] Discovering: ZB.MOM.WW.MxGateway.Tests
|
||||
[xUnit.net 00:00:00.15] Discovered: ZB.MOM.WW.MxGateway.Tests
|
||||
[xUnit.net 00:00:00.16] Starting: ZB.MOM.WW.MxGateway.Tests
|
||||
[xUnit.net 00:00:00.21] Finished: ZB.MOM.WW.MxGateway.Tests
|
||||
</StdOut>
|
||||
</Output>
|
||||
</ResultSummary>
|
||||
</TestRun>
|
||||
|
After Width: | Height: | Size: 63 KiB |
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"cases": [
|
||||
{
|
||||
"case": "retry",
|
||||
"width": 390,
|
||||
"dpr": 1,
|
||||
"attemptDelta": 2,
|
||||
"watchRetained": true,
|
||||
"focusStable": true
|
||||
},
|
||||
{
|
||||
"case": "reduced-motion",
|
||||
"elements": [
|
||||
{
|
||||
"animation": "none",
|
||||
"opacity": "1"
|
||||
},
|
||||
{
|
||||
"animation": "none",
|
||||
"opacity": "1"
|
||||
},
|
||||
{
|
||||
"animation": "none",
|
||||
"opacity": "1"
|
||||
},
|
||||
{
|
||||
"animation": "none",
|
||||
"opacity": "1"
|
||||
},
|
||||
{
|
||||
"animation": "none",
|
||||
"opacity": "1"
|
||||
},
|
||||
{
|
||||
"animation": "none",
|
||||
"opacity": "1"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"errors": []
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import json,re,sys
|
||||
from pathlib import Path
|
||||
from playwright.sync_api import sync_playwright,expect
|
||||
ROOT=Path(__file__).resolve().parent;BASE=re.search(r'Now listening on: (http://127.0.0.1:\d+)',Path('/tmp/mx-ui-final-host.log').read_text()).group(1);OUT=ROOT/'evidence/mx-fault-identity';OUT.mkdir(exist_ok=True);rows=[]
|
||||
with sync_playwright() as p:
|
||||
b=p.chromium.launch(channel='chromium',headless=True);page=b.new_page()
|
||||
for mode in ['compact','table']:
|
||||
page.goto(BASE+'/fault-identity-fixture');page.wait_for_selector('html[data-mx-ready="true"]');page.evaluate('Promise.all(document.getAnimations().map(a=>a.finished.catch(()=>{})))');container=page.locator('[data-fault-mode='+mode+']');row=container.locator('article' if mode=='compact' else 'tbody tr').filter(has=page.locator('a[href="sessions/session-a"]'));detail=row.locator('details');detail.locator('summary').click();pre=detail.locator('pre');page.get_by_role('button',name='Arm synthetic next snapshot').click();pre.focus();handle=pre.element_handle();expect(page.get_by_role('status')).to_have_text('Snapshot 1');rows.append({'mode':mode,'aStillOpen':detail.get_attribute('open') is not None,'focusedDiagnosticStillSessionA':handle.evaluate('e=>document.activeElement===e && e.closest("article,tr").querySelector("a").getAttribute("href")==="sessions/session-a"'),'originalElementStillConnected':handle.evaluate('e=>e.isConnected')})
|
||||
b.close()
|
||||
(OUT/(sys.argv[1]+'.json')).write_text(json.dumps(rows,indent=2));print(json.dumps(rows));assert all(r['aStillOpen'] and r['focusedDiagnosticStillSessionA'] for r in rows)
|
||||
@@ -0,0 +1,30 @@
|
||||
import json,re,sys
|
||||
from pathlib import Path
|
||||
from playwright.sync_api import sync_playwright,expect
|
||||
ROOT=Path(__file__).resolve().parent;BASE=re.search(r'Now listening on: (http://127.0.0.1:\d+)',Path('/tmp/mx-ui-final-host.log').read_text()).group(1);OUT=ROOT/'evidence/mx05-06-08';OUT.mkdir(exist_ok=True);rows=[];errors=[]
|
||||
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
|
||||
with sync_playwright() as p:
|
||||
with zoom_browser(p) as (ctx,worker):
|
||||
page=ctx.new_page();page.on('pageerror',lambda e:errors.append(str(e)))
|
||||
def goto(path):
|
||||
page.goto(BASE+path);page.wait_for_selector('html[data-mx-ready="true"]');page.evaluate('document.fonts.ready');page.evaluate('Promise.all(document.getAnimations().map(a=>a.finished.catch(()=>{})))')
|
||||
for width,zoom in [(1440,1),(1024,1),(390,1),(1440,2)]:
|
||||
page.set_viewport_size({'width':width,'height':900});goto('/browse-fixture');set_browser_zoom(worker,page,zoom)
|
||||
page.get_by_role('button',name='Expand SyntheticPlant',exact=True).click();page.get_by_role('button',name='Expand Pump01',exact=True).wait_for();page.get_by_role('button',name='Expand Sibling01',exact=True).click()
|
||||
page.get_by_role('button',name='Watch Sibling01.PV',exact=True).click();watched=page.get_by_role('region',name='Watched attribute values',exact=True);watched.wait_for()
|
||||
before=page.request.get(BASE+'/fixtures/browse-counts').json()['attempts'];page.request.post(BASE+'/fixtures/fail-next-browse');page.get_by_role('button',name='Expand Pump01',exact=True).click();retry=page.get_by_role('button',name='Retry loading Pump01',exact=True);retry.wait_for()
|
||||
notice=page.locator('.dashboard-diagnostic');notice.locator('summary').focus();page.keyboard.press('Enter');detail=notice.get_by_role('region');assert len(detail.inner_text())>600 and '<script>fixture</script>' in detail.inner_text();assert detail.locator('script').count()==0
|
||||
retry.focus();page.keyboard.press('Enter');expect(page.get_by_role('button',name='Watch Pump01.PV',exact=True)).to_be_visible();expect(watched).to_contain_text('Sibling01.PV');expect(page.get_by_role('button',name='Collapse Pump01',exact=True)).to_be_focused();assert page.request.get(BASE+'/fixtures/browse-counts').json()['attempts']==before+2
|
||||
assert page.locator('[role="status"]').filter(has_text='Loaded Pump01.').count()==1
|
||||
assert page.evaluate('document.documentElement.scrollWidth<=innerWidth');page.screenshot(path=str(OUT/f'recovery-{width}-zoom{zoom}.png'),full_page=False);rows.append({'case':'retry','width':page.evaluate('innerWidth'),'dpr':page.evaluate('devicePixelRatio'),'attemptDelta':2,'watchRetained':True,'focusStable':True})
|
||||
for principal in ['admin','viewer','anonymous']:
|
||||
goto('/layout-fixture?principal='+principal)
|
||||
if page.evaluate('innerWidth')<992:page.locator('summary.rail-toggle').click()
|
||||
nav=page.locator('nav.side-rail');expect(nav.get_by_role('link',name='Overview',exact=True)).to_be_visible();expect(nav.get_by_role('link',name='API keys',exact=True)).to_be_visible();assert nav.get_by_role('link',name='Secrets',exact=True).count()==(1 if principal=='admin' else 0);assert nav.get_by_role('link',name='Alarms',exact=True).count()==(0 if principal=='anonymous' else 1)
|
||||
footer=nav.get_by_role('link',name='Sign in',exact=True) if principal=='anonymous' else nav.get_by_role('button',name='Sign out',exact=True);footer.focus();expect(footer).to_be_focused();footer.scroll_into_view_if_needed();assert page.evaluate('document.documentElement.scrollWidth<=innerWidth');assert page.locator('form[action="/logout"] input[name="__RequestVerificationToken"]').count()==(0 if principal=='anonymous' else 1)
|
||||
rows.append({'case':'navigation','principal':principal,'width':page.evaluate('innerWidth'),'hrefs':nav.locator('a').evaluate_all('(es)=>es.map(e=>e.getAttribute("href"))'),'footerKeyboardReachable':True})
|
||||
set_browser_zoom(worker,page,1)
|
||||
page.emulate_media(reduced_motion='reduce');goto('/overview-fixture');motion=page.locator('.dashboard-page-header,.metric-grid,.dashboard-section').evaluate_all('(es)=>es.map(e=>({animation:getComputedStyle(e).animationName,opacity:getComputedStyle(e).opacity}))');assert all(r['animation']=='none' and r['opacity']=='1' for r in motion);rows.append({'case':'reduced-motion','elements':motion})
|
||||
assert not errors,errors
|
||||
(OUT/'results.json').write_text(json.dumps({'cases':rows,'errors':errors},indent=2));print(json.dumps({'cases':len(rows),'errors':errors}))
|
||||
@@ -0,0 +1,30 @@
|
||||
import json,re,sys
|
||||
from pathlib import Path
|
||||
from playwright.sync_api import sync_playwright,expect
|
||||
ROOT=Path(__file__).resolve().parent;BASE=re.search(r'Now listening on: (http://127.0.0.1:\d+)',Path('/tmp/mx-ui-final-host.log').read_text()).group(1);OUT=ROOT/'evidence/mx-final-layout';OUT.mkdir(exist_ok=True);rows=[];errors=[]
|
||||
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
|
||||
with sync_playwright() as p:
|
||||
with zoom_browser(p) as (ctx,worker):
|
||||
page=ctx.new_page();page.on('pageerror',lambda e:errors.append(str(e)))
|
||||
def goto(path):
|
||||
page.goto(BASE+path);page.wait_for_selector('html[data-mx-ready="true"]');page.evaluate('document.fonts.ready');page.evaluate('Promise.all(document.getAnimations().map(a=>a.finished.catch(()=>{})))')
|
||||
for width,zoom in [(1440,1),(1024,1),(390,1),(1440,2)]:
|
||||
page.set_viewport_size({'width':width,'height':900});goto('/browse-fixture');set_browser_zoom(worker,page,zoom)
|
||||
page.get_by_role('button',name='Expand SyntheticPlant',exact=True).click();page.get_by_role('button',name='Expand Pump01',exact=True).wait_for();page.get_by_role('button',name='Expand Sibling01',exact=True).click()
|
||||
page.get_by_role('button',name='Watch Sibling01.PV',exact=True).click();watched=page.get_by_role('region',name='Watched attribute values',exact=True);watched.wait_for()
|
||||
before=page.request.get(BASE+'/fixtures/browse-counts').json()['attempts'];page.request.post(BASE+'/fixtures/fail-next-browse');page.get_by_role('button',name='Expand Pump01',exact=True).click();retry=page.get_by_role('button',name='Retry loading Pump01',exact=True);retry.wait_for()
|
||||
notice=page.locator('.dashboard-diagnostic');notice.locator('summary').focus();page.keyboard.press('Enter');detail=notice.get_by_role('region');assert len(detail.inner_text())>600 and '<script>fixture</script>' in detail.inner_text();assert detail.locator('script').count()==0
|
||||
retry.focus();page.keyboard.press('Enter');expect(page.get_by_role('button',name='Watch Pump01.PV',exact=True)).to_be_visible();expect(watched).to_contain_text('Sibling01.PV');expect(page.get_by_role('button',name='Collapse Pump01',exact=True)).to_be_focused();assert page.request.get(BASE+'/fixtures/browse-counts').json()['attempts']==before+2
|
||||
assert page.locator('[role="status"]').filter(has_text='Loaded Pump01.').count()==1
|
||||
assert page.evaluate('document.documentElement.scrollWidth<=innerWidth');page.screenshot(path=str(OUT/f'recovery-{width}-zoom{zoom}.png'),full_page=False);rows.append({'case':'retry','width':page.evaluate('innerWidth'),'dpr':page.evaluate('devicePixelRatio'),'attemptDelta':2,'watchRetained':True,'focusStable':True})
|
||||
for principal in ['admin','viewer','anonymous']:
|
||||
goto('/layout-fixture?principal='+principal)
|
||||
if page.evaluate('innerWidth')<992:page.locator('summary.rail-toggle').click()
|
||||
nav=page.locator('nav.side-rail');expect(nav.get_by_role('link',name='Overview',exact=True)).to_be_visible();expect(nav.get_by_role('link',name='API keys',exact=True)).to_be_visible();assert nav.get_by_role('link',name='Secrets',exact=True).count()==(1 if principal=='admin' else 0);assert nav.get_by_role('link',name='Alarms',exact=True).count()==(0 if principal=='anonymous' else 1)
|
||||
footer=nav.get_by_role('link',name='Sign in',exact=True) if principal=='anonymous' else nav.get_by_role('button',name='Sign out',exact=True);footer.focus();expect(footer).to_be_focused();footer.scroll_into_view_if_needed();assert page.evaluate('document.documentElement.scrollWidth<=innerWidth');assert page.locator('form[action="/logout"] input[name="__RequestVerificationToken"]').count()==(0 if principal=='anonymous' else 1)
|
||||
rows.append({'case':'navigation','principal':principal,'width':page.evaluate('innerWidth'),'hrefs':nav.locator('a').evaluate_all('(es)=>es.map(e=>e.getAttribute("href"))'),'footerKeyboardReachable':True})
|
||||
set_browser_zoom(worker,page,1)
|
||||
page.emulate_media(reduced_motion='reduce');goto('/overview-fixture');motion=page.locator('.dashboard-page-header,.metric-grid,.dashboard-section').evaluate_all('(es)=>es.map(e=>({animation:getComputedStyle(e).animationName,opacity:getComputedStyle(e).opacity}))');assert all(r['animation']=='none' and r['opacity']=='1' for r in motion);rows.append({'case':'reduced-motion','elements':motion})
|
||||
assert not errors,errors
|
||||
(OUT/'results.json').write_text(json.dumps({'cases':rows,'errors':errors},indent=2));print(json.dumps({'cases':len(rows),'errors':errors}))
|
||||
@@ -0,0 +1,6 @@
|
||||
@namespace MxUiCanary.Components
|
||||
@page "/apikeys"
|
||||
@layout ZB.MOM.WW.MxGateway.Server.Dashboard.Components.Layout.MainLayout
|
||||
@inject IJSRuntime JS
|
||||
<ApiKeysPage/>
|
||||
@code { protected override async Task OnAfterRenderAsync(bool firstRender){if(firstRender)await JS.InvokeVoidAsync("mxCanaryReady");} }
|
||||
@@ -1,5 +1,7 @@
|
||||
@namespace MxUiCanary.Components
|
||||
@page "/browse-fixture"
|
||||
@page "/browse"
|
||||
@layout ZB.MOM.WW.MxGateway.Server.Dashboard.Components.Layout.MainLayout
|
||||
@inject IJSRuntime JS
|
||||
<ThemeShell Product="Synthetic MX browse"><ChildContent><p>Synthetic cached Galaxy and redacted fixture values. No COM or worker.</p><BrowsePage/></ChildContent></ThemeShell>
|
||||
<p>Synthetic cached Galaxy and redacted fixture values. No COM or worker.</p><BrowsePage/>
|
||||
@code { protected override async Task OnAfterRenderAsync(bool firstRender){if(firstRender)await JS.InvokeVoidAsync("mxCanaryReady");} }
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
@namespace MxUiCanary.Components
|
||||
@using ZB.MOM.WW.MxGateway.Server.Dashboard
|
||||
@page "/fault-identity-fixture"
|
||||
@implements IDisposable
|
||||
@inject IJSRuntime JS
|
||||
<ThemeShell Product="Synthetic fault identity"><ChildContent>
|
||||
<h1>Fault identity fixture</h1>
|
||||
<button type="button" class="btn btn-primary" @onclick="ArmAsync">Arm synthetic next snapshot</button>
|
||||
<p role="status">Snapshot @_round</p>
|
||||
<section data-fault-mode="compact"><FaultList Faults="_faults" Compact="true" /></section>
|
||||
<section data-fault-mode="table"><FaultList Faults="_faults" /></section>
|
||||
</ChildContent></ThemeShell>
|
||||
@code {
|
||||
private int _round;private bool _disposed;
|
||||
private IReadOnlyList<DashboardFaultSummary> _faults=[Fault("session-a"),Fault("session-b")];
|
||||
private static DashboardFaultSummary Fault(string id)=>new("Worker",id,123,"Faulted","Synthetic fault for "+id+" "+new string('x',300),DateTimeOffset.UnixEpoch);
|
||||
private async Task ArmAsync(){await Task.Delay(1200);if(_disposed)return;_round++;_faults=[Fault("session-c"),Fault("session-b"),Fault("session-a") with{ObservedAt=DateTimeOffset.UnixEpoch.AddMinutes(1)}];}
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender){if(firstRender)await JS.InvokeVoidAsync("mxCanaryReady");}
|
||||
public void Dispose()=>_disposed=true;
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
@namespace MxUiCanary.Components
|
||||
@page "/"
|
||||
@page "/native-fixture"
|
||||
@inject IJSRuntime JS
|
||||
<ThemeShell Product="Synthetic MX UI canary">
|
||||
<ChildContent>
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
@namespace MxUiCanary.Components
|
||||
@page "/layout-fixture"
|
||||
@layout ZB.MOM.WW.MxGateway.Server.Dashboard.Components.Layout.MainLayout
|
||||
@inject IJSRuntime JS
|
||||
<h1>Navigation fixture</h1>
|
||||
<p>Synthetic principals; links and the logout form are inspected without submitting them.</p>
|
||||
@code { protected override async Task OnAfterRenderAsync(bool firstRender){if(firstRender)await JS.InvokeVoidAsync("mxCanaryReady");} }
|
||||
@@ -1,5 +1,7 @@
|
||||
@namespace MxUiCanary.Components
|
||||
@page "/overview-fixture"
|
||||
@page "/"
|
||||
@layout ZB.MOM.WW.MxGateway.Server.Dashboard.Components.Layout.MainLayout
|
||||
@inject IJSRuntime JS
|
||||
<ThemeShell Product="Synthetic MX overview"><ChildContent><DashboardHome/></ChildContent></ThemeShell>
|
||||
<DashboardHome/>
|
||||
@code { protected override async Task OnAfterRenderAsync(bool firstRender){if(firstRender)await JS.InvokeVoidAsync("mxCanaryReady");} }
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
@namespace MxUiCanary.Components
|
||||
@page "/style-fixture"
|
||||
@inject IJSRuntime JS
|
||||
<ThemeShell Product="Synthetic style fixture"><ChildContent>
|
||||
<h1>Component states</h1>
|
||||
<p>Shared components with MX host adapters; no operation provider.</p>
|
||||
<div class="d-flex gap-2 flex-wrap">
|
||||
<TechButton id="style-primary">Primary action</TechButton>
|
||||
<TechButton Variant="ButtonVariant.Secondary">Secondary action</TechButton>
|
||||
<TechButton Variant="ButtonVariant.Danger">Danger action</TechButton>
|
||||
<TechButton disabled>Disabled action</TechButton>
|
||||
<TechButton Busy="true" BusyText="Working…">Busy action</TechButton>
|
||||
</div>
|
||||
<TechField Label="Fixture field" For="style-field"><input id="style-field" class="form-control" /></TechField>
|
||||
<section class="dashboard-section">
|
||||
<p><span class="quality-chip quality-good">Good</span> <span class="quality-chip quality-bad">Bad</span></p>
|
||||
<p><span class="alarm-state alarm-state-active">Active</span> <span class="alarm-state alarm-state-acked">Acknowledged</span> <span class="alarm-state alarm-state-other">Unknown</span></p>
|
||||
<p><span class="text-secondary">Secondary text</span> <span class="text-success">Success text</span> <span class="text-warning">Warning text</span> <span class="text-danger">Danger text</span> <span class="text-info">Information text</span></p>
|
||||
<div class="alert alert-success">Success notice</div><div class="alert alert-danger">Error notice</div><div class="alert alert-info">Information notice</div><div class="alert alert-warning">Warning notice</div>
|
||||
</section>
|
||||
</ChildContent></ThemeShell>
|
||||
@code { protected override async Task OnAfterRenderAsync(bool firstRender){if(firstRender)await JS.InvokeVoidAsync("mxCanaryReady");} }
|
||||
@@ -71,7 +71,7 @@ using ZB.MOM.WW.MxGateway.Server.Security.Authorization;
|
||||
internal sealed class ManagingApiKeyService : IDashboardApiKeyManagementService
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public bool CanManage(ClaimsPrincipal user) => true;
|
||||
public bool CanManage(ClaimsPrincipal user) => user.IsInRole(DashboardRoles.Admin);
|
||||
|
||||
/// <inheritdoc />
|
||||
public Task<DashboardApiKeyManagementResult> CreateAsync(
|
||||
@@ -102,15 +102,16 @@ using ZB.MOM.WW.MxGateway.Server.Security.Authorization;
|
||||
Task.FromResult(DashboardApiKeyManagementResult.Fail("not exercised"));
|
||||
}
|
||||
|
||||
internal sealed class StubAuthenticationStateProvider : AuthenticationStateProvider
|
||||
internal sealed class StubAuthenticationStateProvider(Microsoft.AspNetCore.Components.NavigationManager nav) : AuthenticationStateProvider
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override Task<AuthenticationState> GetAuthenticationStateAsync() =>
|
||||
Task.FromResult(new AuthenticationState(new ClaimsPrincipal(new ClaimsIdentity(
|
||||
[new Claim(ClaimTypes.Name, "admin-user"), new Claim(ClaimTypes.Role, DashboardRoles.Admin)],
|
||||
authenticationType: "test",
|
||||
nameType: ClaimTypes.Name,
|
||||
roleType: ClaimTypes.Role))));
|
||||
public override Task<AuthenticationState> GetAuthenticationStateAsync()
|
||||
{
|
||||
var query = Microsoft.AspNetCore.WebUtilities.QueryHelpers.ParseQuery(new Uri(nav.Uri).Query);
|
||||
string role = query.TryGetValue("principal", out var value) ? value.ToString() : "admin";
|
||||
var identity = role == "anonymous" ? new ClaimsIdentity() : new ClaimsIdentity(
|
||||
[new Claim(ClaimTypes.Name, "fixture-user"), new Claim(ClaimTypes.Role, role == "viewer" ? DashboardRoles.Viewer : DashboardRoles.Admin)], "synthetic");
|
||||
return Task.FromResult(new AuthenticationState(new ClaimsPrincipal(identity)));
|
||||
}
|
||||
}
|
||||
// In-memory Galaxy projection and read-only fake values for the actual BrowsePage.
|
||||
internal sealed class FixtureGalaxyCache : ZB.MOM.WW.GalaxyRepository.IGalaxyHierarchyCache
|
||||
@@ -124,7 +125,7 @@ internal sealed class FixtureGalaxyCache : ZB.MOM.WW.GalaxyRepository.IGalaxyHie
|
||||
pump.Attributes.Add(new ZB.MOM.WW.GalaxyRepository.Grpc.GalaxyAttribute { AttributeName = new string('x', 200), FullTagReference = "Pump01." + new string('x', 200), DataTypeName = "Float" });
|
||||
var sibling = new ZB.MOM.WW.GalaxyRepository.Grpc.GalaxyObject { GobjectId = 3, ParentGobjectId = 1, TagName = "Sibling01", BrowseName = "Sibling01" };
|
||||
sibling.Attributes.Add(new ZB.MOM.WW.GalaxyRepository.Grpc.GalaxyAttribute { AttributeName = "PV", FullTagReference = "Sibling01.PV", DataTypeName = "Float" });
|
||||
ZB.MOM.WW.GalaxyRepository.Grpc.GalaxyObject[] rows = [plant, pump, sibling];
|
||||
ZB.MOM.WW.GalaxyRepository.Grpc.GalaxyObject[] rows = [plant, pump, sibling, new() { GobjectId=4, ParentGobjectId=2, TagName="PumpChild", BrowseName="PumpChild" }];
|
||||
Current = ZB.MOM.WW.GalaxyRepository.GalaxyHierarchyCacheEntry.Empty with {
|
||||
Status = ZB.MOM.WW.GalaxyRepository.GalaxyCacheStatus.Healthy, Sequence = 1,
|
||||
Objects = rows, Index = ZB.MOM.WW.GalaxyRepository.GalaxyHierarchyIndex.Build(rows), ObjectCount = rows.Length, AttributeCount = 3,
|
||||
@@ -141,3 +142,18 @@ internal sealed class FixtureLiveData : IDashboardLiveDataService
|
||||
public Task<DashboardAlarmQueryResult> QueryAlarmsAsync(CancellationToken cancellationToken) =>
|
||||
Task.FromResult(new DashboardAlarmQueryResult([], null, null));
|
||||
}
|
||||
|
||||
internal sealed class FaultableBrowseService(ZB.MOM.WW.GalaxyRepository.IGalaxyHierarchyCache cache) : IDashboardBrowseService
|
||||
{
|
||||
private readonly DashboardBrowseService _real = new(cache);
|
||||
public bool FailNext { get; set; }
|
||||
public int Attempts { get; private set; }
|
||||
public ulong CurrentCacheSequence => _real.CurrentCacheSequence;
|
||||
public BrowseLevelResult GetRoots(BrowseFilterArgs filter) => _real.GetRoots(filter);
|
||||
public BrowseLevelResult GetChildren(int id, BrowseFilterArgs filter)
|
||||
{
|
||||
Attempts++;
|
||||
if (FailNext) { FailNext = false; throw new InvalidOperationException("Synthetic hierarchy outage " + new string('x', 600) + " <script>fixture</script>"); }
|
||||
return _real.GetChildren(id, filter);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using Microsoft.AspNetCore.DataProtection;
|
||||
using Microsoft.AspNetCore.Components.Authorization;
|
||||
using Microsoft.Extensions.FileProviders;
|
||||
using MxUiCanary.Components;
|
||||
@@ -6,12 +7,20 @@ var builder = WebApplication.CreateBuilder(args);
|
||||
builder.WebHost.UseUrls("http://127.0.0.1:0");
|
||||
builder.WebHost.UseStaticWebAssets();
|
||||
builder.Services.AddRazorComponents().AddInteractiveServerComponents();
|
||||
builder.Services.AddDataProtection().UseEphemeralDataProtectionProvider();
|
||||
builder.Services.AddAuthorizationCore(options => {
|
||||
ZB.MOM.WW.Secrets.Ui.SecretsAuthorization.AddSecretsAuthorization(options);
|
||||
options.AddPolicy(DashboardAuthenticationDefaults.AlarmsPolicy, policy => policy.AddRequirements(AuthenticatedDashboardRoleRequirement.AnyDashboardRole));
|
||||
});
|
||||
builder.Services.AddSingleton<Microsoft.AspNetCore.Authorization.IAuthorizationHandler, AuthenticatedDashboardRoleHandler>();
|
||||
builder.Services.AddCascadingAuthenticationState();
|
||||
builder.Services.AddSingleton<IDashboardSnapshotService, StubSnapshotService>();
|
||||
builder.Services.AddSingleton<IDashboardSnapshotFeed, IdleSnapshotFeed>();
|
||||
builder.Services.AddSingleton<IDashboardApiKeyManagementService, ManagingApiKeyService>();
|
||||
builder.Services.AddSingleton<AuthenticationStateProvider, StubAuthenticationStateProvider>();
|
||||
builder.Services.AddScoped<AuthenticationStateProvider, StubAuthenticationStateProvider>();
|
||||
builder.Services.AddSingleton<ZB.MOM.WW.GalaxyRepository.IGalaxyHierarchyCache, FixtureGalaxyCache>();
|
||||
builder.Services.AddSingleton<IDashboardBrowseService, DashboardBrowseService>();
|
||||
builder.Services.AddSingleton<FaultableBrowseService>();
|
||||
builder.Services.AddSingleton<IDashboardBrowseService>(s=>s.GetRequiredService<FaultableBrowseService>());
|
||||
builder.Services.AddSingleton<IDashboardLiveDataService, FixtureLiveData>();
|
||||
builder.Services.AddSingleton<ZB.MOM.WW.GalaxyRepository.IGalaxyDeployNotifier, ZB.MOM.WW.GalaxyRepository.GalaxyDeployNotifier>();
|
||||
builder.Services.AddSingleton<DashboardBrowseSearchIndex>();
|
||||
@@ -25,4 +34,6 @@ app.MapPost("/fixtures/snapshot/{scene}",(string scene, IDashboardSnapshotServic
|
||||
((StubSnapshotService)source).Scene = scene; return Results.Ok(new { scene, syntheticOnly=true });
|
||||
});
|
||||
app.MapGet("/provenance",()=>new { theme=typeof(ZB.MOM.WW.Theme.ThemeShell).Assembly.GetName().Version?.ToString(), syntheticOnly=true });
|
||||
app.MapPost("/fixtures/fail-next-browse",(FaultableBrowseService source)=>{source.FailNext=true;return Results.Ok();});
|
||||
app.MapGet("/fixtures/browse-counts",(FaultableBrowseService source)=>new{attempts=source.Attempts});
|
||||
app.Run();
|
||||
|
||||
@@ -13,7 +13,7 @@ with sync_playwright() as p:
|
||||
for width,zoom in [(1440,1),(1024,1),(390,1),(1440,2)]:
|
||||
page.set_viewport_size({'width':width,'height':900});page.goto(BASE);page.wait_for_selector('html[data-mx-ready="true"]');page.evaluate('document.fonts.ready')
|
||||
set_browser_zoom(worker,page,zoom)
|
||||
trigger=page.get_by_role('button',name='Create API Key',exact=True);trigger.focus();trigger.press('Enter')
|
||||
trigger=page.get_by_role('button',name='Create API key',exact=True);trigger.focus();trigger.press('Enter')
|
||||
dialog=page.locator('dialog:modal');dialog.wait_for()
|
||||
page.wait_for_function("document.querySelector('dialog:modal [data-dialog-initial]')===document.activeElement")
|
||||
focus=[]
|
||||
@@ -26,7 +26,7 @@ with sync_playwright() as p:
|
||||
page.screenshot(path=str(OUT/f'create-{width}-zoom{zoom}.png'),full_page=False)
|
||||
results.append({'width':page.evaluate('innerWidth'),'dpr':page.evaluate('devicePixelRatio'),'scroll':page.evaluate('document.documentElement.scrollWidth'),'zoom':zoom,'nativeModal':True,'outsideFocusBlocked':True,'focusSamples':focus,'validationInsideDialog':True})
|
||||
page.keyboard.press('Escape');page.wait_for_function("!document.querySelector('dialog:modal')")
|
||||
page.wait_for_function("document.activeElement.textContent.trim()==='Create API Key'")
|
||||
page.wait_for_function("document.activeElement.textContent.trim()==='Create API key'")
|
||||
set_browser_zoom(worker,page,1)
|
||||
page.set_viewport_size({'width':390,'height':844})
|
||||
trigger=page.locator('#slow-trigger');trigger.click();page.locator('dialog:modal').wait_for()
|
||||
|
||||
@@ -11,7 +11,7 @@ async def main():
|
||||
requested.set();await release.wait();await route.continue_()
|
||||
await page.route('**/js/dashboard-dialog.js',hold)
|
||||
await page.goto(BASE);await page.wait_for_selector('html[data-mx-ready="true"]')
|
||||
await page.get_by_role('button',name='Create API Key',exact=True).click();await asyncio.wait_for(requested.wait(),10)
|
||||
await page.get_by_role('button',name='Create API key',exact=True).click();await asyncio.wait_for(requested.wait(),10)
|
||||
dialog=page.locator('dialog.api-key-create-modal');assert await dialog.count()==1
|
||||
assert not await dialog.is_visible(), 'Requested native dialog must stay hidden until showModal'
|
||||
# Close the parent while its import is pending. Completion must not resurrect it.
|
||||
@@ -23,7 +23,7 @@ async def main():
|
||||
assert await page.locator('dialog:modal').count()==0
|
||||
await page.unroute('**/js/dashboard-dialog.js',hold)
|
||||
# Reopen after disposal, then make the connected trigger unusable before cancel.
|
||||
trigger=page.get_by_role('button',name='Create API Key',exact=True)
|
||||
trigger=page.get_by_role('button',name='Create API key',exact=True)
|
||||
await trigger.click();await page.locator('dialog:modal').wait_for()
|
||||
await trigger.evaluate('(e)=>e.disabled=true')
|
||||
await page.keyboard.press('Escape');await page.wait_for_function("!document.querySelector('dialog:modal')")
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import json,re
|
||||
from pathlib import Path
|
||||
from playwright.sync_api import sync_playwright,expect
|
||||
ROOT=Path(__file__).resolve().parent;BASE=re.search(r'Now listening on: (http://127.0.0.1:\d+)',Path('/tmp/mx-ui-final-host.log').read_text()).group(1);rows=[]
|
||||
with sync_playwright() as p:
|
||||
b=p.chromium.launch(channel='chromium',headless=True);page=b.new_page()
|
||||
for width in [1440,390]:
|
||||
page.set_viewport_size({'width':width,'height':844})
|
||||
for role in ['admin','viewer']:
|
||||
for route,title in [('/','Overview'),('/browse','Browse'),('/apikeys','API keys')]:
|
||||
page.goto(BASE+route+'?principal='+role);page.wait_for_selector('html[data-mx-ready="true"]');expect(page.get_by_role('heading',level=1)).to_have_text(title);expect(page).to_have_title('MXAccess Gateway — '+title)
|
||||
if width<992:page.locator('summary.rail-toggle').click()
|
||||
active=page.locator('nav.side-rail a.active');assert active.count()==1;assert active.get_attribute('href')==route
|
||||
if route=='/apikeys':assert page.get_by_role('button',name='Create API key',exact=True).count()==(1 if role=='admin' else 0)
|
||||
rows.append({'route':route,'title':page.title(),'principal':role,'width':width,'active':active.get_attribute('href')})
|
||||
b.close()
|
||||
(ROOT/'evidence/mx-final/navigation-destinations.json').write_text(json.dumps(rows,indent=2));print('12 actual destination/principal/width cases passed')
|
||||
@@ -0,0 +1,13 @@
|
||||
import re,json,hashlib,urllib.request,zipfile
|
||||
from pathlib import Path
|
||||
ROOT=Path(__file__).resolve().parent;BASE=re.search(r'Now listening on: (http://127.0.0.1:\d+)',Path('/tmp/mx-ui-final-host.log').read_text()).group(1);rows=[]
|
||||
for name,version,files in [('Theme','1.0.1',['css/theme.css','css/layout.css','fonts/ibm-plex-sans-400.woff2','fonts/ibm-plex-sans-600.woff2','fonts/ibm-plex-mono-500.woff2']),('Secrets.Ui','1.0.1',['js/secrets-dialog.js','js/secrets-reveal.js']),('Secrets.Abstractions','0.6.6',[])]:
|
||||
id='ZB.MOM.WW.'+name;cache=Path.home()/'.nuget/packages'/id.lower()/version
|
||||
with zipfile.ZipFile(cache/(id.lower()+'.'+version+'.nupkg')) as z:
|
||||
dll=Path('/tmp/mx-ui-final-artifacts/bin/MxUiCanary/release')/(id+'.dll');assert dll.read_bytes()==z.read('lib/net10.0/'+id+'.dll')
|
||||
rows.append({'runtimeAssembly':id,'version':version,'bytesMatchOfficialPackage':True})
|
||||
for path in files:
|
||||
url=BASE+'/_content/'+id+'/'+path
|
||||
with urllib.request.urlopen(url) as r:data=r.read();assert r.status==200
|
||||
assert data==z.read('staticwebassets/'+path);rows.append({'asset':path,'package':id,'http':200,'sha256':hashlib.sha256(data).hexdigest()})
|
||||
(ROOT/'evidence/mx-final/served-assets.json').write_text(json.dumps(rows,indent=2));print('3 runtime assemblies and7 served assets equal accepted official packages')
|
||||
@@ -0,0 +1,24 @@
|
||||
import json,re,sys
|
||||
from pathlib import Path
|
||||
from playwright.sync_api import sync_playwright,expect
|
||||
ROOT=Path(__file__).resolve().parent;BASE=re.search(r'Now listening on: (http://127.0.0.1:\d+)',Path('/tmp/mx-ui-final-host.log').read_text()).group(1);OUT=ROOT/'evidence/mx06-coarse-final';OUT.mkdir(exist_ok=True);rows=[];errors=[]
|
||||
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
|
||||
with sync_playwright() as p:
|
||||
with zoom_browser(p) as (ctx,worker):
|
||||
page=ctx.new_page();ctx.new_cdp_session(page).send('Emulation.setTouchEmulationEnabled',{'enabled':True,'maxTouchPoints':1});page.on('pageerror',lambda e:errors.append(str(e)))
|
||||
def goto(path):
|
||||
page.goto(BASE+path);page.wait_for_selector('html[data-mx-ready="true"]');page.evaluate('document.fonts.ready');page.evaluate('Promise.all(document.getAnimations().map(a=>a.finished.catch(()=>{})))')
|
||||
for width,zoom in [(390,1)]:
|
||||
page.set_viewport_size({'width':width,'height':900});goto('/browse-fixture');set_browser_zoom(worker,page,zoom)
|
||||
page.get_by_role('button',name='Expand SyntheticPlant',exact=True).click();page.get_by_role('button',name='Expand Pump01',exact=True).wait_for();page.get_by_role('button',name='Expand Sibling01',exact=True).click()
|
||||
page.get_by_role('button',name='Watch Sibling01.PV',exact=True).click();watched=page.get_by_role('region',name='Watched attribute values',exact=True);watched.wait_for()
|
||||
before=page.request.get(BASE+'/fixtures/browse-counts').json()['attempts'];page.request.post(BASE+'/fixtures/fail-next-browse');page.get_by_role('button',name='Expand Pump01',exact=True).click();retry=page.get_by_role('button',name='Retry loading Pump01',exact=True);retry.wait_for()
|
||||
assert page.evaluate('matchMedia("(pointer: coarse)").matches && navigator.maxTouchPoints===1');notice=page.locator('.dashboard-diagnostic');assert notice.locator('summary').bounding_box()['height']>=44;expect(notice.locator('summary')).to_have_text('Show diagnostic details for Pump01');notice.locator('summary').focus();page.keyboard.press('Enter');detail=notice.get_by_role('region');assert len(detail.inner_text())>600 and '<script>fixture</script>' in detail.inner_text();assert detail.locator('script').count()==0
|
||||
retry.focus();page.keyboard.press('Enter');expect(page.get_by_role('button',name='Watch Pump01.PV',exact=True)).to_be_visible();expect(watched).to_contain_text('Sibling01.PV');expect(page.get_by_role('button',name='Collapse Pump01',exact=True)).to_be_focused();assert page.request.get(BASE+'/fixtures/browse-counts').json()['attempts']==before+2
|
||||
assert page.locator('[role="status"]').filter(has_text='Loaded Pump01.').count()==1
|
||||
assert page.evaluate('document.documentElement.scrollWidth<=innerWidth');page.screenshot(path=str(OUT/f'recovery-{width}-zoom{zoom}.png'),full_page=False);rows.append({'case':'retry','width':page.evaluate('innerWidth'),'dpr':page.evaluate('devicePixelRatio'),'attemptDelta':2,'watchRetained':True,'focusStable':True})
|
||||
set_browser_zoom(worker,page,1)
|
||||
page.emulate_media(reduced_motion='reduce');goto('/overview-fixture');motion=page.locator('.dashboard-page-header,.metric-grid,.dashboard-section').evaluate_all('(es)=>es.map(e=>({animation:getComputedStyle(e).animationName,opacity:getComputedStyle(e).opacity}))');assert all(r['animation']=='none' and r['opacity']=='1' for r in motion);rows.append({'case':'reduced-motion','elements':motion})
|
||||
assert not errors,errors
|
||||
(OUT/'results.json').write_text(json.dumps({'cases':rows,'errors':errors},indent=2));print(json.dumps({'cases':len(rows),'errors':errors}))
|
||||
@@ -0,0 +1,24 @@
|
||||
import json,re,sys
|
||||
from pathlib import Path
|
||||
from playwright.sync_api import sync_playwright,expect
|
||||
ROOT=Path(__file__).resolve().parent;BASE=re.search(r'Now listening on: (http://127.0.0.1:\d+)',Path('/tmp/mx-ui-final-host.log').read_text()).group(1);OUT=ROOT/'evidence/mx06-recheck';OUT.mkdir(exist_ok=True);rows=[];errors=[]
|
||||
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
|
||||
with sync_playwright() as p:
|
||||
with zoom_browser(p) as (ctx,worker):
|
||||
page=ctx.new_page();page.on('pageerror',lambda e:errors.append(str(e)))
|
||||
def goto(path):
|
||||
page.goto(BASE+path);page.wait_for_selector('html[data-mx-ready="true"]');page.evaluate('document.fonts.ready');page.evaluate('Promise.all(document.getAnimations().map(a=>a.finished.catch(()=>{})))')
|
||||
for width,zoom in [(390,1)]:
|
||||
page.set_viewport_size({'width':width,'height':900});goto('/browse-fixture');set_browser_zoom(worker,page,zoom)
|
||||
page.get_by_role('button',name='Expand SyntheticPlant',exact=True).click();page.get_by_role('button',name='Expand Pump01',exact=True).wait_for();page.get_by_role('button',name='Expand Sibling01',exact=True).click()
|
||||
page.get_by_role('button',name='Watch Sibling01.PV',exact=True).click();watched=page.get_by_role('region',name='Watched attribute values',exact=True);watched.wait_for()
|
||||
before=page.request.get(BASE+'/fixtures/browse-counts').json()['attempts'];page.request.post(BASE+'/fixtures/fail-next-browse');page.get_by_role('button',name='Expand Pump01',exact=True).click();retry=page.get_by_role('button',name='Retry loading Pump01',exact=True);retry.wait_for()
|
||||
notice=page.locator('.dashboard-diagnostic');expect(notice.locator('summary')).to_have_text('Show diagnostic details for Pump01');notice.locator('summary').focus();page.keyboard.press('Enter');detail=notice.get_by_role('region');assert len(detail.inner_text())>600 and '<script>fixture</script>' in detail.inner_text();assert detail.locator('script').count()==0
|
||||
retry.focus();page.keyboard.press('Enter');expect(page.get_by_role('button',name='Watch Pump01.PV',exact=True)).to_be_visible();expect(watched).to_contain_text('Sibling01.PV');expect(page.get_by_role('button',name='Collapse Pump01',exact=True)).to_be_focused();assert page.request.get(BASE+'/fixtures/browse-counts').json()['attempts']==before+2
|
||||
assert page.locator('[role="status"]').filter(has_text='Loaded Pump01.').count()==1
|
||||
assert page.evaluate('document.documentElement.scrollWidth<=innerWidth');page.screenshot(path=str(OUT/f'recovery-{width}-zoom{zoom}.png'),full_page=False);rows.append({'case':'retry','width':page.evaluate('innerWidth'),'dpr':page.evaluate('devicePixelRatio'),'attemptDelta':2,'watchRetained':True,'focusStable':True})
|
||||
set_browser_zoom(worker,page,1)
|
||||
page.emulate_media(reduced_motion='reduce');goto('/overview-fixture');motion=page.locator('.dashboard-page-header,.metric-grid,.dashboard-section').evaluate_all('(es)=>es.map(e=>({animation:getComputedStyle(e).animationName,opacity:getComputedStyle(e).opacity}))');assert all(r['animation']=='none' and r['opacity']=='1' for r in motion);rows.append({'case':'reduced-motion','elements':motion})
|
||||
assert not errors,errors
|
||||
(OUT/'results.json').write_text(json.dumps({'cases':rows,'errors':errors},indent=2));print(json.dumps({'cases':len(rows),'errors':errors}))
|
||||
@@ -0,0 +1,28 @@
|
||||
import json,re,subprocess
|
||||
from pathlib import Path
|
||||
from playwright.sync_api import sync_playwright,expect
|
||||
ROOT=Path(__file__).resolve().parent;BASE=re.search(r'Now listening on: (http://127.0.0.1:\d+)',Path('/tmp/mx-ui-final-host.log').read_text()).group(1);OUT=ROOT/'evidence/mx05';rows={}
|
||||
def contrast(fg,bg):
|
||||
def lum(c):
|
||||
v=[float(x)/255 for x in re.findall(r'[\d.]+',c)[:3]];v=[x/12.92 if x<=.04045 else ((x+.055)/1.055)**2.4 for x in v];return sum(x*w for x,w in zip(v,[.2126,.7152,.0722]))
|
||||
a,b=sorted([lum(fg),lum(bg)]);return(b+.05)/(a+.05)
|
||||
with sync_playwright() as p:
|
||||
browser=p.chromium.launch(channel='chromium',headless=True);page=browser.new_page(viewport={'width':1024,'height':900});page.goto(BASE+'/style-fixture');page.wait_for_selector('html[data-mx-ready="true"]');page.evaluate('document.fonts.ready');page.evaluate('Promise.all(document.getAnimations().filter(a=>a.effect.getComputedTiming().iterations!==Infinity).map(a=>a.finished.catch(()=>{})))')
|
||||
old=page.add_style_tag(content=subprocess.check_output(['git','show','b06921ce:src/ZB.MOM.WW.MxGateway.Server/wwwroot/css/site.css'],text=True))
|
||||
for phase in ['before','after']:
|
||||
if phase=='after':old.evaluate('e=>e.remove()')
|
||||
texts=page.locator('.quality-chip,.alarm-state,.text-secondary,.text-success,.text-warning,.text-danger,.text-info,.alert').evaluate_all('''es=>es.map(e=>{let bg='rgb(255,255,255)';for(let p=e;p;p=p.parentElement){let c=getComputedStyle(p).backgroundColor;if(c!=='rgba(0, 0, 0, 0)'&&c!=='transparent'){bg=c;break}}return {text:e.textContent.trim(),fg:getComputedStyle(e).color,bg}})''')
|
||||
for t in texts:t['contrast']=contrast(t['fg'],t['bg'])
|
||||
states={};button=page.locator('#style-primary')
|
||||
def measure():
|
||||
page.wait_for_timeout(250);return button.evaluate('e=>{let s=getComputedStyle(e);return {fg:s.color,bg:s.backgroundColor,border:s.borderColor,outline:s.outlineWidth,outlineColor:s.outlineColor,disabled:e.disabled,busy:e.getAttribute("aria-busy")}}')
|
||||
page.mouse.move(0,0);button.evaluate('e=>e.blur()');states['normal']=measure();button.hover();states['hover']=measure();button.click(position={'x':5,'y':5},trial=True);page.mouse.down();states['active']=measure();page.mouse.up();page.mouse.move(0,0);button.focus();states['pointerFocus']=measure();page.keyboard.press('Tab');page.keyboard.press('Shift+Tab');states['focus']=measure()
|
||||
disabled=page.get_by_role('button',name='Disabled action');busy=page.get_by_role('button',name='Working…');assert disabled.is_disabled() and busy.is_disabled() and busy.get_attribute('aria-busy')=='true'
|
||||
field=page.get_by_role('textbox',name='Fixture field');field.focus();focus=field.evaluate('e=>({outline:getComputedStyle(e).outlineWidth,color:getComputedStyle(e).outlineColor,shadow:getComputedStyle(e).boxShadow})');rows[phase]={'texts':texts,'states':states,'fieldFocus':focus}
|
||||
page.screenshot(path=str(OUT/(phase+'-states.png')),full_page=True)
|
||||
assert all(t['contrast']>=4.5 for t in rows['after']['texts']),rows['after']['texts']
|
||||
assert rows['after']['fieldFocus']['outline']=='2px' and rows['after']['fieldFocus']['shadow']=='none'
|
||||
(OUT/'style-confirmation.json').write_text(json.dumps(rows,indent=2))
|
||||
for state in ['normal','hover','active','pointerFocus','focus']:assert rows['after']['states'][state]['fg']==rows['before']['states'][state]['fg'] and rows['after']['states'][state]['bg']==rows['before']['states'][state]['bg']
|
||||
browser.close()
|
||||
(OUT/'style-confirmation.json').write_text(json.dumps(rows,indent=2));print(json.dumps({'minContrast':min(t['contrast'] for t in rows['after']['texts']),'primaryStateParity':True,'fieldCanonicalFocus':True}))
|
||||
@@ -0,0 +1,15 @@
|
||||
import json
|
||||
from pathlib import Path
|
||||
from playwright.sync_api import sync_playwright
|
||||
ROOT=Path(__file__).resolve().parent;BASE=json.load(open('/tmp/mx-ui-overview-state.json'))['origin'];rows={}
|
||||
with sync_playwright() as p:
|
||||
browser=p.chromium.launch(channel='chromium',headless=True);page=browser.new_page();page.goto(BASE+'/native-fixture');page.wait_for_selector('html[data-mx-ready="true"]');page.evaluate('Promise.all(document.getAnimations().map(a=>a.finished.catch(()=>{})))')
|
||||
button=page.get_by_role('button',name='Create API key',exact=True)
|
||||
def measure():
|
||||
page.wait_for_timeout(250)
|
||||
return button.evaluate('e=>{let s=getComputedStyle(e);return Object.fromEntries(["color","backgroundColor","borderColor","outlineColor","outlineWidth","boxShadow","opacity"].map(k=>[k,s[k]]))}')
|
||||
for phase in ['withLocalPrimary','withoutLocalPrimary']:
|
||||
if phase=='withoutLocalPrimary':page.evaluate('''()=>{let s=[...document.styleSheets].find(s=>s.href?.endsWith('/css/site.css'));for(let i=s.cssRules.length-1;i>=0;i--){let r=s.cssRules[i];if(r.selectorText==='.btn-primary'||r.selectorText==='.btn-primary:hover, .btn-primary:focus')s.deleteRule(i)}}''')
|
||||
states={};page.mouse.move(0,0);button.evaluate('e=>e.blur()');states['normal']=measure();button.hover();states['hover']=measure();page.mouse.move(0,0);button.focus();states['focus']=measure();button.evaluate('e=>{e.disabled=true}');states['disabled']=measure();button.evaluate('e=>{e.disabled=false}');rows[phase]=states
|
||||
browser.close()
|
||||
OUT=ROOT/'evidence/mx05';OUT.mkdir(exist_ok=True);(OUT/'primary-before-removal.json').write_text(json.dumps(rows,indent=2));print(json.dumps(rows,indent=2))
|
||||
@@ -0,0 +1,35 @@
|
||||
# Technical-Light token, recovery and navigation acceptance
|
||||
|
||||
MX-05/06/08 use shared Theme1.0.1 and delivered Secrets.Ui1.0.1/Abstractions0.6.6; the existing Secrets/Core runtime package remains0.6.2. Exact official nupkg hashes and restored graph are in evidence/mx-final/packages.json. Framework HtmlRenderer/xUnit remain; no bUnit/parser dependency was added to production or tests. No worker/COM/proto/options or production authorization policy changes.
|
||||
|
||||
## Shared visual ownership
|
||||
|
||||
Repeated surface/border/hover/semantic text colors now resolve to canonical tokens. Signal fills remain distinct from readable status inks. Bootstrap's important text utilities have explicit host adapters. Theme owns primary normal/hover/active/disabled colors; the measured pointer-focus difference requires one retained token-based local focus rule. Shared keyboard outlines and form focus replace the duplicate local halo; app-specific field/button geometry remains local. Structural native backdrop opacity and menu elevation remain documented local geometry, with menu color derived from ink.
|
||||
|
||||
Actual paired component measurements use the real Theme buttons and MX host styles. Semantic text contrast is at least5.555:1. Primary normal/hover/active/pointer-focus/keyboard-focus colors match before/after; disabled/busy semantics remain native, busy text is meaningful. Field keyboard focus is2px with no duplicate shadow. Evidence/mx05 contains computed values, source CSS comparison and captured component states. The first immediate-transition probe was corrected to wait for actual state settling. A first busy fixture wait incorrectly awaited the infinite busy spinner; the harness now waits only finite entrances. These are measurement fixes, not product animation workarounds. Local page-owned entrance animations now honor reduced motion with final opaque content.
|
||||
|
||||
## Recoverable browse failures
|
||||
|
||||
App-local DashboardDiagnostic renders escaped complete detail through the existing DashboardRedactor boundary. Tree failures expose context-named native disclosure and Retry. Retry shares existing loading callbacks, has a guard before focus await, keeps the affected object's stable toggle focused and announces one recovery. Siblings, watched values and tree state remain. Search/read errors have visible recovery text, and redeploy notification failures retain their existing automatic reconnection. Manual live-read Retry uses the existing read path under a shared single-flight guard; no new automatic retry/poll loop or telemetry was introduced. Existing per-value quality error hover metadata remains outside this tree/global-error task.
|
||||
|
||||
Four meaningful framework cases cover sensitive detail redaction and long escaped text; existing tree/home/render tests remain. Actual once-failing child fixture verifies full600+character detail, exactly one recovery attempt, retained watched sibling and stable focus at1440/1024/390px and real200% zoom. Initial fixture attempted to fail a leaf whose attributes were already loaded; no child request occurred. That failed harness run is retained, followed by a fixture-only nested child and correct actual failure/recovery proof. A final focused recheck covers the guard refinement. No COM/worker provider runs.
|
||||
|
||||
## Navigation and real host layout
|
||||
|
||||
Overview, API keys and Sign out use shared sentence case. Routes, NavRailSection persistence keys, enum text, policy constants and static POST logout/antiforgery are unchanged. Actual MainLayout fixtures cover Admin/Viewer/anonymous visibility, keyboard footer reachability and native narrow navigation. Twelve destination cases verify exactly one active rail item and matching h1/document title for Overview/Browse/API keys at1440/390px for Admin/Viewer; viewers retain read-only key access without create controls. Login remains the shared native POST LoginCard with existing return URL and antiforgery behavior. No login/logout is submitted during browser QA.
|
||||
|
||||
The fixture now exposes actual production URL aliases for the three destination checks; its standalone native-dialog scenario moved to /native-fixture. Reproduction scripts use that synthetic path. These aliases do not change production routing.
|
||||
|
||||
## Verification and limits
|
||||
|
||||
NonWindows solution build:0warnings/0errors. Full gateway: **1460 passed,0failed,6existing platform skips**, after a standard-path restore of the final shared package graph. A prior no-restore full run still read the old standard obj graph while the isolated fixture had the new graph; pre-package-refresh evidence is retained separately and is not the final package proof. Final targeted tests cover subsequent copy/description-only adjustments. Actual MainLayout17-case keyboard/recovery/principal/viewport/reduced-motion matrix has0pageerrors/document overflow; separate12 destination cases pass. Earlier generic-shell17 cases remain history, not proof of the actual rail.
|
||||
|
||||
Shared Theme assets must be deployed together with their app. Rollback restores the consumer commit/package graph plus matching dialog module and component, never just one side. Previous immutable Theme0.5.0/Secrets0.6.2 artifacts and pre-migration source identify the rollback inputs; no application deployment has occurred. Windows/COM/live LDAP/worker acceptance is not claimed. The shared Abstractions450-character name/tombstone limit requires host inventory before production adoption; legacy-provider default snapshot behavior has the bounded producer compatibility proof. No real secret, historian write, key mutation, database migration or live gateway restart was used for these checks.
|
||||
|
||||
## Independent identity review corrections
|
||||
|
||||
The peer review found two concrete identity/lifetime gaps before final commit. Tree Retry now captures node/callback/generation before native focus awaits, invalidates on parameter replacement/disposal, and applies post-await load/error/recovery only to the current captured node. Roots and recursive children have stable object keys. Two actual framework lifecycle regressions defer the native FocusAsync seam, replace parameters or dispose the renderer, then verify no stale callback dispatch; these passed2/2. No initial red is claimed because the production fix existed at the first runnable regression build.
|
||||
|
||||
Fault summaries/table rows now key their session/source/worker/message identity, excluding the per-snapshot observation timestamp. A real Blazor fixture opens and focuses sessionA's complete diagnostic, then prepends/reorders faults and advances A's timestamp. Before correction, both compact and table modes transferred the open/focused DOM to another session; retained browser JSON records both failures. After correction, both retain A's original focused/open element across that snapshot. This is actual DOM identity evidence, not an HTML snapshot assertion. The final whole gateway suite passes1460/6 after both fixes.
|
||||
|
||||
The newly introduced diagnostic/supporting-counter disclosures also measure at least44px in an explicitly verified coarse/touch context. Final native recovery/reduced-motion recheck has0pageerrors. Three actual runtime shared DLLs and seven downloaded CSS/font/module assets equal accepted official package bytes (served-assets.json). The fixture uses ephemeral data protection and synthetic principals; no new persistent credential store is required.
|
||||
@@ -11,7 +11,7 @@ with sync_playwright() as p:
|
||||
page=ctx.new_page()
|
||||
for width,zoom in [(1440,1),(390,1),(1440,2)]:
|
||||
page.set_viewport_size({'width':width,'height':900});page.goto(BASE);page.wait_for_selector('html[data-mx-ready="true"]');set_browser_zoom(worker,page,zoom)
|
||||
page.get_by_role('button',name='Create API Key',exact=True).click();page.locator('dialog:modal').wait_for()
|
||||
page.get_by_role('button',name='Create API key',exact=True).click();page.locator('dialog:modal').wait_for()
|
||||
page.wait_for_function("document.querySelector('#keyId')===document.activeElement")
|
||||
initial=page.locator('#keyId').evaluate('(e)=>{const r=e.getBoundingClientRect();return r.top>=0&&r.bottom<=innerHeight}')
|
||||
samples=[]
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
is owned by the kit's <details> + ThemeScripts (no JS interop here). *@
|
||||
<ThemeShell Product="MXAccess Gateway" Accent="#2f5fd0">
|
||||
<Nav>
|
||||
<NavRailItem Href="/" Text="Dashboard" Match="NavLinkMatch.All" />
|
||||
<NavRailItem Href="/" Text="Overview" Match="NavLinkMatch.All" />
|
||||
<NavRailSection Title="Runtime" Key="runtime">
|
||||
<NavRailItem Href="/sessions" Text="Sessions" />
|
||||
<NavRailItem Href="/workers" Text="Workers" />
|
||||
@@ -26,7 +26,7 @@
|
||||
<NavRailItem Href="/browse" Text="Browse" />
|
||||
</NavRailSection>
|
||||
<NavRailSection Title="Admin" Key="admin">
|
||||
<NavRailItem Href="/apikeys" Text="API Keys" />
|
||||
<NavRailItem Href="/apikeys" Text="API keys" />
|
||||
@* Gated on the SAME policy the mounted /admin/secrets page enforces, not on a role
|
||||
literal, so nav visibility cannot drift from page access. In this host the two are
|
||||
equivalent — GatewayOptionsValidator constrains Dashboard:GroupToRole values to
|
||||
@@ -50,11 +50,11 @@
|
||||
<span class="rail-user">@authState.User.Identity?.Name</span>
|
||||
<form method="post" action="/logout" data-enhance="false">
|
||||
<AntiforgeryToken />
|
||||
<button class="rail-btn" type="submit">Sign Out</button>
|
||||
<button class="rail-btn" type="submit">Sign out</button>
|
||||
</form>
|
||||
</Authorized>
|
||||
<NotAuthorized>
|
||||
<a class="rail-btn" href="/login">Sign In</a>
|
||||
<a class="rail-btn" href="/login">Sign in</a>
|
||||
</NotAuthorized>
|
||||
</AuthorizeView>
|
||||
</RailFooter>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||
@inject IDashboardApiKeyManagementService ApiKeyManagementService
|
||||
|
||||
<PageTitle>Dashboard API Keys</PageTitle>
|
||||
<PageTitle>MXAccess Gateway — API keys</PageTitle>
|
||||
|
||||
@if (Snapshot is null)
|
||||
{
|
||||
@@ -14,13 +14,13 @@ else
|
||||
{
|
||||
<div class="dashboard-page-header">
|
||||
<div>
|
||||
<h1>API Keys</h1>
|
||||
<h1>API keys</h1>
|
||||
<div class="text-secondary">@Snapshot.ApiKeys.Count key rows</div>
|
||||
</div>
|
||||
@if (CanManageApiKeys)
|
||||
{
|
||||
<button type="button" class="btn btn-primary" @onclick="OpenCreateDialog">
|
||||
Create API Key
|
||||
Create API key
|
||||
</button>
|
||||
}
|
||||
</div>
|
||||
@@ -60,7 +60,7 @@ else
|
||||
form-label small, mb-2/mb-3 row wrappers, Save/Cancel
|
||||
inline at the bottom of the card-body (no modal-footer). *@
|
||||
<div class="modal-header">
|
||||
<h2 class="modal-title h5" id="createApiKeyTitle">Create API Key</h2>
|
||||
<h2 class="modal-title h5" id="createApiKeyTitle">Create API key</h2>
|
||||
<button type="button" class="btn-close" aria-label="Close create API key" disabled="@IsBusy" @onclick="CloseCreateDialog"></button>
|
||||
</div>
|
||||
@if (!LastOperationSucceeded && !string.IsNullOrWhiteSpace(ResultMessage))
|
||||
@@ -71,7 +71,7 @@ else
|
||||
<EditForm Model="@CreateModel" OnSubmit="@CreateApiKeyAsync">
|
||||
<div class="card mb-3">
|
||||
<div class="card-body">
|
||||
<h6 class="card-title">Create API Key</h6>
|
||||
<h6 class="card-title">Create API key</h6>
|
||||
<div class="mb-2">
|
||||
<label for="keyId" class="form-label small">Key ID</label>
|
||||
<input id="keyId" data-dialog-initial class="form-control form-control-sm" @bind="CreateModel.KeyId" @bind:event="oninput" />
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
@using ZB.MOM.WW.GalaxyRepository
|
||||
@using ZB.MOM.WW.GalaxyRepository.Grpc
|
||||
|
||||
<PageTitle>Dashboard Browse</PageTitle>
|
||||
<PageTitle>MXAccess Gateway — Browse</PageTitle>
|
||||
|
||||
<div class="dashboard-page-header">
|
||||
<div>
|
||||
@@ -52,7 +52,7 @@
|
||||
{
|
||||
@if (!string.IsNullOrWhiteSpace(_searchError))
|
||||
{
|
||||
<div class="alert alert-danger">Search failed: @_searchError</div>
|
||||
<DashboardDiagnostic Title="Search unavailable. Your watched attributes are retained." Detail="@_searchError" RetryText="Retry search" OnRetry="@(() => ScheduleSearch(Search))" />
|
||||
}
|
||||
else if (_searchPending && _searchMatches.Count == 0)
|
||||
{
|
||||
@@ -107,7 +107,7 @@
|
||||
<div class="browse-tree" role="region" aria-label="Galaxy hierarchy" tabindex="0">
|
||||
@foreach (DashboardBrowseNode root in _roots)
|
||||
{
|
||||
<BrowseTreeNodeView Node="root"
|
||||
<BrowseTreeNodeView @key="root.Object.GobjectId" Node="root"
|
||||
OnAddTag="AddTagAsync"
|
||||
OnTagContextMenu="OnTagContextMenu"
|
||||
OnLoadChildren="LoadChildrenAsync" />
|
||||
@@ -139,14 +139,12 @@
|
||||
|
||||
@if (!string.IsNullOrWhiteSpace(_readError))
|
||||
{
|
||||
<div class="alert alert-danger">Live read failed: @_readError</div>
|
||||
<DashboardDiagnostic Title="Live values could not be refreshed. Watched attributes are retained." Detail="@_readError" RetryText="Retry live values" OnRetry="RetryReadAsync" />
|
||||
}
|
||||
|
||||
@if (!string.IsNullOrWhiteSpace(_deployError))
|
||||
{
|
||||
<div class="alert alert-warning">
|
||||
Galaxy redeploy notifications failed (retrying): @_deployError
|
||||
</div>
|
||||
<DashboardDiagnostic Severity="alert-warning" Title="Redeploy notifications unavailable. Reconnecting automatically." Detail="@_deployError" />
|
||||
}
|
||||
|
||||
@if (_subscribed.Count == 0)
|
||||
@@ -363,7 +361,7 @@
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
await ReportAsync(() => _deployError = ex.Message).ConfigureAwait(false);
|
||||
await ReportAsync(() => _deployError = DashboardRedactor.Redact(ex.Message)).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
try
|
||||
@@ -462,7 +460,7 @@
|
||||
if (ReferenceEquals(_searchCts, searchCts))
|
||||
{
|
||||
_searchPending = false;
|
||||
_searchError = ex.Message;
|
||||
_searchError = DashboardRedactor.Redact(ex.Message);
|
||||
}
|
||||
}).ConfigureAwait(false);
|
||||
}
|
||||
@@ -632,7 +630,7 @@
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
await ReportAsync(() => _readError = ex.Message).ConfigureAwait(false);
|
||||
await ReportAsync(() => _readError = DashboardRedactor.Redact(ex.Message)).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -655,35 +653,51 @@
|
||||
}
|
||||
}
|
||||
|
||||
private bool _reading;
|
||||
|
||||
private async Task RetryReadAsync()
|
||||
{
|
||||
try { await RefreshValuesAsync(); }
|
||||
catch (OperationCanceledException) when (_cts.IsCancellationRequested) { }
|
||||
catch (Exception ex) { _readError = DashboardRedactor.Redact(ex.Message); }
|
||||
}
|
||||
|
||||
private async Task RefreshValuesAsync()
|
||||
{
|
||||
if (_subscribed.Count == 0)
|
||||
if (_reading || _disposing) return;
|
||||
_reading = true;
|
||||
try
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
string[] tags = [.. _subscribed];
|
||||
DashboardLiveReadResult result = await LiveData.ReadAsync(tags, _viewerId, _cts.Token);
|
||||
_readError = result.Error;
|
||||
_workerPid = result.WorkerProcessId;
|
||||
DateTimeOffset now = DateTimeOffset.UtcNow;
|
||||
foreach (DashboardTagValue value in result.Values)
|
||||
{
|
||||
// Stamp the observed-change time only when the value/quality
|
||||
// signature actually changes, so the Updated column does not
|
||||
// tick on every poll for a static tag.
|
||||
string signature = $"{value.ValueText}{value.Quality}{value.Ok}";
|
||||
if (!_valueSignature.TryGetValue(value.TagAddress, out string? previous)
|
||||
|| previous != signature)
|
||||
if (_subscribed.Count == 0)
|
||||
{
|
||||
_valueSignature[value.TagAddress] = signature;
|
||||
_observedChangeAt[value.TagAddress] = now;
|
||||
return;
|
||||
}
|
||||
|
||||
_values[value.TagAddress] = value;
|
||||
}
|
||||
string[] tags = [.. _subscribed];
|
||||
DashboardLiveReadResult result = await LiveData.ReadAsync(tags, _viewerId, _cts.Token);
|
||||
if (_disposing) return;
|
||||
_readError = DashboardRedactor.Redact(result.Error);
|
||||
_workerPid = result.WorkerProcessId;
|
||||
DateTimeOffset now = DateTimeOffset.UtcNow;
|
||||
foreach (DashboardTagValue value in result.Values)
|
||||
{
|
||||
// Stamp the observed-change time only when the value/quality
|
||||
// signature actually changes, so the Updated column does not
|
||||
// tick on every poll for a static tag.
|
||||
string signature = $"{value.ValueText}{value.Quality}{value.Ok}";
|
||||
if (!_valueSignature.TryGetValue(value.TagAddress, out string? previous)
|
||||
|| previous != signature)
|
||||
{
|
||||
_valueSignature[value.TagAddress] = signature;
|
||||
_observedChangeAt[value.TagAddress] = now;
|
||||
}
|
||||
|
||||
StateHasChanged();
|
||||
_values[value.TagAddress] = value;
|
||||
}
|
||||
|
||||
StateHasChanged();
|
||||
}
|
||||
finally { _reading = false; }
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@page "/"
|
||||
@inherits DashboardPageBase
|
||||
|
||||
<PageTitle>MXAccess Gateway Dashboard</PageTitle>
|
||||
<PageTitle>MXAccess Gateway — Overview</PageTitle>
|
||||
|
||||
@if (Snapshot is null)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
@using Microsoft.JSInterop
|
||||
@using ZB.MOM.WW.GalaxyRepository.Grpc
|
||||
@implements IDisposable
|
||||
|
||||
@*
|
||||
Recursive Browse hierarchy node. Renders one Galaxy object, its child
|
||||
@@ -16,7 +18,7 @@
|
||||
<div class="tree-row @(Node.IsArea ? "tree-row-area" : "tree-row-object")">
|
||||
@if (ShowToggle())
|
||||
{
|
||||
<button type="button" class="tree-node-toggle" @onclick="ToggleAsync"
|
||||
<button @ref="_toggle" type="button" class="tree-node-toggle" @onclick="ToggleAsync"
|
||||
aria-label="@($"{(_expanded ? "Collapse" : "Expand")} {Node.DisplayName}")"
|
||||
aria-expanded="@(_expanded ? "true" : "false")" aria-controls="@ChildrenId">
|
||||
<span class="tree-toggle" aria-hidden="true">@(_expanded ? "▾" : "▸")</span>
|
||||
@@ -55,17 +57,16 @@
|
||||
}
|
||||
else if (Node.LoadState == BrowseLoadState.Error)
|
||||
{
|
||||
@* Abbreviated: sibling tree rows are nowrap inside a fixed-height
|
||||
scroller, so a full COM/SQL error would stretch the whole pane. *@
|
||||
<div class="tree-load-status text-danger" title="@Node.LoadError">
|
||||
<span class="tree-toggle tree-toggle-empty"></span>
|
||||
<span>Failed to load: @DashboardDisplay.Abbreviate(Node.LoadError, 60)</span>
|
||||
</div>
|
||||
<DashboardDiagnostic Title="@($"Could not load {Node.DisplayName}.")" Detail="@Node.LoadError"
|
||||
DetailsLabel="@($"Show diagnostic details for {Node.DisplayName}")"
|
||||
RetryText="@($"Retry loading {Node.DisplayName}")" OnRetry="RetryAsync" />
|
||||
}
|
||||
|
||||
@if (_recovered)
|
||||
{ <p class="browse-search-note" role="status">Loaded @Node.DisplayName.</p> }
|
||||
@foreach (DashboardBrowseNode child in Node.Children)
|
||||
{
|
||||
<BrowseTreeNodeView Node="child"
|
||||
<BrowseTreeNodeView @key="child.Object.GobjectId" Node="child"
|
||||
OnAddTag="OnAddTag"
|
||||
OnTagContextMenu="OnTagContextMenu"
|
||||
OnLoadChildren="OnLoadChildren" />
|
||||
@@ -124,7 +125,33 @@
|
||||
[Parameter]
|
||||
public Func<DashboardBrowseNode, Task>? OnLoadChildren { get; set; }
|
||||
|
||||
private ElementReference _toggle;
|
||||
private bool _expanded;
|
||||
private bool _recovered;
|
||||
private bool _retrying;
|
||||
private bool _disposed;
|
||||
private long _generation;
|
||||
private DashboardBrowseNode? _currentNode;
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
if (ReferenceEquals(_currentNode, Node)) return;
|
||||
_currentNode = Node;
|
||||
++_generation;
|
||||
_retrying = false;
|
||||
_recovered = false;
|
||||
}
|
||||
|
||||
private bool IsCurrent(DashboardBrowseNode node, long generation) =>
|
||||
!_disposed && generation == _generation && ReferenceEquals(Node, node);
|
||||
|
||||
/// <inheritdoc />
|
||||
public void Dispose()
|
||||
{
|
||||
_disposed = true;
|
||||
++_generation;
|
||||
}
|
||||
|
||||
// The triangle is shown whenever the projector says children exist (even
|
||||
// pre-load), or attributes are already present, or already-loaded children
|
||||
@@ -138,7 +165,7 @@
|
||||
|
||||
private async Task ToggleAsync()
|
||||
{
|
||||
if (!ShowToggle())
|
||||
if (_disposed || !ShowToggle())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -150,17 +177,47 @@
|
||||
&& Node.LoadState == BrowseLoadState.NotLoaded
|
||||
&& OnLoadChildren is not null)
|
||||
{
|
||||
Node.LoadState = BrowseLoadState.Loading;
|
||||
try
|
||||
{
|
||||
await OnLoadChildren(Node);
|
||||
Node.LoadState = BrowseLoadState.Loaded;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Node.LoadState = BrowseLoadState.Error;
|
||||
Node.LoadError = ex.Message;
|
||||
}
|
||||
await LoadAsync(Node, OnLoadChildren, _generation, false);
|
||||
}
|
||||
}
|
||||
|
||||
private async Task RetryAsync()
|
||||
{
|
||||
DashboardBrowseNode node = Node;
|
||||
Func<DashboardBrowseNode, Task>? load = OnLoadChildren;
|
||||
long generation = _generation;
|
||||
if (_disposed || _retrying || node.LoadState != BrowseLoadState.Error || load is null) return;
|
||||
_retrying = true;
|
||||
try
|
||||
{
|
||||
// The user action removes Retry; focus the same object's stable toggle.
|
||||
await _toggle.FocusAsync();
|
||||
if (!IsCurrent(node, generation)) return;
|
||||
await LoadAsync(node, load, generation, true);
|
||||
}
|
||||
catch (JSDisconnectedException) { }
|
||||
catch (OperationCanceledException) when (!IsCurrent(node, generation)) { }
|
||||
finally { if (IsCurrent(node, generation)) _retrying = false; }
|
||||
}
|
||||
|
||||
private async Task LoadAsync(DashboardBrowseNode node, Func<DashboardBrowseNode, Task> load, long generation, bool retry)
|
||||
{
|
||||
if (!IsCurrent(node, generation) || node.LoadState == BrowseLoadState.Loading) return;
|
||||
node.LoadState = BrowseLoadState.Loading;
|
||||
_recovered = false;
|
||||
try
|
||||
{
|
||||
await load(node);
|
||||
if (!IsCurrent(node, generation)) return;
|
||||
node.LoadState = BrowseLoadState.Loaded;
|
||||
node.LoadError = null;
|
||||
_recovered = retry;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (!IsCurrent(node, generation)) return;
|
||||
node.LoadState = BrowseLoadState.Error;
|
||||
node.LoadError = DashboardRedactor.Redact(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
<div class="alert @Severity dashboard-diagnostic">
|
||||
<p class="mb-1" role="alert">@Title</p>
|
||||
<details>
|
||||
<summary>@DetailsLabel</summary>
|
||||
<pre tabindex="0" role="region" aria-label="@($"{Title} details")">@DashboardRedactor.Redact(Detail)</pre>
|
||||
</details>
|
||||
@if (OnRetry.HasDelegate)
|
||||
{
|
||||
<button type="button" class="btn btn-outline-secondary btn-sm mt-2" @onclick="OnRetry">@RetryText</button>
|
||||
}
|
||||
</div>
|
||||
@code {
|
||||
[Parameter, EditorRequired] public string Title { get; set; } = string.Empty;
|
||||
[Parameter] public string DetailsLabel { get; set; } = "Diagnostic details";
|
||||
[Parameter] public string? Detail { get; set; }
|
||||
[Parameter] public string Severity { get; set; } = "alert-danger";
|
||||
[Parameter] public EventCallback OnRetry { get; set; }
|
||||
[Parameter] public string RetryText { get; set; } = "Retry";
|
||||
}
|
||||
@@ -7,7 +7,7 @@ else if (Compact)
|
||||
<div class="fault-summaries">
|
||||
@foreach (DashboardFaultSummary fault in Faults)
|
||||
{
|
||||
<article class="fault-summary">
|
||||
<article @key="(fault.SessionId, fault.Source, fault.WorkerProcessId, fault.Message)" class="fault-summary">
|
||||
<div class="d-flex gap-2 flex-wrap align-items-center"><strong>@fault.Source</strong><StatusBadge Text="@fault.State" /></div>
|
||||
@if (fault.Message.Length > 160)
|
||||
{
|
||||
@@ -47,7 +47,7 @@ else
|
||||
<tbody>
|
||||
@foreach (DashboardFaultSummary fault in Faults)
|
||||
{
|
||||
<tr>
|
||||
<tr @key="(fault.SessionId, fault.Source, fault.WorkerProcessId, fault.Message)">
|
||||
<td>@DashboardDisplay.DateTime(fault.ObservedAt)</td>
|
||||
<td>@fault.Source</td>
|
||||
<td>
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
<PackageReference Include="ZB.MOM.WW.Telemetry.Serilog" Version="0.3.1" />
|
||||
<PackageReference Include="ZB.MOM.WW.GalaxyRepository" Version="0.2.0" />
|
||||
<PackageReference Include="ZB.MOM.WW.Secrets" Version="0.6.2" />
|
||||
<PackageReference Include="ZB.MOM.WW.Secrets.Abstractions" Version="0.6.2" />
|
||||
<PackageReference Include="ZB.MOM.WW.Secrets.Ui" Version="0.6.2" />
|
||||
<PackageReference Include="ZB.MOM.WW.Secrets.Abstractions" Version="0.6.6" />
|
||||
<PackageReference Include="ZB.MOM.WW.Secrets.Ui" Version="1.0.1" />
|
||||
<PackageReference Include="Serilog.AspNetCore" Version="10.0.0" />
|
||||
<PackageReference Include="Serilog.Sinks.Console" Version="6.1.1" />
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="7.0.0" />
|
||||
|
||||
@@ -41,7 +41,7 @@ body.dashboard-body { min-height: 100vh; }
|
||||
|
||||
/* ── KPI / aggregate cards ───────────────────────────────────────────────────
|
||||
The MetricCard component renders .agg-card with label/value/sub; this is
|
||||
the technical-light aggregate card — uppercase eyebrow, big mono number.
|
||||
the technical-light aggregate card with a compact label and tabular value.
|
||||
Class names align with master (ScadaLink CentralUI) for consistency. */
|
||||
.metric-grid {
|
||||
display: grid;
|
||||
@@ -131,7 +131,7 @@ body.dashboard-body { min-height: 100vh; }
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
color: var(--ink-faint);
|
||||
background: #fbfbf9;
|
||||
background: var(--zebra-bg);
|
||||
white-space: nowrap;
|
||||
}
|
||||
.dashboard-table td {
|
||||
@@ -141,7 +141,7 @@ body.dashboard-body { min-height: 100vh; }
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
.dashboard-table tbody tr:last-child td { border-bottom: none; }
|
||||
.dashboard-table tbody tr:hover { background: #f3f6fd; }
|
||||
.dashboard-table tbody tr:hover { background: var(--hover-bg); }
|
||||
|
||||
/* Key/value detail tables: left label column, monospace values, zebra rows. */
|
||||
.details-table th {
|
||||
@@ -159,8 +159,8 @@ body.dashboard-body { min-height: 100vh; }
|
||||
font-size: 0.82rem;
|
||||
color: var(--ink);
|
||||
}
|
||||
.details-table tbody tr:nth-child(even) { background: #fbfbf9; }
|
||||
.details-table tbody tr:hover { background: #fbfbf9; }
|
||||
.details-table tbody tr:nth-child(even) { background: var(--zebra-bg); }
|
||||
.details-table tbody tr:hover { background: var(--zebra-bg); }
|
||||
|
||||
/* Inline code: monospace, accent ink, no Bootstrap pink. */
|
||||
code {
|
||||
@@ -174,7 +174,7 @@ code {
|
||||
|
||||
/* ── Empty / placeholder state ───────────────────────────────────────────────*/
|
||||
.empty-state {
|
||||
background: #fbfbf9;
|
||||
background: var(--zebra-bg);
|
||||
border: 1px dashed var(--rule-strong);
|
||||
border-radius: 6px;
|
||||
color: var(--ink-faint);
|
||||
@@ -196,17 +196,8 @@ code {
|
||||
literal rather than --bs-btn-border-radius so .btn-sm cannot shrink it; the
|
||||
.btn-group seam rules outrank .btn, so groups still render seamed. */
|
||||
.btn { border-radius: 5px; font-weight: 500; white-space: nowrap; }
|
||||
.btn-primary {
|
||||
background: var(--accent);
|
||||
border-color: var(--accent);
|
||||
color: #fff;
|
||||
}
|
||||
.btn-primary:hover,
|
||||
.btn-primary:focus {
|
||||
background: var(--accent-deep);
|
||||
border-color: var(--accent-deep);
|
||||
color: #fff;
|
||||
}
|
||||
/* Pointer focus remains deep after the click; shared Theme owns normal/hover/active/disabled. */
|
||||
.btn-primary:focus { background: var(--accent-deep); border-color: var(--accent-deep); color: var(--on-accent); }
|
||||
.btn-outline-secondary {
|
||||
color: var(--ink-soft);
|
||||
background: var(--card);
|
||||
@@ -214,18 +205,18 @@ code {
|
||||
}
|
||||
.btn-outline-secondary:hover {
|
||||
color: var(--ink);
|
||||
background: #f0f0ec;
|
||||
background: var(--hover-bg);
|
||||
border-color: var(--rule-strong);
|
||||
}
|
||||
.btn-outline-danger {
|
||||
color: var(--bad);
|
||||
color: var(--bad-ink);
|
||||
background: var(--card);
|
||||
border-color: #eec3c3;
|
||||
border-color: var(--bad-border);
|
||||
}
|
||||
.btn-outline-danger:hover {
|
||||
color: #fff;
|
||||
color: var(--on-accent);
|
||||
background: var(--bad);
|
||||
border-color: var(--bad);
|
||||
border-color: var(--bad-ink);
|
||||
}
|
||||
|
||||
/* ── Forms ───────────────────────────────────────────────────────────────────*/
|
||||
@@ -242,16 +233,10 @@ code {
|
||||
border-color: var(--rule-strong);
|
||||
border-radius: 5px;
|
||||
}
|
||||
.form-control:focus,
|
||||
.form-select:focus {
|
||||
border-color: var(--accent);
|
||||
box-shadow: 0 0 0 0.15rem rgba(47, 95, 208, 0.15);
|
||||
}
|
||||
|
||||
/* ── Alerts ──────────────────────────────────────────────────────────────────*/
|
||||
.alert { border-radius: 6px; border-width: 1px; font-size: 0.85rem; }
|
||||
.alert-success { color: var(--ok); background: var(--ok-bg); border-color: #c6e6cd; }
|
||||
.alert-danger { color: var(--bad); background: var(--bad-bg); border-color: #eec3c3; }
|
||||
.alert-success { color: var(--ok-ink); background: var(--ok-bg); border-color: var(--ok-border); }
|
||||
.alert-danger { color: var(--bad-ink); background: var(--bad-bg); border-color: var(--bad-border); }
|
||||
|
||||
/* ── API key management ──────────────────────────────────────────────────────*/
|
||||
.api-key-management-grid {
|
||||
@@ -321,7 +306,7 @@ code {
|
||||
border: 1px solid var(--rule);
|
||||
border-radius: 6px;
|
||||
padding: 0.3rem 0;
|
||||
background: #fbfbf9;
|
||||
background: var(--zebra-bg);
|
||||
}
|
||||
.browse-search-results { padding: 0.15rem 0; }
|
||||
|
||||
@@ -337,7 +322,7 @@ code {
|
||||
white-space: nowrap;
|
||||
}
|
||||
.tree-row:hover,
|
||||
.tree-attr:hover { background: #eef2fb; }
|
||||
.tree-attr:hover { background: var(--hover-bg); }
|
||||
|
||||
.tree-toggle {
|
||||
flex: none;
|
||||
@@ -394,8 +379,8 @@ code {
|
||||
padding: 0.02rem 0.28rem;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.attr-flag-alarm { color: var(--bad); background: var(--bad-bg); }
|
||||
.attr-flag-hist { color: var(--accent-deep); background: #e7ecfb; }
|
||||
.attr-flag-alarm { color: var(--bad-ink); background: var(--bad-bg); }
|
||||
.attr-flag-hist { color: var(--accent-deep); background: var(--accent-tint); }
|
||||
|
||||
/* ── Subscription panel ───────────────────────────────────────────────────── */
|
||||
.sub-panel-meta {
|
||||
@@ -424,11 +409,11 @@ code {
|
||||
padding: 0.05rem 0.4rem;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.quality-good { color: var(--ok); background: var(--ok-bg); }
|
||||
.quality-bad { color: var(--bad); background: var(--bad-bg); }
|
||||
.quality-good { color: var(--ok-ink); background: var(--ok-bg); }
|
||||
.quality-bad { color: var(--bad-ink); background: var(--bad-bg); }
|
||||
.sub-error {
|
||||
margin-left: 0.3rem;
|
||||
color: var(--bad);
|
||||
color: var(--bad-ink);
|
||||
font-weight: 700;
|
||||
cursor: help;
|
||||
}
|
||||
@@ -447,7 +432,7 @@ code {
|
||||
background: var(--card);
|
||||
border: 1px solid var(--rule-strong);
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 6px 20px rgba(27, 29, 33, 0.16);
|
||||
box-shadow: 0 6px 20px color-mix(in srgb, var(--ink) 16%, transparent);
|
||||
padding: 0.25rem;
|
||||
}
|
||||
.context-menu-head {
|
||||
@@ -474,7 +459,7 @@ code {
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.context-menu-item:hover { background: #eef2fb; color: var(--accent-deep); }
|
||||
.context-menu-item:hover { background: var(--hover-bg); color: var(--accent-deep); }
|
||||
|
||||
/* ── Alarms tab ───────────────────────────────────────────────────────────── */
|
||||
.alarm-filters {
|
||||
@@ -505,9 +490,9 @@ code {
|
||||
border-radius: 3px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.alarm-state-active { color: var(--bad); background: var(--bad-bg); }
|
||||
.alarm-state-acked { color: var(--warn); background: var(--warn-bg); }
|
||||
.alarm-state-other { color: var(--idle); background: var(--idle-bg); }
|
||||
.alarm-state-active { color: var(--bad-ink); background: var(--bad-bg); }
|
||||
.alarm-state-acked { color: var(--warn-ink); background: var(--warn-bg); }
|
||||
.alarm-state-other { color: var(--idle-ink); background: var(--idle-bg); }
|
||||
.alarm-severity {
|
||||
font-family: var(--mono);
|
||||
font-variant-numeric: tabular-nums;
|
||||
@@ -580,3 +565,27 @@ code {
|
||||
.fault-summary { min-width: 0; overflow-wrap: anywhere; }
|
||||
.fault-summary + .fault-summary { border-top: 1px solid var(--rule); padding-top: 1rem; }
|
||||
.fault-context { display: flex; flex-wrap: wrap; gap: .25rem 1rem; color: var(--ink-faint); font-size: .875rem; }
|
||||
|
||||
/* Bootstrap utilities need host adapters because its color declarations are !important. */
|
||||
.text-success { color: var(--ok-ink) !important; }
|
||||
.text-warning { color: var(--warn-ink) !important; }
|
||||
.text-danger { color: var(--bad-ink) !important; }
|
||||
.text-info { color: var(--info-ink) !important; }
|
||||
.text-primary { color: var(--accent-deep) !important; }
|
||||
.text-secondary, .text-muted { color: var(--ink-faint) !important; }
|
||||
.alert-info { color: var(--info-ink); background: var(--info-bg); border-color: var(--info-border); }
|
||||
.alert-warning { color: var(--warn-ink); background: var(--warn-bg); border-color: var(--warn-border); }
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.dashboard-page-header, .metric-grid, .dashboard-section { animation: none; opacity: 1; transform: none; }
|
||||
}
|
||||
|
||||
.dashboard-diagnostic { min-width: 0; overflow-wrap: anywhere; }
|
||||
.dashboard-diagnostic pre { max-height: 16rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; color: inherit; }
|
||||
.dashboard-diagnostic summary { cursor: pointer; }
|
||||
|
||||
@media (pointer: coarse) {
|
||||
.dashboard-diagnostic summary, .fault-diagnostic > summary, .supporting-counters > summary {
|
||||
min-height: 44px;
|
||||
padding-block: .65rem;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,170 @@
|
||||
using System.Reflection;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.AspNetCore.Components.Web;
|
||||
using Microsoft.AspNetCore.Components.Web.HtmlRendering;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.JSInterop;
|
||||
using ZB.MOM.WW.GalaxyRepository.Grpc;
|
||||
using ZB.MOM.WW.MxGateway.Server.Dashboard;
|
||||
using ZB.MOM.WW.MxGateway.Server.Dashboard.Components.Shared;
|
||||
|
||||
namespace ZB.MOM.WW.MxGateway.Tests.Dashboard;
|
||||
|
||||
/// <summary>Real component/event lifecycle regressions across the native focus interop await.</summary>
|
||||
public sealed class BrowseTreeRetryLifecycleTests
|
||||
{
|
||||
/// <summary>An old Retry cannot follow a replacement parameter into another object's load.</summary>
|
||||
[Fact]
|
||||
public async Task Retry_NodeReplacedWhileFocusPending_DoesNotDispatchForEitherIdentity()
|
||||
{
|
||||
await using var fixture = await RetryFixture.CreateAsync();
|
||||
Task retry = fixture.FireAsync("RetryAsync");
|
||||
await fixture.JavaScript.FocusEntered.Task.WaitAsync(TimeSpan.FromSeconds(5));
|
||||
DashboardBrowseNode replacement = ErrorNode(2, "Replacement");
|
||||
try
|
||||
{
|
||||
await fixture.Renderer.Dispatcher.InvokeAsync(() => fixture.Component.SetParametersAsync(
|
||||
Parameters(replacement, fixture.LoadAsync)));
|
||||
}
|
||||
finally { fixture.JavaScript.ReleaseFocus.TrySetResult(); }
|
||||
await retry.WaitAsync(TimeSpan.FromSeconds(5));
|
||||
|
||||
Assert.Equal(1, fixture.JavaScript.FocusCalls);
|
||||
Assert.Empty(fixture.LoadedNodes);
|
||||
Assert.Equal(BrowseLoadState.Error, replacement.LoadState);
|
||||
string html = await fixture.Renderer.Dispatcher.InvokeAsync(fixture.Root.ToHtmlString);
|
||||
Assert.DoesNotContain("Loaded Replacement.", html, StringComparison.Ordinal);
|
||||
}
|
||||
|
||||
/// <summary>Disposing the actual renderer during focus prevents a later load callback.</summary>
|
||||
[Fact]
|
||||
public async Task Retry_RendererDisposedWhileFocusPending_DoesNotDispatchAfterDisposal()
|
||||
{
|
||||
await using var fixture = await RetryFixture.CreateAsync();
|
||||
Task retry = fixture.FireAsync("RetryAsync");
|
||||
await fixture.JavaScript.FocusEntered.Task.WaitAsync(TimeSpan.FromSeconds(5));
|
||||
try { await fixture.DisposeRendererAsync(); }
|
||||
finally { fixture.JavaScript.ReleaseFocus.TrySetResult(); }
|
||||
await retry.WaitAsync(TimeSpan.FromSeconds(5));
|
||||
|
||||
Assert.Equal(1, fixture.JavaScript.FocusCalls);
|
||||
Assert.Empty(fixture.LoadedNodes);
|
||||
Assert.Equal(BrowseLoadState.Error, fixture.Original.LoadState);
|
||||
}
|
||||
|
||||
private static DashboardBrowseNode ErrorNode(int id, string name) => new()
|
||||
{
|
||||
Object = new GalaxyObject { GobjectId = id, BrowseName = name, TagName = name },
|
||||
HasChildrenHint = true,
|
||||
LoadState = BrowseLoadState.Error,
|
||||
LoadError = "Synthetic child load failure",
|
||||
};
|
||||
|
||||
private static ParameterView Parameters(DashboardBrowseNode node, Func<DashboardBrowseNode, Task> load)
|
||||
=> ParameterView.FromDictionary(new Dictionary<string, object?>
|
||||
{
|
||||
[nameof(BrowseTreeNodeView.Node)] = node,
|
||||
[nameof(BrowseTreeNodeView.OnLoadChildren)] = load,
|
||||
});
|
||||
|
||||
private sealed class RetryFixture : IAsyncDisposable
|
||||
{
|
||||
private readonly ServiceProvider _services;
|
||||
private bool _rendererDisposed;
|
||||
public HtmlRenderer Renderer { get; }
|
||||
public HtmlRootComponent Root { get; private set; }
|
||||
public BrowseTreeNodeView Component { get; private set; } = null!;
|
||||
public DeferredFocusRuntime JavaScript { get; } = new();
|
||||
public DashboardBrowseNode Original { get; } = ErrorNode(1, "Original");
|
||||
public List<DashboardBrowseNode> LoadedNodes { get; } = [];
|
||||
|
||||
private RetryFixture()
|
||||
{
|
||||
ServiceCollection services = new();
|
||||
services.AddLogging();
|
||||
services.AddSingleton<IJSRuntime>(JavaScript);
|
||||
services.AddSingleton<IComponentActivator, CapturingActivator>();
|
||||
_services = services.BuildServiceProvider();
|
||||
Renderer = new(_services, _services.GetRequiredService<ILoggerFactory>());
|
||||
}
|
||||
|
||||
public static async Task<RetryFixture> CreateAsync()
|
||||
{
|
||||
var fixture = new RetryFixture();
|
||||
fixture.Root = await fixture.Renderer.Dispatcher.InvokeAsync(() =>
|
||||
fixture.Renderer.RenderComponentAsync<BrowseTreeNodeView>(Parameters(fixture.Original, fixture.LoadAsync)));
|
||||
fixture.Component = fixture._services.GetRequiredService<IComponentActivator>() is CapturingActivator activator
|
||||
? activator.Component! : throw new InvalidOperationException("Component activator was not used.");
|
||||
Assert.NotNull(fixture.Component);
|
||||
await fixture.FireAsync("ToggleAsync");
|
||||
// HtmlRenderer is deliberately DOM-free. Give only its native ElementReference
|
||||
// the normal web context; FocusAsync itself still executes the actual runtime seam.
|
||||
FieldInfo field = typeof(BrowseTreeNodeView).GetField("_toggle", BindingFlags.Instance | BindingFlags.NonPublic)!;
|
||||
field.SetValue(fixture.Component, new ElementReference("synthetic-retry-toggle", new WebElementReferenceContext(fixture.JavaScript)));
|
||||
return fixture;
|
||||
}
|
||||
|
||||
public Task LoadAsync(DashboardBrowseNode node)
|
||||
{
|
||||
LoadedNodes.Add(node);
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
public Task FireAsync(string handler)
|
||||
{
|
||||
MethodInfo method = typeof(BrowseTreeNodeView).GetMethod(handler, BindingFlags.Instance | BindingFlags.NonPublic)!;
|
||||
var callback = (Func<Task>)method.CreateDelegate(typeof(Func<Task>), Component);
|
||||
// EventCallback invokes ComponentBase.IHandleEvent, including its real async
|
||||
// render lifecycle; this is not a detached new component or a declaration check.
|
||||
return Renderer.Dispatcher.InvokeAsync(() => EventCallback.Factory.Create(Component, callback).InvokeAsync());
|
||||
}
|
||||
|
||||
public async ValueTask DisposeRendererAsync()
|
||||
{
|
||||
if (_rendererDisposed) return;
|
||||
_rendererDisposed = true;
|
||||
await Renderer.DisposeAsync();
|
||||
}
|
||||
|
||||
public async ValueTask DisposeAsync()
|
||||
{
|
||||
JavaScript.ReleaseFocus.TrySetResult();
|
||||
await DisposeRendererAsync();
|
||||
await _services.DisposeAsync();
|
||||
}
|
||||
}
|
||||
|
||||
private sealed class CapturingActivator : IComponentActivator
|
||||
{
|
||||
public BrowseTreeNodeView? Component { get; private set; }
|
||||
public IComponent CreateInstance(Type componentType)
|
||||
{
|
||||
var component = (IComponent)Activator.CreateInstance(componentType)!;
|
||||
if (component is BrowseTreeNodeView node) Component = node;
|
||||
return component;
|
||||
}
|
||||
}
|
||||
|
||||
private sealed class DeferredFocusRuntime : IJSRuntime
|
||||
{
|
||||
public TaskCompletionSource FocusEntered { get; } = new(TaskCreationOptions.RunContinuationsAsynchronously);
|
||||
public TaskCompletionSource ReleaseFocus { get; } = new(TaskCreationOptions.RunContinuationsAsynchronously);
|
||||
public int FocusCalls { get; private set; }
|
||||
public ValueTask<TValue> InvokeAsync<TValue>(string identifier, object?[]? args)
|
||||
{
|
||||
Assert.Equal("Blazor._internal.domWrapper.focus", identifier);
|
||||
Assert.IsType<ElementReference>(args![0]);
|
||||
FocusCalls++;
|
||||
FocusEntered.TrySetResult();
|
||||
return new(AwaitFocusAsync<TValue>());
|
||||
}
|
||||
public ValueTask<TValue> InvokeAsync<TValue>(string identifier, CancellationToken cancellationToken, object?[]? args)
|
||||
=> InvokeAsync<TValue>(identifier, args);
|
||||
private async Task<TValue> AwaitFocusAsync<TValue>()
|
||||
{
|
||||
await ReleaseFocus.Task;
|
||||
return default!;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.AspNetCore.Components.Web;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using ZB.MOM.WW.MxGateway.Server.Dashboard.Components.Shared;
|
||||
|
||||
namespace ZB.MOM.WW.MxGateway.Tests.Dashboard;
|
||||
|
||||
/// <summary>Recoverable diagnostics preserve escaped detail and the existing redaction boundary.</summary>
|
||||
public sealed class DashboardDiagnosticRenderTests
|
||||
{
|
||||
/// <summary>A sensitive exception must not reach the visible or disclosed diagnostic.</summary>
|
||||
[Theory]
|
||||
[InlineData("password=fixture-sensitive")]
|
||||
[InlineData("authorization: fixture-sensitive")]
|
||||
[InlineData("api_key=fixture-sensitive")]
|
||||
public async Task SensitiveDiagnostic_IsRedacted(string error)
|
||||
{
|
||||
string html = await RenderAsync(error);
|
||||
Assert.DoesNotContain("fixture-sensitive", html, StringComparison.Ordinal);
|
||||
Assert.Contains("Diagnostic details", html, StringComparison.Ordinal);
|
||||
Assert.Contains("role=\"alert\"", html, StringComparison.Ordinal);
|
||||
}
|
||||
|
||||
/// <summary>Long non-sensitive detail remains complete, escaped and accessible without hover.</summary>
|
||||
[Fact]
|
||||
public async Task LongDiagnostic_PreservesCompleteEscapedText()
|
||||
{
|
||||
string error = new('x', 600);
|
||||
string html = await RenderAsync(error + "<script>fixture</script>");
|
||||
Assert.Contains(error, html, StringComparison.Ordinal);
|
||||
Assert.Contains("<script>fixture</script>", html, StringComparison.Ordinal);
|
||||
Assert.Contains("tabindex=\"0\"", html, StringComparison.Ordinal);
|
||||
Assert.DoesNotContain("<script>", html, StringComparison.Ordinal);
|
||||
}
|
||||
|
||||
private static async Task<string> RenderAsync(string error)
|
||||
{
|
||||
ServiceCollection services = new(); services.AddLogging();
|
||||
await using ServiceProvider provider = services.BuildServiceProvider();
|
||||
await using HtmlRenderer renderer = new(provider, provider.GetRequiredService<ILoggerFactory>());
|
||||
return await renderer.Dispatcher.InvokeAsync(async () => (await renderer.RenderComponentAsync<DashboardDiagnostic>(
|
||||
ParameterView.FromDictionary(new Dictionary<string, object?> { [nameof(DashboardDiagnostic.Title)] = "Load unavailable", [nameof(DashboardDiagnostic.Detail)] = error }))).ToHtmlString());
|
||||
}
|
||||
}
|
||||