{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bugbug-io/json-schema/bugbug-io-v2-step-run-detail-schema.json",
  "title": "V2StepRunDetail",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bugbug-io-openapi.json#/components/schemas/V2StepRunDetail",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "readOnly": true
    },
    "stepId": {
      "type": "string",
      "format": "uuid",
      "readOnly": true
    },
    "testRunId": {
      "type": "string",
      "format": "uuid",
      "readOnly": true
    },
    "type": {
      "type": "string",
      "readOnly": true
    },
    "status": {
      "enum": [
        "error",
        "passed",
        "failed",
        "running",
        "auto_retrying",
        "stopped",
        "queued",
        "paused",
        "skipped",
        "recording",
        "initialized"
      ],
      "type": "string",
      "description": "* `error` - Error\n* `passed` - Passed\n* `failed` - Failed\n* `running` - Running\n* `auto_retrying` - Auto Retrying\n* `stopped` - Stopped\n* `queued` - Queued\n* `paused` - Paused\n* `skipped` - Skipped\n* `recording` - Recording\n* `initialized` - Initialized",
      "x-spec-enum-id": "d6540c730bc09488"
    },
    "error": {
      "type": [
        "string",
        "null"
      ]
    },
    "errorCode": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 100
    },
    "warning": {
      "type": "boolean"
    },
    "forceFailed": {
      "type": "boolean"
    },
    "ignoredFailed": {
      "type": "boolean"
    },
    "executed": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "elementExists": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "timeout": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "executionUrl": {
      "type": [
        "string",
        "null"
      ],
      "title": "Step execution URL"
    },
    "started": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "ended": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "duration": {
      "type": [
        "string",
        "null"
      ]
    },
    "runTimeout": {
      "type": [
        "number",
        "null"
      ],
      "format": "double"
    },
    "sleep": {
      "type": [
        "number",
        "null"
      ],
      "format": "double"
    },
    "screenshotUrl": {
      "type": "string",
      "readOnly": true
    },
    "coveringElementScreenshot": {
      "type": "string",
      "readOnly": true
    },
    "assertionExpectedValue": {
      "type": [
        "string",
        "null"
      ]
    },
    "assertionCurrentValue": {
      "type": [
        "string",
        "null"
      ]
    },
    "assertionType": {
      "type": "string",
      "readOnly": true
    },
    "assertionProperty": {
      "type": "string",
      "readOnly": true
    },
    "assertionAttributeName": {
      "type": "string",
      "readOnly": true
    },
    "tabNo": {
      "type": "integer",
      "readOnly": true
    },
    "computedValue": {
      "type": [
        "string",
        "null"
      ]
    },
    "computedUrl": {
      "type": [
        "string",
        "null"
      ]
    },
    "computedUsername": {
      "type": [
        "string",
        "null"
      ]
    },
    "computedPassword": {
      "type": [
        "string",
        "null"
      ]
    },
    "computedFrameLocation": {
      "type": [
        "string",
        "null"
      ]
    },
    "computedAssertionExpectedValue": {
      "type": [
        "string",
        "null"
      ]
    },
    "computedSelector": {
      "type": [
        "string",
        "null"
      ]
    },
    "selector": {
      "type": [
        "string",
        "null"
      ]
    },
    "interactionPositionX": {
      "type": [
        "number",
        "null"
      ],
      "format": "double"
    },
    "interactionPositionY": {
      "type": [
        "number",
        "null"
      ],
      "format": "double"
    },
    "scrollX": {
      "type": [
        "number",
        "null"
      ],
      "format": "double"
    },
    "scrollY": {
      "type": [
        "number",
        "null"
      ],
      "format": "double"
    },
    "windowInnerWidth": {
      "type": [
        "number",
        "null"
      ],
      "format": "double"
    },
    "windowInnerHeight": {
      "type": [
        "number",
        "null"
      ],
      "format": "double"
    },
    "waitingConditions": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/V2WaitingConditionRun"
      },
      "readOnly": true
    },
    "visualRegressionRefScreenshotSourceId": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "readOnly": true
    },
    "visualRegressionCompareResult": {
      "allOf": [
        {
          "$ref": "#/$defs/V2VisualRegressionCompareResult"
        }
      ],
      "readOnly": true
    }
  },
  "required": [
    "assertionAttributeName",
    "assertionProperty",
    "assertionType",
    "coveringElementScreenshot",
    "id",
    "screenshotUrl",
    "stepId",
    "tabNo",
    "testRunId",
    "type",
    "visualRegressionCompareResult",
    "visualRegressionRefScreenshotSourceId",
    "waitingConditions"
  ],
  "$defs": {
    "V2VisualRegressionCompareResult": {
      "type": "object",
      "properties": {
        "refScreenshotUrl": {
          "type": [
            "string",
            "null"
          ],
          "readOnly": true
        },
        "observedScreenshotUrl": {
          "type": [
            "string",
            "null"
          ],
          "readOnly": true
        },
        "diffScreenshotUrl": {
          "type": [
            "string",
            "null"
          ],
          "readOnly": true
        },
        "maxDiff": {
          "type": "number",
          "format": "double",
          "description": "Maximum allowed difference used for comparison"
        },
        "observedDiff": {
          "type": [
            "number",
            "null"
          ],
          "format": "double",
          "readOnly": true
        },
        "executionTime": {
          "type": [
            "number",
            "null"
          ],
          "format": "double"
        },
        "browserName": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 64
        },
        "osName": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 64
        },
        "screenSizeType": {
          "enum": [
            "desktop",
            "mobile",
            "custom",
            "",
            null
          ],
          "type": [
            "string",
            "null"
          ],
          "description": "* `desktop` - Desktop\n* `mobile` - Mobile\n* `custom` - Custom",
          "x-spec-enum-id": "c0cdf94a62475084"
        },
        "runMode": {
          "enum": [
            "server",
            "local",
            "recording",
            "",
            null
          ],
          "type": [
            "string",
            "null"
          ],
          "description": "* `server` - cloud\n* `local` - local\n* `recording` - recording",
          "x-spec-enum-id": "396ab9b642f5073e"
        },
        "profileName": {
          "type": "string",
          "readOnly": true
        }
      },
      "required": [
        "diffScreenshotUrl",
        "maxDiff",
        "observedDiff",
        "observedScreenshotUrl",
        "profileName",
        "refScreenshotUrl"
      ]
    },
    "V2WaitingConditionRun": {
      "type": "object",
      "properties": {
        "type": {
          "enum": [
            "documentComplete",
            "elementIsVisible",
            "elementIsNotCovered",
            "elementIsNotAnimating",
            "elementIsNotDisabled",
            "elementHasFocus",
            "networkIdle",
            "pageNavigationAfterExecution",
            "elementHasAttribute"
          ],
          "type": "string",
          "description": "* `documentComplete` - documentComplete\n* `elementIsVisible` - elementIsVisible\n* `elementIsNotCovered` - elementIsNotCovered\n* `elementIsNotAnimating` - elementIsNotAnimating\n* `elementIsNotDisabled` - elementIsNotDisabled\n* `elementHasFocus` - elementHasFocus\n* `networkIdle` - networkIdle\n* `pageNavigationAfterExecution` - pageNavigationAfterExecution\n* `elementHasAttribute` - elementHasAttribute",
          "x-spec-enum-id": "8bf476331e5e9e41",
          "readOnly": true
        },
        "isSuccess": {
          "type": "boolean"
        },
        "isSoftSuccess": {
          "type": "boolean"
        },
        "isIgnored": {
          "type": "boolean"
        },
        "expected": {
          "type": [
            "string",
            "null"
          ]
        },
        "current": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "isSuccess",
        "type"
      ]
    }
  }
}