test(creator): 커뮤니티 탭 레이아웃 검증을 추가한다
This commit is contained in:
@@ -315,7 +315,7 @@
|
||||
|
||||
### Phase 4: Fragment, Adapter, XML UI 구현
|
||||
|
||||
- [ ] **Task 4.1: Fragment layout 추가**
|
||||
- [x] **Task 4.1: Fragment layout 추가**
|
||||
- 생성:
|
||||
- `app/src/main/res/layout/fragment_creator_channel_community.xml`
|
||||
- 작업:
|
||||
@@ -326,8 +326,11 @@
|
||||
- `./gradlew :app:mergeDebugResources`
|
||||
- 기대 결과:
|
||||
- 신규 layout binding 생성이 PASS한다.
|
||||
- 검증 기록:
|
||||
- 2026-06-21: RED 단계에서 `CreatorChannelCommunityFragmentLayoutTest`를 먼저 추가했고, production 파일 추가 전 `compileDebugUnitTestKotlin`이 fragment/list/grid layout ID, resource, source file 미구현으로 실패함을 확인했다.
|
||||
- 2026-06-21: `fragment_creator_channel_community.xml`을 추가해 Sort-bar, 단일 `RecyclerView`, empty/error/retry 영역을 구성했다. `./gradlew :app:mergeDebugResources` PASS로 신규 layout binding 생성을 확인했다.
|
||||
|
||||
- [ ] **Task 4.2: 리스트형 item layout/adapter 추가**
|
||||
- [x] **Task 4.2: 리스트형 item layout/adapter 추가**
|
||||
- 생성:
|
||||
- `app/src/main/res/layout/item_creator_channel_community_list.xml`
|
||||
- `app/src/main/java/kr/co/vividnext/sodalive/v2/creator/channel/community/ui/CreatorChannelCommunityListAdapter.kt`
|
||||
@@ -344,8 +347,14 @@
|
||||
- `./gradlew :app:testDebugUnitTest --tests "kr.co.vividnext.sodalive.v2.creator.channel.community.CreatorChannelCommunityFragmentLayoutTest"`
|
||||
- 기대 결과:
|
||||
- layout resource와 adapter bind source 검증이 PASS한다.
|
||||
- 검증 기록:
|
||||
- 2026-06-21: `item_creator_channel_community_list.xml`과 `CreatorChannelCommunityListAdapter.kt`를 추가해 리스트형 card, 댓글 숨김, 유료 미구매 잠금, play button, owner more/price 표시 정책을 binding 경로에 반영했다.
|
||||
- 2026-06-21: `./gradlew :app:testDebugUnitTest --tests "kr.co.vividnext.sodalive.v2.creator.channel.community.CreatorChannelCommunityFragmentLayoutTest"` PASS로 리스트 layout/resource와 adapter bind source 검증을 확인했다.
|
||||
- 2026-06-21: Phase 4 reviewer gate에서 유료 미구매 locked item의 `imageUrl` 유지와 이미지 로드 가능성, locked price pill 표시 검증 부족, play/pause icon이 실제 재생 상태와 분리된 점, owner more callback에 item 정보와 고정 상태가 부족한 점으로 초기 FAIL을 확인했다. 보정으로 locked item은 `imageUrl`을 비우고 이미지 로드를 막았으며, 가격 pill 표시를 테스트로 고정하고, `isPlayingContent(postId)` 기반 play/pause icon bind와 owner more item callback에 `isPinned` 보존 정보를 반영했다. 보정 후 Phase 4 관련 검증은 PASS했다.
|
||||
- 2026-06-21: 최종 Phase 4 review fix로 리스트형 locked price capsule을 `tv_creator_channel_community_list_locked_price`가 이미지 잠금 영역 안에 표시되도록 이동했다. `ListAdapter`의 locked price와 top price 표시 조건도 분리해, 상단 가격은 본인 채널 owner-only 조건에서만 다시 보이도록 복구했다.
|
||||
- 2026-06-22: Phase 4 코드 리뷰에서 Figma `665:19021` 본인 채널 리스트형 유료 게시글의 가격 태그와 더보기 버튼이 feed 카드 우측 상단 `etc` 영역에 함께 배치되는 것을 확인했다. 기존 XML은 `tv_creator_channel_community_list_top_price`가 reaction row 우측에 있어 요구사항과 어긋났으므로 RED 테스트를 추가한 뒤, `layout_creator_channel_community_list_top_actions` 컨테이너 안으로 가격 태그와 더보기 버튼을 이동했다. `CreatorChannelCommunityListAdapter`는 상단 액션 컨테이너 visibility를 `showOwnerMore || showOwnerTopPrice`로 bind하도록 보정했다.
|
||||
|
||||
- [ ] **Task 4.3: 썸네일형 grid item layout/adapter 추가**
|
||||
- [x] **Task 4.3: 썸네일형 grid item layout/adapter 추가**
|
||||
- 생성:
|
||||
- `app/src/main/res/layout/item_creator_channel_community_grid.xml`
|
||||
- `app/src/main/java/kr/co/vividnext/sodalive/v2/creator/channel/community/ui/CreatorChannelCommunityGridAdapter.kt`
|
||||
@@ -361,8 +370,12 @@
|
||||
- `./gradlew :app:testDebugUnitTest --tests "kr.co.vividnext.sodalive.v2.creator.channel.community.CreatorChannelCommunityFragmentLayoutTest"`
|
||||
- 기대 결과:
|
||||
- grid layout/resource 검증이 PASS한다.
|
||||
- 검증 기록:
|
||||
- 2026-06-21: `item_creator_channel_community_grid.xml`과 `CreatorChannelCommunityGridAdapter.kt`를 추가해 3열 정사각형 grid, 이미지/텍스트 preview, 잠금/가격, notice 표시 정책을 구현했다.
|
||||
- 2026-06-21: `./gradlew :app:testDebugUnitTest --tests "kr.co.vividnext.sodalive.v2.creator.channel.community.CreatorChannelCommunityFragmentLayoutTest"` PASS와 `./gradlew :app:mergeDebugResources` PASS로 grid layout/resource 검증을 확인했다.
|
||||
- 2026-06-21: Phase 4 reviewer gate에서 grid item 크기가 좌우 margin을 반영하지 않아 3열 정사각형 sizing이 과대 계산될 수 있다는 FAIL을 확인했다. 보정으로 grid adapter의 item 크기 계산에 RecyclerView padding과 item margin을 반영했고, margin-aware sizing 테스트를 추가했다. 보정 후 grid layout 검증은 PASS했다.
|
||||
|
||||
- [ ] **Task 4.4: `CreatorChannelCommunityFragment` 구현**
|
||||
- [x] **Task 4.4: `CreatorChannelCommunityFragment` 구현**
|
||||
- 생성:
|
||||
- `app/src/main/java/kr/co/vividnext/sodalive/v2/creator/channel/community/CreatorChannelCommunityFragment.kt`
|
||||
- 작업:
|
||||
@@ -378,8 +391,13 @@
|
||||
- `./gradlew :app:testDebugUnitTest --tests "kr.co.vividnext.sodalive.v2.creator.channel.community.*"`
|
||||
- 기대 결과:
|
||||
- Fragment와 adapter 테스트가 GREEN이다.
|
||||
- 검증 기록:
|
||||
- 2026-06-21: `CreatorChannelCommunityFragment.kt`를 추가해 ViewModel 상태 observe, Loading/Empty/Error/Content bind, 보기 방식 toggle, List/Grid `LayoutManager` 전환, pagination error consume, tab/scroll/owner CTA entry, media player 정리 경로를 구현했다.
|
||||
- 2026-06-21: 병렬 Gradle 실행 1건에서 Kotlin incremental cache/daemon 충돌과 timeout이 있었고, 영향받은 community test를 단독 재실행해 PASS를 확인했다. 이후 `./gradlew :app:testDebugUnitTest --tests "kr.co.vividnext.sodalive.v2.creator.channel.community.*"` PASS와 `./gradlew :app:testDebugUnitTest --tests "kr.co.vividnext.sodalive.v2.creator.channel.*Community*"` PASS를 확인했다.
|
||||
- 2026-06-21: Phase 4 reviewer gate에서 Fragment가 화면 이탈 `onPause()` 시 오디오를 멈추지 않아 백그라운드 재생이 남을 수 있다는 FAIL을 확인했다. 보정으로 `onPause()`에서 `pauseContent()`를 호출하고, 기존 정리 경로의 `stopContent()`는 유지했다. 보정 후 Fragment 생명주기 검증은 PASS했다.
|
||||
- 2026-06-21: 최종 Phase 4 review fix로 `CreatorCommunityMediaPlayerManager`에 `prepareAsync()` 완료 전 `pauseContent()`와 `stopContent()`가 호출될 수 있는 경로를 막는 prepared-state guard를 추가했다. prepare 전 pause/stop 호출은 MediaPlayer invalid state를 만들지 않도록 보호하고, Fragment 생명주기 정리 경로는 유지했다.
|
||||
|
||||
- [ ] **Task 4.5: 문자열/리소스 정리**
|
||||
- [x] **Task 4.5: 문자열/리소스 정리**
|
||||
- 수정:
|
||||
- `app/src/main/res/values/strings.xml`
|
||||
- `app/src/main/res/values-en/strings.xml`
|
||||
@@ -392,6 +410,9 @@
|
||||
- `./gradlew :app:mergeDebugResources`
|
||||
- 기대 결과:
|
||||
- 한국어/영어/일본어 string 참조가 모두 해소된다.
|
||||
- 검증 기록:
|
||||
- 2026-06-21: community 관련 문자열을 `strings.xml`, `values-en/strings.xml`, `values-ja/strings.xml`에 추가하고 기존 재사용 가능한 문구는 중복하지 않았다.
|
||||
- 2026-06-21: `./gradlew :app:mergeDebugResources` PASS, `./gradlew :app:compileDebugKotlin` PASS, `./gradlew :app:ktlintCheck` PASS, `git diff --check` PASS를 확인했다. `ktlintCheck`는 신규 layout test와 list adapter의 formatting-only 수정 후 PASS했다.
|
||||
|
||||
---
|
||||
|
||||
@@ -513,3 +534,45 @@
|
||||
- 회귀: `./gradlew :app:testDebugUnitTest --tests "kr.co.vividnext.sodalive.v2.creator.channel.*Community*"` PASS.
|
||||
- 확장 회귀: `./gradlew :app:testDebugUnitTest --tests "kr.co.vividnext.sodalive.v2.creator.channel.*"` PASS.
|
||||
- 빌드/리소스/린트: `./gradlew :app:mergeDebugResources`, `./gradlew :app:compileDebugKotlin`, `./gradlew :app:ktlintCheck`, `git diff --check` PASS.
|
||||
|
||||
- 2026-06-21 Phase 4 검증:
|
||||
- RED: `CreatorChannelCommunityFragmentLayoutTest`를 먼저 추가했고 production 구현 전 `compileDebugUnitTestKotlin`이 fragment/list/grid layout ID, resource, source file 미구현으로 실패함을 확인했다.
|
||||
- Production: `fragment_creator_channel_community.xml`, `item_creator_channel_community_list.xml`, `item_creator_channel_community_grid.xml`, `CreatorChannelCommunityFragment.kt`, `CreatorChannelCommunityListAdapter.kt`, `CreatorChannelCommunityGridAdapter.kt`, ko/en/ja community strings를 추가했다.
|
||||
- GREEN: `./gradlew :app:testDebugUnitTest --tests "kr.co.vividnext.sodalive.v2.creator.channel.community.CreatorChannelCommunityFragmentLayoutTest"` PASS.
|
||||
- 회귀: `./gradlew :app:testDebugUnitTest --tests "kr.co.vividnext.sodalive.v2.creator.channel.community.*"` PASS, `./gradlew :app:testDebugUnitTest --tests "kr.co.vividnext.sodalive.v2.creator.channel.*Community*"` PASS.
|
||||
- 빌드/리소스/린트: `./gradlew :app:mergeDebugResources`, `./gradlew :app:compileDebugKotlin`, `./gradlew :app:ktlintCheck`, `git diff --check` PASS. `ktlintCheck`는 신규 layout test와 list adapter의 formatting-only 수정 후 PASS했다.
|
||||
- 참고: 병렬 Gradle 실행 1건에서 Kotlin incremental cache/daemon 충돌과 timeout이 발생했고, 영향받은 community test를 단독 재실행해 PASS를 확인했다.
|
||||
|
||||
- 2026-06-21 Phase 4 reviewer gate 수정 및 재검증:
|
||||
- 초기 결과: reviewer gate가 locked image와 price pill, play/pause 상태, owner more item 정보, `onPause()` media pause, grid margin sizing 문제로 FAIL했다.
|
||||
- 수정 기록: `isPinned` 보존, locked item `imageUrl` clearing과 이미지 load 차단, locked price pill 검증, `isPlayingContent(postId)` 기반 play/pause icon, owner more item callback, Fragment `onPause()`의 `pauseContent()`, grid margin-aware sizing, 관련 테스트 갱신을 반영했다.
|
||||
- GREEN: `./gradlew :app:testDebugUnitTest --tests "kr.co.vividnext.sodalive.v2.creator.channel.community.*"` PASS.
|
||||
- 회귀: `./gradlew :app:testDebugUnitTest --tests "kr.co.vividnext.sodalive.v2.creator.channel.*Community*"` PASS.
|
||||
- 빌드/리소스/린트: `./gradlew :app:mergeDebugResources`, `./gradlew :app:compileDebugKotlin`, `./gradlew :app:ktlintCheck`, `git diff --check` PASS.
|
||||
- 최종 결과: post-fix reviewer gate PASS로 Phase 4 review-gate fixes 검증을 완료했다.
|
||||
|
||||
- 2026-06-21 Phase 4 최종 리뷰 수정 및 검증:
|
||||
- 최종 수정 기록: 리스트형 locked list price capsule은 `tv_creator_channel_community_list_locked_price`를 이미지 잠금 영역 안으로 이동해 locked card 내부에서 표시되게 했다. `ListAdapter`는 locked price와 top price 조건을 분리했고, top price는 본인 채널 owner-only 게시글에서만 보이도록 복구했다. `CreatorCommunityMediaPlayerManager`에는 `prepareAsync()` 완료 전 `pauseContent()`/`stopContent()` 호출을 막는 prepared-state guard를 추가했다.
|
||||
- GREEN: `./gradlew :app:testDebugUnitTest --tests "kr.co.vividnext.sodalive.v2.creator.channel.community.*"` PASS.
|
||||
- 회귀: `./gradlew :app:testDebugUnitTest --tests "kr.co.vividnext.sodalive.v2.creator.channel.*Community*"` PASS.
|
||||
- 리소스: `./gradlew :app:mergeDebugResources` PASS.
|
||||
- 컴파일: `./gradlew :app:compileDebugKotlin` PASS.
|
||||
- 린트: `./gradlew :app:ktlintCheck` PASS.
|
||||
- 공백 검증: `git diff --check` PASS.
|
||||
|
||||
- 2026-06-22 Phase 4 보안 로그 제거 후 최종 검증:
|
||||
- 보안 수정 기록: `CreatorChannelCommunityViewModel.kt`의 `Logger.e(message)`와 `Logger` import를 제거했고, `CreatorCommunityMediaPlayerManager.kt`의 `e.printStackTrace()`를 제거했다. `authToken()`/`SharedPreferenceManager.token`은 repository 호출용 bearer 생성 경로로만 남아 있으며 로그로 노출하지 않는다.
|
||||
- GREEN: `./gradlew :app:testDebugUnitTest --tests "kr.co.vividnext.sodalive.v2.creator.channel.community.*"` PASS.
|
||||
- 컴파일: `./gradlew :app:compileDebugKotlin` PASS.
|
||||
- 린트: `./gradlew :app:ktlintCheck` PASS.
|
||||
- 공백 검증: `git diff --check` PASS.
|
||||
- 최종 보안 재리뷰: Oracle verdict PASS, severity none, blocking_issues 없음.
|
||||
|
||||
- 2026-06-22 Phase 4 코드 리뷰 및 검증:
|
||||
- 코드 리뷰: Figma `665:19021`과 Phase 4 요구사항을 기준으로 리스트형 owner 유료 가격 태그 위치, 잠금 이미지 처리, play/pause 상태, owner more callback, grid sizing, media player 생명주기를 대조했다. 가격 태그가 reaction row에 배치된 결함 1건을 발견했고, 우측 상단 액션 컨테이너로 이동해 수정했다.
|
||||
- RED: `./gradlew :app:testDebugUnitTest --tests "kr.co.vividnext.sodalive.v2.creator.channel.community.CreatorChannelCommunityFragmentLayoutTest"`는 `layout_creator_channel_community_list_top_actions` 미구현으로 실패함을 확인했다.
|
||||
- GREEN: `./gradlew :app:testDebugUnitTest --tests "kr.co.vividnext.sodalive.v2.creator.channel.community.CreatorChannelCommunityFragmentLayoutTest"` PASS.
|
||||
- 회귀: `./gradlew :app:testDebugUnitTest --tests "kr.co.vividnext.sodalive.v2.creator.channel.community.*"` PASS, `./gradlew :app:testDebugUnitTest --tests "kr.co.vividnext.sodalive.v2.creator.channel.*Community*"` PASS.
|
||||
- 리소스/컴파일/린트: `./gradlew :app:mergeDebugResources`, `./gradlew :app:compileDebugKotlin`, `./gradlew :app:ktlintCheck` PASS.
|
||||
- 공백 검증: `git diff --check` PASS.
|
||||
- 참고: Gradle 실행 중 기존 `WeekCalendarAdapter.kt` Kotlin annotation target 경고, 기존 테스트 deprecation 경고, 기존 `.editorconfig`의 `disabled_rules` deprecation 경고가 출력됐으나 이번 Phase 4 변경 파일의 실패는 없었다.
|
||||
|
||||
Reference in New Issue
Block a user