전제
#696에서 Presentation은 Entry와 PresentationShared를 re-export하는 target으로 축소됨
Entry는 root/auth/login/main/window/global route와 해당 흐름의 Domain 참조를 소유함
Presentation target의 직접 Domain 의존성 제거는 이미 반영된 상태임
Application/Presentation/Tests와 기존 PresentationTests 기준 root support 경로는 더 이상 사용하지 않음
PresentationShared의 HomeTab 전용 코드 소유권을 정리한다 #695 이후 Home 전용 Search/Web/RecentTodo production/test 코드는 HomeTab/HomeTabTests로 이동된 상태임
문제
Presentation 계열 테스트 지원 코드는 target 분리 이후 일부 target-local로 복사되었지만, PresentationSharedTests support에 여러 target 전용 spy/helper가 남아 있음.
현재 checkout 기준 확인된 상태:
Entry/Tests/Support/EntryTestSupport.swift는 EntryTests 공통 waitUntil, SignInUseCaseSpy를 이미 소유함
HomeTab/Tests/Home/HomeFeatureTestSpies.swift는 Home 전용 category/web/todo/network spy와 waitUntil을 이미 소유함
HomeTab/Tests/Search/SearchFeatureTestDoubles.swift는 Search 전용 spy/helper를 이미 소유함
NotificationTab/Tests/PushNotification/PushNotificationListTestSupport.swift는 PushNotification adapter와 fetch spy를 소유하지만, query/delete/toggle spy는 아직 PresentationShared/Tests/Support/TestSupport.swift에만 남아 있음
ProfileTab/Tests/Profile/ProfileFeatureTests.swift와 ProfileTab/Tests/Settings/SettingsFeatureTestDoubles.swift는 Profile/Settings 전용 spy/helper를 이미 소유함
PresentationShared/Tests/Support/TestSupport.swift에는 Entry, HomeTab, NotificationTab, ProfileTab 성격의 spy와 현재 사용처가 없는 spy가 남아 있음
Application/Presentation 아래 기존 PresentationTests header/comment 문자열은 현재 검색되지 않음
테스트 전용 코드를 공유 target으로 빼면 Tuist graph에 테스트 support target이 노출되므로, 별도 test-only module을 만들지 않고 각 테스트 target 내부에만 두는 방향으로 정리 필요.
작업 계획
NotificationTabTests 전용 spy를 target-local로 이동
DeletePushNotificationUseCaseSpy
UndoDeletePushNotificationUseCaseSpy
TogglePushNotificationReadUseCaseSpy
FetchPushNotificationQueryUseCaseSpy
UpdatePushNotificationQueryUseCaseSpy
FetchPushNotificationsUseCaseSpy는 NotificationTabTests에 PushNotificationListFetchUseCaseSpy가 있으므로 이동하지 않고 shared support 제거 대상으로 분류
EntryTests 중복 제거
EntryTestSupport.swift의 waitUntil, SignInUseCaseSpy를 canonical로 유지
PresentationShared/Tests/Support/TestSupport.swift의 Entry 성격 SignInUseCaseSpy 제거
HomeTabTests 중복 제거
HomeFeatureTestSpies.swift, SearchFeatureTestDoubles.swift의 target-local helper를 canonical로 유지
PresentationShared/Tests/Support/TestSupport.swift의 Home/Search 성격 spy 제거
ProfileTabTests 중복 제거
ProfileFeatureTests.swift, SettingsFeatureTestDoubles.swift의 target-local helper를 canonical로 유지
PresentationShared/Tests/Support/TestSupport.swift의 Profile/Settings 성격 spy 제거
PresentationSharedTests support 축소
Todo/Loading 등 shared production 타입 테스트가 실제로 사용하는 helper만 남김
현재 기준으로 waitUntil만 남기는 방향으로 정리
불필요해진 import 제거
같은 test target 내부 중복 이름만 정리하고, target 간 동일 이름 spy는 허용
완료 조건
테스트 지원 코드가 production target 또는 production public surface에 남지 않음
각 spy/helper가 사용하는 테스트 target 내부에서만 보임
PresentationSharedTests support에는 실제 shared production 타입 테스트에 필요한 helper만 남음
별도 PresentationTestSupport 같은 test-only target을 만들지 않음
Tuist 의존성 그래프에 테스트 지원 전용 module이 추가되지 않음
Application/Presentation 아래 기존 PresentationTests header/comment 문자열이 계속 검색되지 않음
제외 범위
production 모듈 소유권 변경
#695의 Search/Web/RecentTodo production 코드 이동
#696의 Presentation/Entry 책임 분리 재작업
테스트 지원 코드 중복을 없애기 위한 새 shared test target 추가
Tuist target dependency 변경
검증
변경한 테스트 Swift 파일 lint
Entry build-for-testing
HomeTab build-for-testing
NotificationTab build-for-testing
ProfileTab build-for-testing
PresentationShared build-for-testing
전제
Presentation은Entry와PresentationShared를 re-export하는 target으로 축소됨Entry는 root/auth/login/main/window/global route와 해당 흐름의Domain참조를 소유함Presentationtarget의 직접Domain의존성 제거는 이미 반영된 상태임Application/Presentation/Tests와 기존PresentationTests기준 root support 경로는 더 이상 사용하지 않음HomeTab/HomeTabTests로 이동된 상태임문제
Presentation 계열 테스트 지원 코드는 target 분리 이후 일부 target-local로 복사되었지만,
PresentationSharedTestssupport에 여러 target 전용 spy/helper가 남아 있음.현재 checkout 기준 확인된 상태:
Entry/Tests/Support/EntryTestSupport.swift는EntryTests공통waitUntil,SignInUseCaseSpy를 이미 소유함HomeTab/Tests/Home/HomeFeatureTestSpies.swift는 Home 전용 category/web/todo/network spy와waitUntil을 이미 소유함HomeTab/Tests/Search/SearchFeatureTestDoubles.swift는 Search 전용 spy/helper를 이미 소유함NotificationTab/Tests/PushNotification/PushNotificationListTestSupport.swift는 PushNotification adapter와 fetch spy를 소유하지만, query/delete/toggle spy는 아직PresentationShared/Tests/Support/TestSupport.swift에만 남아 있음ProfileTab/Tests/Profile/ProfileFeatureTests.swift와ProfileTab/Tests/Settings/SettingsFeatureTestDoubles.swift는 Profile/Settings 전용 spy/helper를 이미 소유함PresentationShared/Tests/Support/TestSupport.swift에는 Entry, HomeTab, NotificationTab, ProfileTab 성격의 spy와 현재 사용처가 없는 spy가 남아 있음Application/Presentation아래 기존PresentationTestsheader/comment 문자열은 현재 검색되지 않음테스트 전용 코드를 공유 target으로 빼면 Tuist graph에 테스트 support target이 노출되므로, 별도 test-only module을 만들지 않고 각 테스트 target 내부에만 두는 방향으로 정리 필요.
작업 계획
NotificationTabTests전용 spy를 target-local로 이동DeletePushNotificationUseCaseSpyUndoDeletePushNotificationUseCaseSpyTogglePushNotificationReadUseCaseSpyFetchPushNotificationQueryUseCaseSpyUpdatePushNotificationQueryUseCaseSpyFetchPushNotificationsUseCaseSpy는NotificationTabTests에PushNotificationListFetchUseCaseSpy가 있으므로 이동하지 않고 shared support 제거 대상으로 분류EntryTests중복 제거EntryTestSupport.swift의waitUntil,SignInUseCaseSpy를 canonical로 유지PresentationShared/Tests/Support/TestSupport.swift의 Entry 성격SignInUseCaseSpy제거HomeTabTests중복 제거HomeFeatureTestSpies.swift,SearchFeatureTestDoubles.swift의 target-local helper를 canonical로 유지PresentationShared/Tests/Support/TestSupport.swift의 Home/Search 성격 spy 제거ProfileTabTests중복 제거ProfileFeatureTests.swift,SettingsFeatureTestDoubles.swift의 target-local helper를 canonical로 유지PresentationShared/Tests/Support/TestSupport.swift의 Profile/Settings 성격 spy 제거PresentationSharedTestssupport 축소waitUntil만 남기는 방향으로 정리완료 조건
PresentationSharedTestssupport에는 실제 shared production 타입 테스트에 필요한 helper만 남음PresentationTestSupport같은 test-only target을 만들지 않음Application/Presentation아래 기존PresentationTestsheader/comment 문자열이 계속 검색되지 않음제외 범위
Presentation/Entry책임 분리 재작업검증
Entrybuild-for-testingHomeTabbuild-for-testingNotificationTabbuild-for-testingProfileTabbuild-for-testingPresentationSharedbuild-for-testing