126 lines
3.1 KiB
JSON
126 lines
3.1 KiB
JSON
{
|
|
"name": "사용자 초대 CRUD 플로우",
|
|
"description": "사용자 초대 발송 → 목록 조회 → 재발송 → 취소 전체 플로우 테스트",
|
|
"version": "1.0",
|
|
"config": {
|
|
"baseUrl": "",
|
|
"timeout": 30000,
|
|
"stopOnFailure": true
|
|
},
|
|
"variables": {
|
|
"user_id": "{{$env.FLOW_TESTER_USER_ID}}",
|
|
"user_pwd": "{{$env.FLOW_TESTER_USER_PWD}}",
|
|
"test_email": "flowtest_invite_{{$timestamp}}@example.com"
|
|
},
|
|
"steps": [
|
|
{
|
|
"id": "login",
|
|
"name": "로그인",
|
|
"method": "POST",
|
|
"endpoint": "/api/v1/login",
|
|
"body": {
|
|
"user_id": "{{user_id}}",
|
|
"user_pwd": "{{user_pwd}}"
|
|
},
|
|
"expect": {
|
|
"status": [200],
|
|
"jsonPath": {
|
|
"$.access_token": "@isString"
|
|
}
|
|
},
|
|
"extract": {
|
|
"token": "$.access_token"
|
|
}
|
|
},
|
|
{
|
|
"id": "invite_user",
|
|
"name": "사용자 초대 발송 (role=user)",
|
|
"method": "POST",
|
|
"endpoint": "/api/v1/users/invite",
|
|
"headers": {
|
|
"Authorization": "Bearer {{login.token}}"
|
|
},
|
|
"body": {
|
|
"email": "{{test_email}}",
|
|
"role": "user",
|
|
"message": "SAM 시스템에 합류해 주세요!"
|
|
},
|
|
"expect": {
|
|
"status": [200],
|
|
"jsonPath": {
|
|
"$.success": true,
|
|
"$.data.status": "pending",
|
|
"$.data.email": "@isString"
|
|
}
|
|
},
|
|
"extract": {
|
|
"invitation_id": "$.data.id",
|
|
"invitation_token": "$.data.token",
|
|
"invited_email": "$.data.email"
|
|
}
|
|
},
|
|
{
|
|
"id": "list_pending",
|
|
"name": "대기 중 초대 목록 조회",
|
|
"method": "GET",
|
|
"endpoint": "/api/v1/users/invitations?status=pending&per_page=10",
|
|
"headers": {
|
|
"Authorization": "Bearer {{login.token}}"
|
|
},
|
|
"expect": {
|
|
"status": [200],
|
|
"jsonPath": {
|
|
"$.success": true,
|
|
"$.data.data": "@isArray"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": "resend_invitation",
|
|
"name": "초대 재발송",
|
|
"method": "POST",
|
|
"endpoint": "/api/v1/users/invitations/{{invite_user.invitation_id}}/resend",
|
|
"headers": {
|
|
"Authorization": "Bearer {{login.token}}"
|
|
},
|
|
"expect": {
|
|
"status": [200],
|
|
"jsonPath": {
|
|
"$.success": true,
|
|
"$.data.status": "pending"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": "cancel_invitation",
|
|
"name": "초대 취소",
|
|
"method": "DELETE",
|
|
"endpoint": "/api/v1/users/invitations/{{invite_user.invitation_id}}",
|
|
"headers": {
|
|
"Authorization": "Bearer {{login.token}}"
|
|
},
|
|
"expect": {
|
|
"status": [200],
|
|
"jsonPath": {
|
|
"$.success": true
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": "verify_cancelled",
|
|
"name": "취소된 초대 목록 확인",
|
|
"method": "GET",
|
|
"endpoint": "/api/v1/users/invitations?status=cancelled&per_page=10",
|
|
"headers": {
|
|
"Authorization": "Bearer {{login.token}}"
|
|
},
|
|
"expect": {
|
|
"status": [200],
|
|
"jsonPath": {
|
|
"$.success": true
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|