Files
sam-scenarios/subscription-management.json

197 lines
5.9 KiB
JSON

{
"id": "subscription-management",
"name": "구독관리 테스트",
"screenshotPolicy": {
"onErrorOnly": true,
"captureOn": ["error", "fail", "timeout", "404", "500", "blocked"]
},
"description": "설정 > 구독관리 페이지의 구독 정보 조회 및 자료 내보내기 기능을 테스트하는 E2E 테스트",
"baseUrl": "https://dev.codebridge-x.com",
"url": "/settings/subscription",
"navigation": {
"targetUrl": "/subscription",
"urlPattern": "/subscription|/ko/subscription|/settings/subscription",
"menuHints": ["구독관리", "구독 관리", "설정"]
},
"menuNavigation": {
"level1": "설정",
"level2": "구독관리",
"expectedUrl": "/settings/subscription",
"searchWithinParent": true,
"closeOtherMenus": true
},
"menuNavigationEnhanced": {
"strategy": "scroll-and-search",
"sidebar": {
"scrollContainer": ".sidebar-scroll",
"scrollStep": 200,
"maxScrollAttempts": 5,
"waitAfterScroll": 300
},
"level1": {
"text": "설정",
"expandable": true,
"waitAfterClick": 500
},
"level2": {
"text": "구독관리",
"waitAfterClick": 300
},
"fallbackUrl": "/settings/subscription",
"expectedUrl": "/settings/subscription"
},
"timeout": 90000,
"tags": ["settings", "subscription", "read-only"],
"auth": {
"username": "TestUser5",
"password": "password123!"
},
"steps": [
{
"id": "step-0",
"name": "사이드바 메뉴 전체 펼치기",
"description": "모두 펼치기 버튼을 클릭하여 전체 메뉴를 펼친 후 메뉴 탐색 준비",
"actions": [
{
"type": "evaluate",
"script": "document.querySelector('.sidebar-scroll')?.scrollTo({top:0,behavior:'instant'})"
},
{ "type": "wait", "duration": 300 },
{
"type": "evaluate",
"script": "Array.from(document.querySelectorAll('button')).find(b => b.innerText?.includes('모두 펼치기'))?.click()"
},
{ "type": "wait", "duration": 2000 }
]
},
{
"id": "step-1",
"name": "설정 메뉴 진입",
"description": "설정 > 구독관리 메뉴로 이동",
"actions": [
{
"type": "scrollAndFind",
"container": ".sidebar-scroll",
"target": "설정",
"scrollStep": 200,
"maxAttempts": 5
},
{ "type": "click", "target": "설정" },
{ "type": "wait", "duration": 500 },
{ "type": "click", "target": "구독관리" }
],
"expect": {
"url": "/settings/subscription",
"visible": ["구독관리", "구독 정보"]
},
"fallback": {
"type": "navigate",
"url": "/settings/subscription"
}
},
{
"id": "step-2",
"name": "페이지 구조 확인",
"description": "구독 정보 필드 및 버튼 확인",
"verify": {
"visible": ["구독관리", "최근 결제일시", "다음 결제일시", "구독금액", "구독 정보"],
"buttons": ["자료 내보내기", "서비스 해지"]
}
},
{
"id": "step-3",
"name": "결제 정보 확인",
"description": "결제 관련 정보 표시 확인",
"verify": {
"visible": ["최근 결제일시", "다음 결제일시", "구독금액"]
}
},
{
"id": "step-4",
"name": "사용량 정보 확인",
"description": "사용자 수, 저장 공간, API 호출 정보 확인",
"verify": {
"visible": ["사용자 수", "저장 공간", "AI API 호출"]
}
},
{
"id": "step-5",
"name": "필수 검증 #1: 자료 내보내기 버튼 동작",
"description": "자료 내보내기 버튼 클릭하여 다운로드 확인",
"actions": [
{ "type": "click", "target": "자료 내보내기" },
{ "type": "wait", "duration": 1000 }
],
"expect": {
"downloadTriggered": true,
"noErrorPage": true
},
"verify": {
"apiCall": "GET /api/settings/subscription/export"
}
},
{
"id": "step-6",
"name": "서비스 해지 버튼 확인",
"description": "서비스 해지 버튼 존재 확인 (클릭하지 않음)",
"verify": {
"buttonExists": "서비스 해지"
}
},
{
"id": "step-7",
"name": "구독 플랜 정보 확인",
"description": "현재 구독 플랜 정보 표시 확인",
"verify": {
"visible": ["무료", "무제한"]
}
}
],
"assertions": [
{
"type": "url",
"expected": "/settings/subscription",
"message": "구독관리 페이지에 머물러야 함"
},
{
"type": "elementExists",
"selector": "button:has-text('자료 내보내기')",
"message": "자료 내보내기 버튼이 표시되어야 함"
}
],
"mandatoryVerifications": {
"description": "E2E_TEST_CONFIG.md 기준 필수 검증 항목",
"items": [
{
"id": 1,
"name": "파일 다운로드",
"trigger": "자료 내보내기 버튼",
"verification": "Network API + 실제 다운로드 확인",
"failCondition": "Console LOG만으로 PASS 금지"
},
{
"id": 5,
"name": "목업/미완성 페이지 감지",
"trigger": "페이지 로드 시",
"verification": "실제 구독 정보 표시 + 동작하는 버튼 확인",
"failCondition": "더미 데이터만 표시"
}
]
},
"notes": {
"testScope": "구독 정보 조회 및 자료 내보내기 테스트",
"pageFeatures": {
"paymentInfo": ["최근 결제일시", "다음 결제일시", "구독금액"],
"usageInfo": ["사용자 수", "저장 공간", "AI API 호출"],
"buttons": ["자료 내보내기", "서비스 해지"]
},
"caution": "서비스 해지 버튼은 테스트 계정 보호를 위해 클릭하지 않음",
"prerequisites": "로그인된 사용자"
}
}