[2팀 김우정] Chapter 1-2. AI와 테스트를 활용한 안정적인 기능 개발 - #17
Closed
kimfriendship wants to merge 44 commits into
Closed
Conversation
- RepeatInfo 타입에 id 필드 추가하여 반복 일정 그룹 식별 - generateRepeatEvents에서 반복 일정 생성 시 repeatId 생성 및 모든 발생 건에 부여 - updateRepeatEvents에서 repeat.id로 반복 그룹을 정확히 식별하여 처리 - mode='single': 해당 일정만 수정하고 반복에서 분리 - mode='all': 같은 repeat.id를 가진 모든 일정 수정
- createEventWithRepeatId 헬퍼 함수 추가하여 중복 코드 제거 - updateRepeatEvents 함수를 작은 함수들로 분리 - updateSingleNonRepeatEvent: 일반 일정 단일 수정 - updateSingleOccurrence: 반복 일정 단일 발생 건 수정 - updateAllOccurrences: 반복 일정 그룹 전체 수정 - 코드 가독성 및 유지보수성 향상
- TC-009 전체 수정 테스트 케이스 추가 - 중복 테스트 제거 및 루프 최적화 - forEach 루프를 every()로 변경하여 검증 로직 통합 - 불필요한 detachSingleOccurrence 호출 제거
- deleteRepeatEvents 함수 껍데기 추가 - TC-010 단일 삭제 테스트 케이스 작성 - 테스트 코드 루프 최적화 (6번 → 2번) - map/filter 중복 제거 - every()로 검증 로직 통합
- 단일/전체 삭제 지원 (repeat.id 기반 그룹 삭제) - TC-010 테스트 통과
- 반복 그룹 전체 삭제 동작 검증 - 기존 TC-010과 함께 삭제 시나리오 보완
- 월간/주간 뷰별 반복 일정 표시 검증 테스트 작성 - saveRepeatSchedule 헬퍼 함수 추가 (기존 패턴 참고) - 반복 아이콘 검증 포함 - 병렬 실행 안전성 및 API 격리 준수
- isRepeating이 true가 될 때 repeatType이 'none'이면 기본값 'daily'로 설정 - Select 컴포넌트 value에서 'none'인 경우 'daily' 사용하도록 처리
- 반복 종료일 input 필드에 max 속성 추가 (2025-12-31) - generateRepeatEvents에서 종료일이 2025-12-31을 넘으면 자동으로 2025-12-31로 제한 - INT-004 테스트 추가: 반복 종료일 input에서 2025-12-31까지만 선택 가능한지 검증
- INT-EDIT-001: 반복 일정 단일 수정 테스트 - INT-EDIT-002: 반복 일정 전체 수정 테스트
- 반복 일정 수정 시 Dialog 표시 (이 일정만/모든 일정 선택) - 단일 수정: 해당 일정만 수정하고 반복 그룹에서 분리 - 전체 수정: 같은 repeat.id를 가진 모든 일정 수정 - handlersUtils에 PUT handler 추가 - INT-EDIT-001, INT-EDIT-002 테스트 통과
- INT-DEL-001: 반복 일정 단일 삭제 테스트 - INT-DEL-002: 반복 일정 전체 삭제 테스트
- 반복 일정 삭제 시 Dialog 표시 (이 일정만/모든 일정 선택) - 단일 삭제: 해당 일정만 삭제 - 전체 삭제: 같은 repeat.id를 가진 모든 일정 삭제 - INT-DEL-001, INT-DEL-002 테스트 통과
- 유틸 함수 추출: isRepeatEvent, getRepeatGroupEvents - 함수 분리 및 책임 명확화 - updateSingleEvent: 단일 이벤트 수정 - updateAllRepeatEvents: 반복 그룹 전체 수정 - Promise.all로 병렬 처리 개선 - 중복 코드 제거 및 가독성 향상 - 사용하지 않는 import/변수 정리
- 공통 헬퍼 파일 생성: repeatScheduleTestHelpers.tsx - setupTestApp: 테스트 App 렌더링 (타입 명시) - saveRepeatSchedule: 반복 일정 저장 헬퍼 - activateRepeatCheckbox: 체크박스 활성화 - selectRepeatType: 반복 유형 선택 - inputRepeatEndDate: 종료일 입력 - 중복 코드 제거 (~270줄) - 3개 테스트 파일 리팩토링 완료 - 모듈화 및 재사용성 향상
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#89