{ "_templateInfo": { "name": "PDF 다운로드 검증 템플릿", "version": "1.0.0", "description": "PDF 다운로드 기능이 있는 시나리오에 추가할 검증 스텝 템플릿", "usage": "이 템플릿의 steps 배열을 PDF 다운로드가 있는 시나리오에 복사하여 사용", "createdAt": "2026-01-28" }, "steps": [ { "id": "{baseStepId}", "name": "⚠️ 필수 검증: PDF 다운로드 전 페이지 스크린샷", "critical": true, "description": "PDF 생성 전 페이지 상태를 스크린샷으로 캡처하여 CSS 문제 감지용 기준 이미지 확보", "actions": [ { "type": "screenshot", "name": "pdf-preview-before-download-{scenarioId}", "fullPage": true, "savePath": "tests/e2e/results/hotfix/screenshots/", "description": "PDF 생성 대상 페이지 전체 캡처" }, { "type": "screenshot", "name": "pdf-content-area-{scenarioId}", "selector": "{pdfContentSelector}", "savePath": "tests/e2e/results/hotfix/screenshots/", "description": "PDF 콘텐츠 영역만 캡처" } ], "verify": { "screenshotCaptured": true, "purpose": "PDF CSS 문제 감지를 위한 기준 이미지" } }, { "id": "{baseStepId}-1", "name": "⚠️ 필수 검증: PDF 다운로드 실행 및 파일 보관", "critical": true, "description": "PDF 다운로드 후 파일을 지정 폴더에 보관하여 수동 검증 가능하게 함", "actions": [ { "type": "expectResponse", "id": "pdf-download-response-{scenarioId}", "urlPattern": "{pdfApiEndpoint}", "description": "PDF 다운로드 API 응답 대기 설정" }, { "type": "click", "target": "{pdfDownloadButtonSelector}", "description": "PDF 다운로드 버튼 클릭" }, { "type": "wait", "duration": 3000, "description": "PDF 생성 및 다운로드 대기" }, { "type": "assertResponse", "id": "pdf-download-response-{scenarioId}", "checks": { "status": 200, "contentType": "application/pdf" } }, { "type": "saveDownloadedFile", "targetPath": "tests/e2e/results/hotfix/pdf-samples/", "fileNamePattern": "{scenarioId}-{timestamp}.pdf", "description": "다운로드된 PDF 파일을 지정 폴더에 보관" } ], "verify": { "apiSuccess": true, "fileDownloaded": true, "fileSaved": "tests/e2e/results/hotfix/pdf-samples/" } }, { "id": "{baseStepId}-2", "name": "⚠️ PDF 파일 유효성 검증", "critical": true, "description": "다운로드된 PDF 파일의 기본 유효성 검사", "actions": [ { "type": "verifyDownloadedFile", "checks": { "fileExists": true, "fileSize": "> 1024", "pdfSignature": "%PDF-", "description": "PDF 파일 헤더 검증" } } ], "verify": { "pdfValid": true, "minFileSize": "1KB 이상" } }, { "id": "{baseStepId}-3", "name": "📋 PDF 스타일 수동 확인 체크리스트", "type": "manualVerification", "critical": true, "description": "개발자가 다운로드된 PDF를 열어 시각적으로 확인해야 하는 항목", "manualChecklist": [ { "id": "css-1", "item": "테이블 경계선이 올바르게 표시되는가?", "category": "테이블 스타일" }, { "id": "css-2", "item": "한글 폰트가 깨지지 않고 정상 표시되는가?", "category": "폰트" }, { "id": "css-3", "item": "숫자/금액 정렬이 올바른가? (우측 정렬)", "category": "정렬" }, { "id": "css-4", "item": "여백(margin/padding)이 적절한가?", "category": "레이아웃" }, { "id": "css-5", "item": "헤더/푸터가 각 페이지에 올바르게 표시되는가?", "category": "페이지 구조" }, { "id": "css-6", "item": "로고/이미지가 정상 표시되는가?", "category": "이미지" }, { "id": "css-7", "item": "페이지 나눔(page break)이 적절한 위치에서 발생하는가?", "category": "페이지 나눔" }, { "id": "css-8", "item": "배경색/강조색이 올바르게 적용되었는가?", "category": "색상" }, { "id": "css-9", "item": "텍스트가 잘리거나 겹치지 않는가?", "category": "오버플로우" }, { "id": "css-10", "item": "인쇄 시 레이아웃이 유지되는가?", "category": "인쇄 호환성" } ], "outputFiles": { "screenshot": "tests/e2e/results/hotfix/screenshots/pdf-preview-before-download-{scenarioId}-*.png", "pdfFile": "tests/e2e/results/hotfix/pdf-samples/{scenarioId}-*.pdf" }, "reportFlag": { "requiresManualReview": true, "message": "⚠️ PDF 스타일 수동 확인 필요 - 위 체크리스트 항목을 PDF 파일에서 직접 확인하세요" } } ], "placeholders": { "{baseStepId}": "PDF 다운로드 스텝의 기준 ID (예: 24, step-15 등)", "{scenarioId}": "시나리오 ID (예: vendor-ledger, daily-report 등)", "{pdfContentSelector}": "PDF 콘텐츠 영역 CSS 선택자 (예: .report-content, main)", "{pdfApiEndpoint}": "PDF 다운로드 API 엔드포인트 패턴 (예: /api/v1/*/export-pdf)", "{pdfDownloadButtonSelector}": "PDF 다운로드 버튼 선택자 (예: PDF 다운로드, button:has-text('PDF'))" }, "requiredFolders": [ "tests/e2e/results/hotfix/screenshots/", "tests/e2e/results/hotfix/pdf-samples/" ], "integrationNotes": [ "이 템플릿을 사용할 때 모든 {placeholder}를 실제 값으로 교체하세요", "PDF 다운로드 전에 스크린샷을 먼저 캡처해야 CSS 비교가 가능합니다", "다운로드된 PDF 파일은 테스트 결과 폴더에 보관되어 수동 검토가 가능합니다", "manualChecklist는 테스트 리포트에 포함되어 개발자가 확인할 수 있습니다" ] }