{
  "id": "PS-001",
  "name": "Create PermissionSet with Permissions<X> grant flips",
  "description": "POST /sobjects/PermissionSet with a Permissions<X> virtual field must: (1) create the record, (2) route the grant to the _System_PermissionSetPermission junction via ApplyPermissionChanges, (3) not error on 'unknown field' despite the column being absent post-P6. Read-back via GET must return PermissionsViewSetup=true from the junction projection.",
  "object": "PermissionSet",
  "method": "POST",
  "endpoint": "/services/data/v63.0/sobjects/PermissionSet",
  "payload": {
    "Name": "E2E_PS_001_CreateWithGrant",
    "Label": "E2E Create With Grant",
    "PermissionsViewSetup": true,
    "PermissionsApiEnabled": false
  },
  "expects": {
    "status_code": 201
  },
  "query_after": {
    "object": "PermissionSet",
    "assertions": [
      {"field": "Name", "operator": "eq", "value": "E2E_PS_001_CreateWithGrant"},
      {"field": "PermissionsViewSetup", "operator": "eq", "value": true},
      {"field": "PermissionsApiEnabled", "operator": "eq", "value": false}
    ]
  },
  "teardown": {
    "method": "DELETE",
    "endpoint": "/services/data/v63.0/sobjects/PermissionSet/{id}"
  },
  "priority": "P0",
  "scene": "permission_set"
}
