{
  "id": "starter-connection",
  "name": "Inspect Starter connection modes",
  "start": { "path": "/tidbs/{{starterClusterId}}/overview" },
  "goal": [
    "Open Connect and wait until Connection Type and Branch are enabled and Connection Type shows Public Endpoint. Ignore the initial disabled Private Endpoint value while cluster data is loading.",
    "Close the loaded dialog exactly once using Escape, wait until the dialog is gone, and open Connect exactly once more. This completes the open/close check; do not restart it during recovery.",
    "After reopening, keep main selected as Branch, change Connection Type to Private Endpoint, and verify the private-endpoint information and disabled operating-system field.",
    "Leave the dialog open and do not create, reset, copy, or expose a password."
  ],
  "success": {
    "beforeEvidence": [
      {
        "kind": "testIdValue",
        "testId": "connection-endpoint-selector",
        "matches": "^Public Endpoint$",
        "enabled": true
      }
    ],
    "evidence": [
      { "kind": "testIdVisible", "testId": "serverless-connection-modal", "timeoutMs": 30000 },
      {
        "kind": "testIdValue",
        "testId": "connection-branch-selector",
        "matches": "^main$",
        "enabled": true,
        "timeoutMs": 30000
      },
      {
        "kind": "testIdValue",
        "testId": "connection-endpoint-selector",
        "matches": "private",
        "enabled": true,
        "timeoutMs": 30000
      },
      { "kind": "testIdVisible", "testId": "connection-os-disabled-input", "timeoutMs": 30000 },
      { "kind": "testIdVisible", "testId": "connection-private-info", "timeoutMs": 30000 }
    ]
  },
  "recovery": [
    "Use action history to continue the existing phase. After closing and reopening once, leave Connect open and select Private Endpoint; do not close it again. A closing dialog can briefly retain its header: wait for it to disappear instead of clicking Close again.",
    "If main or Private Endpoint is already selected, verify it instead of toggling away.",
    "If the dialog refreshes, take fresh page state before retrying a local selector."
  ],
  "safety": {
    "deny": [
      "Do not generate, reset, copy, or expose a password or connection credential.",
      "Do not modify a branch, cluster, or endpoint."
    ]
  }
}
