High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.
test: normalize provider-volatile refs and message whitespace in the audit golden
Luigi Agosti268e4d839340
diff --git a/tests/e2e/fixtures/audit-site/golden-report.json b/tests/e2e/fixtures/audit-site/golden-report.jsonindex a8ccd0b2..abb81b2c 100644--- a/tests/e2e/fixtures/audit-site/golden-report.json+++ b/tests/e2e/fixtures/audit-site/golden-report.json@@ -14,73 +14,61 @@"interactiveElements": [{"name": "Home",- "ref": "e7","role": "link","visible": true},{"name": "Broken assets",- "ref": "e11","role": "link","visible": true},{"name": "Console errors",- "ref": "e15","role": "link","visible": true},{"name": "Accessibility issues",- "ref": "e19","role": "link","visible": true},{"name": "Clean page",- "ref": "e23","role": "link","visible": true},{"name": "Forms",- "ref": "e27","role": "link","visible": true},{"name": "Cookie echo",- "ref": "e31","role": "link","visible": true},{"name": "Product 1",- "ref": "e35","role": "link","visible": true},{"name": "Product 2",- "ref": "e39","role": "link","visible": true},{"name": "Product 3",- "ref": "e43","role": "link","visible": true},{"name": "Product 4",- "ref": "e47","role": "link","visible": true},{"name": "Product 5",- "ref": "e51","role": "link","visible": true}@@ -130,7 +118,6 @@"interactiveElements": [{"name": "Home",- "ref": "e7","role": "link","visible": true}@@ -180,21 +167,20 @@"consoleLogs": [{"level": "log",- "message": "audit-fixture log message "+ "message": "audit-fixture log message"},{"level": "warning",- "message": "audit-fixture warn message "+ "message": "audit-fixture warn message"},{"level": "error",- "message": "audit-fixture error message "+ "message": "audit-fixture error message"}],"interactiveElements": [{"name": "Home",- "ref": "e5","role": "link","visible": true}@@ -220,23 +206,19 @@"consoleLogs": [],"interactiveElements": [{- "ref": "e6","role": "textbox","visible": true},{- "ref": "e7","role": "link","visible": true},{- "ref": "e8","role": "button","visible": true},{"name": "Home",- "ref": "e10","role": "link","visible": true}@@ -269,19 +251,16 @@"interactiveElements": [{"name": "Search",- "ref": "e8","role": "textbox","visible": true},{"name": "Search",- "ref": "e9","role": "button","visible": true},{"name": "Home",- "ref": "e12","role": "link","visible": true}@@ -308,25 +287,21 @@"interactiveElements": [{"name": "Username",- "ref": "e8","role": "textbox","visible": true},{"name": "Password",- "ref": "e11","role": "textbox","visible": true},{"name": "Sign in",- "ref": "e12","role": "button","visible": true},{"name": "Home",- "ref": "e15","role": "link","visible": true}@@ -360,13 +335,12 @@"consoleLogs": [{"level": "log",- "message": "cookies: "+ "message": "cookies:"}],"interactiveElements": [{"name": "Home",- "ref": "e6","role": "link","visible": true}@@ -393,7 +367,6 @@"interactiveElements": [{"name": "Home",- "ref": "e6","role": "link","visible": true}@@ -420,7 +393,6 @@"interactiveElements": [{"name": "Home",- "ref": "e6","role": "link","visible": true}@@ -447,7 +419,6 @@"interactiveElements": [{"name": "Home",- "ref": "e6","role": "link","visible": true}@@ -474,7 +445,6 @@"interactiveElements": [{"name": "Home",- "ref": "e6","role": "link","visible": true}@@ -501,7 +471,6 @@"interactiveElements": [{"name": "Home",- "ref": "e6","role": "link","visible": true}diff --git a/tests/e2e/fixtures/audit-site/normalize-report.jq b/tests/e2e/fixtures/audit-site/normalize-report.jqindex 77f71cc5..58fd1181 100644--- a/tests/e2e/fixtures/audit-site/normalize-report.jq+++ b/tests/e2e/fixtures/audit-site/normalize-report.jq@@ -6,6 +6,9 @@# timestamps/sources, and network entry fields that vary per run (timings,# sizes, request ids); network entries and broken assets are sorted by URL# because subresource completion order is nondeterministic (more so under load).+# Console messages are trimmed of trailing whitespace and interactive-element+# refs are dropped: both vary by capture path / accessibility tree across+# browser providers (chrome vs cloak) while the content itself is stable.## Regenerate the golden report (from a runner shell against the e2e stack):# curl -s -H "Authorization: Bearer $E2E_SERVER_TOKEN" -X POST "$E2E_SERVER/audit" \@@ -18,7 +21,8 @@del(.screenshot)| .browser.screenshotPath = ""| .browser.timingMetrics = {}- | .browser.consoleLogs = ((.browser.consoleLogs // []) | map({level: .level, message: .message}))+ | .browser.consoleLogs = ((.browser.consoleLogs // []) | map({level: .level, message: (.message | sub("\\s+$"; ""))}))+ | .browser.interactiveElements = ((.browser.interactiveElements // []) | map(del(.ref)))| .browser.networkRequests = ((.browser.networkRequests // [])| map({url: .url, method: .method, status: .status, resourceType: .resourceType})| sort_by(.url))