-
Notifications
You must be signed in to change notification settings - Fork 220
버그 수정, 기능개선 및 추가, 테스트 인프라 구축 #77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| })], | ||
|
|
||
| base: "/", | ||
| base: "/egovframe-template-simple-react/", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
메인 화면 리다이렉트 시 경로가 잘못 설정되어 있으므로 다음과 같이 수정이 필요할 것으로 보입니다.
plugins: [
react({
// Include JSX processing for JS and JSX files
include: "**/*.{jsx,js}",
}),
],
base: "/egovframe-template-simple-react",
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
다음 항목의 수정이 필요합니다.
ADMIN_NOTICE: "/egovframe-template-simple-react/admin/notice", // 사이트관리/공지사항관리 목록
ADMIN_MANAGER: "/egovframe-template-simple-react/admin/manager", // 사이트관리/사이트관리자 암호변경 기능
ADMIN_MEMBERS: "/egovframe-template-simple-react/admin/members", // 사이트관리/회원관리 목록기능
ADMIN_MEMBERS_DETAIL: "/egovframe-template-simple-react/admin/members/detail", // 사이트관리/회원관리 상세
ADMIN_MEMBERS_CREATE: "/egovframe-template-simple-react/admin/members/create", // 사이트관리/회원관리 등록
ADMIN_MEMBERS_MODIFY: "/egovframe-template-simple-react/admin/members/modify", // 사이트관리/회원관리 상세/수정
MYPAGE_MODIFY: "/egovframe-template-simple-react/mypage/modify", // 고객지원/마이페이지/회원 수정
MYPAGE_CREATE: "/egovframe-template-simple-react/mypage/create", // 고객지원/마이페이지/회원 등록
src/routes/index.jsx
Outdated
| const currentPath = location.pathname; | ||
| const adminRegex = /^\/admin(\/.*)?$/; | ||
| const mypageRegex = /^\/mypage(\/.*)?$/; | ||
| const mypageRegex = /^\/mypage(?!\/create)(\/.*)?$/; // /mypage/create 는 매치 제외 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
정규식이 경로를 정상적으로 매치하지 못하고 있습니다.
다음과 같이 수정이 필요할 것으로 보입니다.
const adminRegex = /^\/egovframe-template-simple-react\/admin(\/.*)?$/;
const mypageRegex =/^\/egovframe-template-simple-react\/mypage(?!\/create)(\/.*)?$/; // /mypage/create 는 매치 제외
eGovFrameSupport
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
전반적으로 크게 2가지 문제점이 발견됩니다.
- 비로그인 및 유저 로그인 시, 관리자 메뉴에 접근 가능함
- URL 상수 및 라우팅 로직, Vite 설정에서의 항목들이 일관성이 없음
재검토 부탁드립니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
해당 문서에 명시된 명령어들과 package.json의 항목이 서로 상이하므로 해당 내용 수정 또는 문서 수정 바랍니다
또한 사용자 편의성을 위해 .md 파일은 README.md에 병합하는 방향으로 진행하여 주시기 바랍니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
네! 확인 감사합니다. 수정했습니다!
|
conflicts 확인 후 수정 바랍니다. |
|
[2025년 전자정부 표준프레임워크 컨트리뷰션 참가 기념품 발송안내] 안녕하세요 '25년 5월부터 전자정부 서비스 개발 표준 기반인 "전자정부 표준프레임워크" 개선에 민간 SW개발자의 아이디어와 의견을 반영하기 위해 "2025 전자정부 표준프레임워크 컨트리뷰션"을 개최하였습니다. https://forms.gle/RmYSLrasGMoy1diU8 앞으로도 전자정부 표준프레임워크에 지속적인 관심 부탁드립니다. ※ 센터에서 준비한 감사장과 표준프레임워크 오픈커뮤니티에서 소정의 기념품을 택배 배송 해 드립니다. 감사합니다. |
- TEST_PLAN.md 추가: Vitest/RTL/Playwright 기반 종합 테스트 전략 문서화 - 핵심 컴포넌트 단위 테스트 구현 (EgovPaging, egovFetch, calc 유틸리티) - Playwright를 활용한 메인 페이지 및 페이징 E2E 테스트 설정 - @vitest/coverage-v8로 테스트 커버리지 리포팅 구성 - 빌드 아티팩트 및 커버리지 리포트용 .eslintignore 추가 - 루트 경로 라우팅 수정: '/' 접속 시 메인 페이지로 자동 리다이렉트 - 회원가입 페이지 인증 문제 해결: /mypage/create 로그인 없이 접근 가능 - 비밀번호 필드 자동완성 문제 해결 및 폼 컨트롤 개선 - 404 에러 방지용 fallback 라우트 추가 - 일관된 라우팅 동작을 위한 Vite base path 설정 - 단위 테스트: 22개 테스트 모두 통과 (100%) - E2E 테스트: 메인 페이지 및 페이징 시나리오 검증 완료 - 빌드: 에러 없이 성공 - 린팅: 적절한 제외 설정으로 깔끔하게 통과 - 브라우저 테스트: Chrome, Edge에서 정상 동작 확인 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
40195d1 to
ab3bf0f
Compare
리뷰어(eGovFrameSupport) 요청사항 모두 반영: ## 🔧 주요 수정사항 ### 1. 라우팅 경로 일관성 확보 - 라우팅 정규식에 base path 포함으로 수정 - Vite 설정, URL 상수, 라우팅 로직 완전 통일 - Before: `/^\/admin(\/.*)?$/` - After: `/^\/egovframe-template-simple-react\/admin(\/.*)?$/` ### 2. 접근 제어 검증 완료 - 관리자 메뉴: ROLE_ADMIN 권한 필수 - 비로그인/일반 사용자 관리자 메뉴 접근 차단 - 마이페이지 /create 경로 예외 처리 유지 ### 3. 테스트 문서 통합 및 정리 - TEST_PLAN.md 내용을 README.md로 통합 - package.json 테스트 스크립트 추가 정렬 - 문서와 스크립트 명령어 완전 일치 ### 4. 충돌 해결 및 최신화 - upstream/main과 모든 충돌 해결 - CRA → Vite 마이그레이션 관련 충돌 정리 - 의존성 및 패키지 락 파일 최신화 ## ✅ 검증 완료 - npm run lint: 통과 - npm run build: 성공 - 모든 URL 경로 일관성 확보 - 접근 제어 정상 동작
ab3bf0f to
642cd0a
Compare
|
표준프레임워크에 대한 지속적인 참여에 |
📋 변경사항 요약
eGovFrame React 템플릿의 테스트 인프라를 구축하고 사용자 경험을 개선했습니다.
🏷️ 변경 유형
🧪 테스트 인프라 구축
🐛 버그 수정 및 UX 개선
📊 테스트 결과
🔧 수정된 소스 내용 Modified source
검토자를 위해 수정된 소스 내용을 설명해 주세요. Please describe the modified source for reviewers.
주요 파일 변경사항:
src/routes/index.jsx<Route path="/" element={<Navigate to={URL.MAIN} />} />/^\/mypage(?!\/create)(\/.*)?$/정규식으로/mypage/create제외<Route path="*" element={<Navigate to={URL.MAIN} replace />} />src/pages/login/EgovLoginContent.jsx"default"→""(빈 문자열)value={userInfo.password}추가autoComplete="off"추가vite.config.jsbase: "/egovframe-template-simple-react/"추가로 라우팅 일관성 확보테스트 파일 추가
src/components/EgovPaging.test.jsx: 페이징 컴포넌트 단위 테스트src/api/egovFetch.test.jsx: API 호출 유틸리티 테스트src/utils/calc.test.jsx: 계산 유틸리티 테스트e2e/main-page.spec.js: 메인 페이지 E2E 테스트e2e/pagination.spec.js: 페이징 기능 E2E 테스트설정 파일
playwright.config.js: E2E 테스트 설정.eslintignore: coverage/, dist/, build/ 등 제외 설정TEST_PLAN.md: 종합 테스트 전략 문서🖥️ Manual Testing
테스트 브라우저 Test Browser
테스트를 진행한 브라우저를 선택해 주세요. Please select the browser(s) you ran the test on. (다중 선택 가능 you can select multiple) [X] X는 대문자여야 합니다.
테스트 시나리오
수정 전 문제점들:
http://localhost:3000/접속 시 빈 페이지 표시 (헤더/풋터만 존재)수정 후 개선사항:
http://localhost:3000/→http://localhost:3000/egovframe-template-simple-react/자동 이동테스트 스크린샷 또는 캡처 영상 Test screenshots or captured video
테스트 전과 후의 스크린샷 또는 캡처 영상을 이곳에 첨부해 주세요. Please attach screenshots or video captures of your before and after tests here.
테스트 결과:
npm run build에러 없이 성공npm run lint모든 규칙 통과npm run test:coverage22개 테스트 100% 통과수정된 주요 기능들:
http://localhost:3000/→http://localhost:3000/egovframe-template-simple-react/자동 이동🛠 기술적 세부사항
이 기여는 전자정부 프레임워크의 테스트 품질 향상과 개발자 경험 개선을 목적으로 합니다.