refactor: 비표준 포맷 13개 시나리오 Format A 통일

- actions 배열(Format B) → 단일 action(Format A) 변환
- fill_form fields: target 키 → name 키 수정
- verify_detail checks: 객체 배열 → 문자열 배열 수정
- 전체 13개 시나리오 E2E 테스트 PASS 확인
This commit is contained in:
김보곤
2026-02-28 17:21:01 +09:00
parent 21f2a72dee
commit 23827c257d
20 changed files with 634 additions and 2434 deletions

View File

@@ -89,26 +89,8 @@
"id": 1,
"name": "사이드바 메뉴 전체 펼치기",
"description": "모두 펼치기 버튼을 클릭하여 전체 메뉴를 펼친 후 메뉴 탐색 준비",
"actions": [
{
"type": "scroll",
"target": "sidebar",
"direction": "top",
"description": "사이드바 최상단으로 스크롤"
},
{
"type": "wait",
"duration": 300
},
{
"type": "evaluate",
"script": "Array.from(document.querySelectorAll('button')).find(b => b.innerText?.includes('모두 펼치기'))?.click()"
},
{
"type": "wait",
"duration": 2000
}
],
"action": "evaluate",
"script": "(async () => { document.querySelector('.sidebar-scroll')?.scrollTo({top:0,behavior:'instant'}); await new Promise(r=>setTimeout(r,300)); Array.from(document.querySelectorAll('button')).find(b => b.innerText?.includes('모두 펼치기'))?.click(); await new Promise(r=>setTimeout(r,2000)); return 'menu expanded'; })()",
"verification": [
"사이드바가 화면에 보이는지 확인",
"모든 메뉴가 펼쳐졌는지 확인"
@@ -116,41 +98,11 @@
},
{
"id": 2,
"name": "1차 메뉴 찾기: 설정 (스크롤 포함)",
"name": "1차 메뉴 찾기: 설정",
"description": "사이드바를 스크롤하며 '설정' 메뉴를 찾아 클릭",
"actions": [
{
"type": "scrollAndFind",
"target": "설정",
"alternativeTexts": [
"설정",
"Settings",
"환경설정",
"시스템설정"
],
"scrollContainer": "sidebar",
"maxAttempts": 10,
"description": "스크롤하며 설정 메뉴 찾기"
},
{
"type": "wait",
"duration": 300
},
{
"type": "click_if_exists",
"target": "설정",
"description": "설정 메뉴 클릭"
},
{
"type": "wait",
"duration": 500,
"description": "서브메뉴 펼쳐지기 대기"
},
{
"type": "screenshot",
"name": "settings_menu_expanded"
}
],
"action": "menu_navigate",
"level1": "설정",
"level2": "회사정보",
"verification": [
"설정 메뉴가 클릭되었는지 확인",
"서브메뉴가 펼쳐졌는지 확인",
@@ -163,41 +115,9 @@
},
{
"id": 3,
"name": "2차 메뉴 찾기: 회사정보 (스크롤 포함)",
"description": "서브메뉴에서 '회사정보'를 찾아 클릭",
"actions": [
{
"type": "scrollAndFind",
"target": "회사정보",
"alternativeTexts": [
"회사정보",
"회사 정보",
"Company Info",
"회사관리"
],
"scrollContainer": "submenu",
"maxAttempts": 5,
"description": "서브메뉴에서 회사정보 찾기"
},
{
"type": "wait",
"duration": 200
},
{
"type": "click_if_exists",
"target": "회사정보",
"description": "회사정보 메뉴 클릭"
},
{
"type": "wait",
"target": "페이지 로드 완료",
"timeout": 10000
},
{
"type": "screenshot",
"name": "company_info_page"
}
],
"name": "페이지 로드 대기",
"action": "wait",
"duration": 2000,
"verification": [
"회사정보 메뉴 클릭 성공",
"페이지 이동 또는 컨텐츠 로드"
@@ -205,50 +125,20 @@
},
{
"id": 4,
"name": "404 에러 감지 및 대체 경로 시도",
"description": "페이지 로드 후 404 에러 여부 확인, 404시 대체 경로 탐색",
"actions": [
{
"type": "wait",
"duration": 1000
},
{
"type": "checkFor404",
"indicators": [
"페이지를 찾을 수 없습니다",
"404",
"Not Found",
"존재하지 않거나"
]
},
{
"type": "screenshot",
"name": "page_load_result"
}
],
"name": "404 에러 감지",
"description": "페이지 로드 후 404 에러 여부 확인",
"action": "verify_url",
"expected": {
"no_404": true
},
"verification": [
"현재 페이지가 404인지 확인"
],
"onError404": {
"description": "404 에러 발생 시 대체 URL 시도",
"actions": [
{
"type": "log",
"message": "404 감지 - 대체 경로 탐색 시작"
},
{
"type": "tryAlternativeUrls",
"urls": [
"/company-info",
"/ko/company-info"
],
"stopOnSuccess": true
},
{
"type": "ifStillFailed",
"action": "navigateViaMenuClick",
"description": "URL 직접 접근 실패 시 메뉴 클릭으로 재시도"
}
"fallbackUrls": [
"/company-info",
"/ko/company-info"
]
}
},
@@ -256,25 +146,12 @@
"id": 5,
"name": "페이지 정상 로드 확인",
"description": "회사정보 페이지가 정상적으로 로드되었는지 확인",
"actions": [
{
"type": "verify",
"target": "pageTitle",
"contains": [
"회사정보",
"회사 정보",
"Company"
]
},
{
"type": "verify",
"target": "pageContent",
"notContains": [
"404",
"찾을 수 없습니다",
"Not Found"
]
}
"action": "verify_detail",
"checks": [
"visible_text:회사정보",
"not_contains:404",
"not_contains:찾을 수 없습니다",
"not_contains:Not Found"
],
"verification": [
"페이지 제목 '회사정보' 또는 관련 텍스트 표시",
@@ -438,13 +315,8 @@
"step": 21,
"name": "수정 모드에서 데이터 변경 테스트",
"description": "실제 데이터를 수정하고 저장 기능 검증",
"actions": [
{
"type": "click_if_exists",
"target": "수정",
"description": "수정 모드 진입"
}
],
"action": "click_if_exists",
"target": "수정",
"expect": {
"fieldsEnabled": true
},
@@ -454,29 +326,17 @@
"step": 22,
"name": "업태 필드 수정",
"description": "업태 필드 값 변경",
"actions": [
{
"type": "clear",
"target": "업태"
},
{
"type": "fill",
"target": "업태",
"value": "테스트업태_수정"
}
],
"action": "edit_field",
"target": "업태",
"value": "테스트업태_수정",
"id": 23
},
{
"step": 23,
"name": "저장 버튼 클릭",
"description": "수정된 회사 정보 저장",
"actions": [
{
"type": "click_if_exists",
"target": "저장"
}
],
"action": "click_if_exists",
"target": "저장",
"waitFor": {
"type": "apiResponse",
"method": "PUT",
@@ -497,6 +357,10 @@
"name": "⚠️ 필수 검증: 수정 데이터 반영 확인",
"note": "토스트 성공 메시지만으로 PASS 판정 불가. 실제 데이터 변경 확인 필수!",
"description": "수정된 업태 값이 반영되었는지 확인",
"action": "verify_detail",
"checks": [
"visible_text:테스트업태_수정"
],
"verify": {
"fieldValue": {
"target": "업태",
@@ -509,12 +373,8 @@
"step": 25,
"name": "회사 추가 다이얼로그 열기",
"description": "회사 추가 버튼 클릭하여 다이얼로그 열기",
"actions": [
{
"type": "click_if_exists",
"target": "회사 추가"
}
],
"action": "click_if_exists",
"target": "회사 추가",
"expect": {
"dialog": true,
"visible": [
@@ -531,20 +391,18 @@
"step": 26,
"name": "새 회사 정보 입력",
"description": "회사 추가 다이얼로그에서 필수 정보 입력",
"actions": [
"action": "fill_form",
"fields": [
{
"type": "fill",
"target": "회사명",
"name": "회사명",
"value": "테스트회사_{timestamp}"
},
{
"type": "fill",
"target": "대표자명",
"name": "대표자명",
"value": "테스트대표"
},
{
"type": "fill",
"target": "사업자등록번호",
"name": "사업자등록번호",
"value": "123-45-67890"
}
],
@@ -554,12 +412,8 @@
"step": 27,
"name": "회사 등록",
"description": "등록 버튼 클릭하여 새 회사 등록",
"actions": [
{
"type": "click_if_exists",
"target": "등록"
}
],
"action": "click_if_exists",
"target": "등록",
"waitFor": {
"type": "apiResponse",
"method": "POST",
@@ -580,6 +434,8 @@
"name": "⚠️ 필수 검증: 회사 등록 반영 확인",
"note": "토스트 성공 메시지만으로 PASS 판정 불가. 실제 데이터 등록 확인 필수!",
"description": "등록된 회사가 목록에 표시되는지 확인",
"action": "verify_element",
"target": "body",
"verify": {
"visible": "테스트회사"
},
@@ -589,25 +445,8 @@
"step": 29,
"name": "원복: 업태 필드 원래 값으로 복구",
"description": "테스트 후 원래 값으로 복구",
"actions": [
{
"type": "click_if_exists",
"target": "수정"
},
{
"type": "clear",
"target": "업태"
},
{
"type": "fill",
"target": "업태",
"value": "업태명"
},
{
"type": "click_if_exists",
"target": "저장"
}
],
"action": "evaluate",
"script": "(async () => { const clickBtn = (text) => { const btn = Array.from(document.querySelectorAll('button')).find(b => b.innerText?.trim() === text); if(btn) btn.click(); return !!btn; }; clickBtn('수정'); await new Promise(r=>setTimeout(r,1000)); const inputs = document.querySelectorAll('input:not([type=\"hidden\"])'); let target = null; inputs.forEach(inp => { const labels = document.querySelectorAll('label'); labels.forEach(lbl => { if(lbl.innerText?.includes('업태') && (lbl.htmlFor === inp.id || lbl.contains(inp))) target = inp; }); if(!target && inp.value === '테스트업태_수정') target = inp; }); if(target){ const nset = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,'value').set; nset.call(target,''); target.dispatchEvent(new Event('input',{bubbles:true})); nset.call(target,'업태명'); target.dispatchEvent(new Event('input',{bubbles:true})); target.dispatchEvent(new Event('change',{bubbles:true})); } await new Promise(r=>setTimeout(r,500)); clickBtn('저장'); await new Promise(r=>setTimeout(r,2000)); return 'restored'; })()",
"expect": {
"toast": [
"수정",
@@ -631,4 +470,4 @@
"대체 경로: 메뉴명이 변경되었을 수 있으므로 다양한 이름으로 탐색",
"메뉴 계층: 설정 > 회사정보"
]
}
}