95 lines
4.0 KiB
JSON
95 lines
4.0 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://freecad.org/schemas/freecad-web-p6-chrome-harness-v1.json",
|
|
"type": "object",
|
|
"required": ["schema", "result", "chrome", "mode", "origin", "viewport", "timeoutMs", "networkPolicy", "cases", "evidence", "policy"],
|
|
"properties": {
|
|
"schema": { "const": "freecad-web-p6-chrome-harness/v1" },
|
|
"result": { "enum": ["pass", "fail", "blocked_chrome_unavailable"] },
|
|
"chrome": {
|
|
"type": "object",
|
|
"required": ["path", "version"],
|
|
"properties": { "path": { "type": "string", "minLength": 1 }, "version": { "type": "string", "minLength": 1 } },
|
|
"additionalProperties": false
|
|
},
|
|
"mode": { "const": "headless-new" },
|
|
"origin": { "type": "string", "format": "uri" },
|
|
"viewport": {
|
|
"type": "object",
|
|
"required": ["width", "height", "deviceScaleFactor"],
|
|
"properties": {
|
|
"width": { "type": "integer", "minimum": 1 },
|
|
"height": { "type": "integer", "minimum": 1 },
|
|
"deviceScaleFactor": { "type": "number", "exclusiveMinimum": 0 }
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"timeoutMs": { "type": "integer", "minimum": 1 },
|
|
"networkPolicy": { "const": "intercept-and-require-zero-external-requests" },
|
|
"modulePreload": {
|
|
"type": "object",
|
|
"required": ["phase", "manifestUrl", "requestedModules", "requestedAssets", "loadedAssets", "failedAssets", "loadedBytes"],
|
|
"properties": {
|
|
"phase": { "enum": ["disabled", "loading", "ready", "error"] },
|
|
"manifestUrl": { "type": ["string", "null"] },
|
|
"requestedModules": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
"requestedKinds": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
"requestedAssets": { "type": "integer", "minimum": 0 },
|
|
"loadedAssets": { "type": "integer", "minimum": 0 },
|
|
"failedAssets": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": ["url", "message"],
|
|
"properties": { "url": { "type": "string", "minLength": 1 }, "message": { "type": "string", "minLength": 1 } },
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"loadedBytes": { "type": "integer", "minimum": 0 },
|
|
"startedAt": { "type": "string" },
|
|
"finishedAt": { "type": "string" }
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"cases": {
|
|
"type": "array",
|
|
"minItems": 5,
|
|
"items": {
|
|
"type": "object",
|
|
"required": ["id", "status", "requests", "responses", "externalRequests", "console", "exceptions", "screenshotSha256"],
|
|
"properties": {
|
|
"id": { "type": "string", "minLength": 1 },
|
|
"status": { "enum": ["pass", "fail"] },
|
|
"state": { "type": "object" },
|
|
"expected": { "type": "object" },
|
|
"observed": { "type": "object" },
|
|
"requests": { "type": "array" },
|
|
"responses": { "type": "array" },
|
|
"externalRequests": { "type": "array", "maxItems": 0 },
|
|
"console": { "type": "array" },
|
|
"exceptions": { "type": "array", "maxItems": 0 },
|
|
"screenshotSha256": { "type": ["string", "null"], "pattern": "^[a-f0-9]{64}$" }
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"evidence": {
|
|
"type": "object",
|
|
"required": ["screenshot", "screenshotSha256", "resultHash"],
|
|
"properties": {
|
|
"screenshot": { "type": "string", "minLength": 1 },
|
|
"screenshotSha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
|
|
"resultHash": { "type": "string", "pattern": "^[a-f0-9]{64}$" }
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"policy": {
|
|
"type": "object",
|
|
"required": ["browser", "nonChromeBrowsersAttempted"],
|
|
"properties": { "browser": { "const": "Google Chrome only" }, "nonChromeBrowsersAttempted": { "const": false } },
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|