fix: HR/설정 시나리오 셀렉터 수정 (8개 파일)

- settings-attendance: verify_elements→evaluate, :has-text→텍스트 target
- settings-vacation-policy: :nth-of-type/:has-text 제거, evaluate로 변경
- employee-register: menuNavigation 사원관리→직원관리, fill_form→evaluate
- department-add: verify_elements→evaluate, click_first_row 사용
- settings-rank: :has-text→텍스트 target, 직급명 입력 필드 확인 추가
- settings-position: verify_not_mockup→wait+evaluate, 직책명 입력 확인
- hr-vacation: 날짜 입력 evaluate 추가, :has-text→텍스트 target
- hr-salary: 날짜 필터 확인 스텝 추가, :has-text→텍스트 target

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-07 21:59:19 +09:00
parent 8b71c82003
commit a8a8c15f99
8 changed files with 89 additions and 161 deletions

View File

@@ -111,7 +111,7 @@
"phase": "CREATE",
"name": "[CREATE] 휴가 신청 버튼 클릭",
"action": "click_if_exists",
"target": "button:has-text('신청'), button:has-text('휴가 신청'), button:has-text('추가')",
"target": "신청",
"expected": {
"modal": true,
"modalTitle": "휴가 신청"
@@ -120,17 +120,16 @@
{
"id": 9,
"phase": "CREATE",
"name": "[CREATE] 휴가 정보 입력",
"action": "click_if_exists",
"note": "휴가 신청 폼 필드 존재 확인 (실제 UI 필드 셀렉터 불일치로 soft check)",
"target": "form input, [role=\"dialog\"] input, .modal input"
"name": "[CREATE] 휴가 정보 입력 (날짜/유형/사유)",
"action": "evaluate",
"script": "(async () => { const w = ms => new Promise(r => setTimeout(r, ms)); await w(500); const modal = document.querySelector('[role=\"dialog\"], [aria-modal=\"true\"], [class*=\"modal\"]:not([class*=\"tooltip\"]), [class*=\"Modal\"], [class*=\"Sheet\"]'); const isVis = el => !!el && el.getBoundingClientRect().width > 0; const scope = isVis(modal) ? modal : document; const setInput = (input, val) => { if (!input) return false; const ns = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, 'value')?.set; if (ns) ns.call(input, val); else input.value = val; input.dispatchEvent(new Event('input', {bubbles:true})); input.dispatchEvent(new Event('change', {bubbles:true})); return true; }; const dateInputs = scope.querySelectorAll('input[type=\"date\"], input[placeholder*=\"날짜\"], input[placeholder*=\"시작\"], input[placeholder*=\"종료\"]'); let d1 = false, d2 = false; if (dateInputs.length >= 2) { d1 = setInput(dateInputs[0], '2026-02-10'); d2 = setInput(dateInputs[1], '2026-02-10'); } else if (dateInputs.length === 1) { d1 = setInput(dateInputs[0], '2026-02-10'); } const textarea = scope.querySelector('textarea, input[placeholder*=\"사유\"], input[name*=\"reason\"]'); const r1 = setInput(textarea, 'E2E 자동화 테스트 휴가 신청'); return JSON.stringify({dates: d1 + '/' + d2, reason: r1, dateInputCount: dateInputs.length}); })()"
},
{
"id": 10,
"phase": "CREATE",
"name": "[CREATE] 필수 검증 #2: 신청 저장",
"action": "click_if_exists",
"target": "button:has-text('신청'), button:has-text('저장'), button:has-text('확인')",
"target": "신청",
"verify": {
"url_maintained": true,
"no_error_page": true,
@@ -174,8 +173,7 @@
"id": 14,
"phase": "READ",
"name": "[READ] 휴가 상세 페이지 진입",
"action": "click_if_exists",
"target": "table tbody tr:first-child, table tbody tr:nth-child(1), table tr:nth-child(2)",
"action": "click_first_row",
"expected": {
"url_contains": "/hr/vacation",
"visible": [
@@ -204,7 +202,7 @@
"phase": "UPDATE",
"name": "[UPDATE] 수정 모드 진입",
"action": "click_if_exists",
"target": "button:has-text('수정')",
"target": "수정",
"expected": {
"modal_or_edit_mode": true,
"fields_editable": true
@@ -222,7 +220,7 @@
"phase": "UPDATE",
"name": "[UPDATE] 필수 검증 #2: 수정 저장",
"action": "click_if_exists",
"target": "button:has-text('저장'), button:has-text('수정')",
"target": "저장",
"verify": {
"url_maintained": true,
"no_error_page": true,
@@ -255,7 +253,7 @@
"phase": "DELETE",
"name": "[DELETE] 취소 버튼 클릭",
"action": "click_if_exists",
"target": "button:has-text('취소'), button:has-text('신청 취소')",
"target": "취소",
"expected": {
"confirm_dialog": true,
"dialog_message": "취소|정말"
@@ -272,7 +270,7 @@
"redirect": "/hr/vacation"
},
"expected": "휴가 취소 완료 및 목록 복귀",
"target": "[role='alertdialog'] button:has-text('확인'), [role='dialog'] button:has-text('확인'), button:has-text('확인')"
"target": "확인"
},
{
"id": 23,