Files
sam-scenarios/pdf-download-test.json

434 lines
13 KiB
JSON

{
"id": "pdf-download-test",
"name": "PDF 다운로드 전체 검사",
"description": "PDF 다운로드 버튼이 있는 모든 페이지를 순회하며 PDF 다운로드 기능과 품질을 검증하는 E2E 테스트",
"version": "1.0.0",
"createdAt": "2026-01-29",
"screenshotPolicy": {
"onErrorOnly": false,
"captureOn": ["before-download", "after-download", "error", "fail"]
},
"baseUrl": "https://dev.codebridge-x.com",
"timeout": 180000,
"tags": ["pdf", "download", "quality", "export"],
"login": {
"url": "https://dev.codebridge-x.com/login",
"credentials": {
"id": "TestUser5",
"password": "password123!"
}
},
"pdfTargets": [
{
"id": "draft-box",
"name": "기안함 PDF",
"menuNavigation": {
"level1": "결재관리",
"level2": "기안함"
},
"accessMethod": "modal",
"triggerAction": "clickFirstRow",
"pdfButtonSelector": "button:has-text('PDF')",
"pdfApiPattern": "/api/v1/approvals/*/pdf",
"expectedContentType": "application/pdf"
},
{
"id": "approval-box",
"name": "결재함 PDF",
"menuNavigation": {
"level1": "결재관리",
"level2": "결재함"
},
"accessMethod": "modal",
"triggerAction": "clickFirstRow",
"pdfButtonSelector": "button:has-text('PDF')",
"pdfApiPattern": "/api/v1/approvals/*/pdf",
"expectedContentType": "application/pdf"
},
{
"id": "reference-box",
"name": "참조함 PDF",
"menuNavigation": {
"level1": "결재관리",
"level2": "참조함"
},
"accessMethod": "modal",
"triggerAction": "clickFirstRow",
"pdfButtonSelector": "button:has-text('PDF')",
"pdfApiPattern": "/api/v1/approvals/*/pdf",
"expectedContentType": "application/pdf"
},
{
"id": "vendor-ledger",
"name": "거래처원장 PDF",
"menuNavigation": {
"level1": "자재관리",
"level2": "거래처원장"
},
"accessMethod": "detailPage",
"triggerAction": "clickFirstRow",
"pdfButtonSelector": "button:has-text('PDF 다운로드')",
"pdfApiPattern": "/api/v1/vendor-ledger/*/export-pdf",
"expectedContentType": "application/pdf"
}
],
"steps": [
{
"id": "step-0",
"name": "PDF 샘플 폴더 준비",
"description": "PDF 파일 저장 폴더 확인",
"setup": {
"createFolders": [
"react/tests/e2e/results/hotfix/pdf-samples/",
"react/tests/e2e/results/hotfix/screenshots/"
]
}
},
{
"id": "pdf-test-1",
"name": "기안함 PDF 다운로드 테스트",
"target": "draft-box",
"critical": true,
"steps": [
{
"id": "1-1",
"action": "navigate",
"menu": { "level1": "결재관리", "level2": "기안함" },
"expect": { "url": "/approval/drafts" }
},
{
"id": "1-2",
"action": "waitForTable",
"timeout": 5000,
"expect": { "rowCount": ">= 1" }
},
{
"id": "1-3",
"action": "clickFirstRow",
"description": "첫 번째 문서 클릭하여 상세 모달 열기"
},
{
"id": "1-4",
"action": "waitForModal",
"timeout": 3000,
"expect": { "modalVisible": true }
},
{
"id": "1-5",
"action": "screenshot",
"name": "draft-box_pdf-preview_{timestamp}",
"selector": "[role='dialog'], .modal",
"savePath": "react/tests/e2e/results/hotfix/screenshots/",
"description": "PDF 생성 전 모달 스크린샷"
},
{
"id": "1-6",
"action": "verifyButtonExists",
"selector": "button:has-text('PDF')",
"expect": { "visible": true }
},
{
"id": "1-7",
"action": "setupDownloadListener",
"description": "다운로드 이벤트 리스너 설정"
},
{
"id": "1-8",
"action": "click",
"selector": "button:has-text('PDF')",
"description": "PDF 버튼 클릭"
},
{
"id": "1-9",
"action": "wait",
"duration": 3000,
"description": "PDF 생성 및 다운로드 대기"
},
{
"id": "1-10",
"action": "verifyDownload",
"checks": {
"fileDownloaded": true,
"fileExtension": ".pdf",
"minFileSize": 1024,
"pdfSignature": "%PDF-"
}
},
{
"id": "1-11",
"action": "saveDownloadedFile",
"targetPath": "react/tests/e2e/results/hotfix/pdf-samples/",
"fileName": "draft-box_{timestamp}.pdf"
},
{
"id": "1-12",
"action": "closeModal",
"method": "pressEscape"
}
],
"onSuccess": {
"log": "draft-box PDF 다운로드 성공",
"recordFile": true
},
"onFail": {
"screenshot": true,
"continueToNext": true
}
},
{
"id": "pdf-test-2",
"name": "결재함 PDF 다운로드 테스트",
"target": "approval-box",
"critical": true,
"steps": [
{
"id": "2-1",
"action": "navigate",
"menu": { "level1": "결재관리", "level2": "결재함" },
"expect": { "url": "/approval/approval-box" }
},
{
"id": "2-2",
"action": "waitForTable",
"timeout": 5000,
"expect": { "rowCount": ">= 1" }
},
{
"id": "2-3",
"action": "clickFirstRow",
"description": "첫 번째 문서 클릭하여 상세 모달 열기"
},
{
"id": "2-4",
"action": "waitForModal",
"timeout": 3000
},
{
"id": "2-5",
"action": "screenshot",
"name": "approval-box_pdf-preview_{timestamp}",
"selector": "[role='dialog'], .modal",
"savePath": "react/tests/e2e/results/hotfix/screenshots/"
},
{
"id": "2-6",
"action": "click",
"selector": "button:has-text('PDF')"
},
{
"id": "2-7",
"action": "wait",
"duration": 3000
},
{
"id": "2-8",
"action": "verifyDownload",
"checks": {
"fileDownloaded": true,
"fileExtension": ".pdf",
"minFileSize": 1024
}
},
{
"id": "2-9",
"action": "saveDownloadedFile",
"targetPath": "react/tests/e2e/results/hotfix/pdf-samples/",
"fileName": "approval-box_{timestamp}.pdf"
},
{
"id": "2-10",
"action": "closeModal"
}
]
},
{
"id": "pdf-test-3",
"name": "참조함 PDF 다운로드 테스트",
"target": "reference-box",
"critical": true,
"steps": [
{
"id": "3-1",
"action": "navigate",
"menu": { "level1": "결재관리", "level2": "참조함" },
"expect": { "url": "/approval/reference-box" }
},
{
"id": "3-2",
"action": "waitForTable",
"timeout": 5000,
"expect": { "rowCount": ">= 1" }
},
{
"id": "3-3",
"action": "clickFirstRow"
},
{
"id": "3-4",
"action": "waitForModal",
"timeout": 3000
},
{
"id": "3-5",
"action": "screenshot",
"name": "reference-box_pdf-preview_{timestamp}",
"selector": "[role='dialog'], .modal",
"savePath": "react/tests/e2e/results/hotfix/screenshots/"
},
{
"id": "3-6",
"action": "click",
"selector": "button:has-text('PDF')"
},
{
"id": "3-7",
"action": "wait",
"duration": 3000
},
{
"id": "3-8",
"action": "verifyDownload",
"checks": {
"fileDownloaded": true,
"fileExtension": ".pdf",
"minFileSize": 1024
}
},
{
"id": "3-9",
"action": "saveDownloadedFile",
"targetPath": "react/tests/e2e/results/hotfix/pdf-samples/",
"fileName": "reference-box_{timestamp}.pdf"
},
{
"id": "3-10",
"action": "closeModal"
}
]
},
{
"id": "pdf-test-4",
"name": "거래처원장 PDF 다운로드 테스트",
"target": "vendor-ledger",
"critical": true,
"steps": [
{
"id": "4-1",
"action": "navigate",
"menu": { "level1": "자재관리", "level2": "거래처원장" },
"expect": { "url": "/accounting/vendor-ledger" }
},
{
"id": "4-2",
"action": "waitForTable",
"timeout": 5000,
"expect": { "rowCount": ">= 1" }
},
{
"id": "4-3",
"action": "clickFirstRow",
"description": "거래처 클릭하여 상세 페이지 이동"
},
{
"id": "4-4",
"action": "waitForNavigation",
"timeout": 5000,
"expect": { "urlContains": "/accounting/vendor-ledger/" }
},
{
"id": "4-5",
"action": "screenshot",
"name": "vendor-ledger_pdf-preview_{timestamp}",
"fullPage": true,
"savePath": "react/tests/e2e/results/hotfix/screenshots/"
},
{
"id": "4-6",
"action": "verifyButtonExists",
"selector": "button:has-text('PDF 다운로드')",
"expect": { "visible": true, "count": ">= 1" }
},
{
"id": "4-7",
"action": "click",
"selector": "button:has-text('PDF 다운로드')",
"index": 0,
"description": "첫 번째 PDF 다운로드 버튼 클릭"
},
{
"id": "4-8",
"action": "wait",
"duration": 3000
},
{
"id": "4-9",
"action": "verifyDownload",
"checks": {
"fileDownloaded": true,
"fileExtension": ".pdf",
"minFileSize": 1024
}
},
{
"id": "4-10",
"action": "saveDownloadedFile",
"targetPath": "react/tests/e2e/results/hotfix/pdf-samples/",
"fileName": "vendor-ledger_{timestamp}.pdf"
},
{
"id": "4-11",
"action": "navigateBack",
"description": "목록으로 돌아가기"
}
]
}
],
"pdfQualityChecklist": {
"description": "다운로드된 PDF 파일 수동 검증 체크리스트",
"items": [
{ "id": "q1", "category": "파일", "item": "PDF 파일이 정상적으로 열리는가?" },
{ "id": "q2", "category": "폰트", "item": "한글 폰트가 깨지지 않고 정상 표시되는가?" },
{ "id": "q3", "category": "테이블", "item": "테이블 경계선이 올바르게 표시되는가?" },
{ "id": "q4", "category": "정렬", "item": "숫자/금액이 우측 정렬되어 있는가?" },
{ "id": "q5", "category": "레이아웃", "item": "여백(margin/padding)이 적절한가?" },
{ "id": "q6", "category": "페이지", "item": "헤더/푸터가 각 페이지에 올바르게 표시되는가?" },
{ "id": "q7", "category": "이미지", "item": "로고/이미지가 정상 표시되는가?" },
{ "id": "q8", "category": "페이지나눔", "item": "페이지 나눔이 적절한 위치에서 발생하는가?" },
{ "id": "q9", "category": "색상", "item": "배경색/강조색이 올바르게 적용되었는가?" },
{ "id": "q10", "category": "오버플로우", "item": "텍스트가 잘리거나 겹치지 않는가?" }
]
},
"outputPaths": {
"pdfSamples": "react/tests/e2e/results/hotfix/pdf-samples/",
"screenshots": "react/tests/e2e/results/hotfix/screenshots/",
"report": "react/tests/e2e/results/hotfix/"
},
"reportTemplate": {
"successFile": "OK-pdf-download-test_{timestamp}.md",
"failFile": "Fail-pdf-download-test_{timestamp}.md",
"sections": [
"테스트 요약",
"개별 PDF 테스트 결과",
"다운로드된 PDF 파일 목록",
"품질 체크리스트 (수동 확인 필요)"
]
},
"executionNotes": [
"이 시나리오는 'PDF 다운로드 전체 검사해줘' 명령으로 실행",
"각 PDF 버튼 클릭 후 3초 대기 (PDF 생성 시간)",
"다운로드된 PDF는 pdf-samples 폴더에 타임스탬프와 함께 저장",
"테스트 완료 후 PDF 파일을 열어 품질 체크리스트 수동 확인 필요"
]
}