Skip to content

Improve article validation and test coverage#22

Merged
leesunghyun merged 3 commits into
mainfrom
codex/v0.2-release-workflow-tags
Jun 27, 2026
Merged

Improve article validation and test coverage#22
leesunghyun merged 3 commits into
mainfrom
codex/v0.2-release-workflow-tags

Conversation

@leesunghyun

@leesunghyun leesunghyun commented Jun 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add validation UX to article detail editing (required title/body, inline validation text, disabled save when invalid)
  • Add/expand UI tests for back-without-save and validation behavior
  • Add reducer unit test and logic guard for invalid article selection IDs
  • Keep documentation/checklist state aligned with the actual demo replacement status

Changes

1) Article detail UX (validation)

  • app/src/main/java/com/example/viewmodelmigration/ui/ArticleDetailScreen.kt
    • Added required-field checks for title/body
    • Added per-field error state and supporting validation text
    • Added global validation hint text
    • Disabled save button until both fields are valid

2) Reducer safety and tests

  • app/src/main/java/com/example/viewmodelmigration/core/ArticleListReducer.kt
    • SelectArticle now validates requested article id exists before setting selection
  • app/src/test/java/com/example/viewmodelmigration/core/ArticleListReducerTest.kt
    • Added selectArticle_invalidId_clearsSelectionForInvalidStateSafety

3) Compose UI smoke coverage

  • app/src/androidTest/java/com/example/viewmodelmigration/ArticleUiSmokeTest.kt
    • Added saveButton_isDisabledAndShowsValidation_whenRequiredFieldsAreEmpty
    • Added backWithoutSave_keepsOriginalArticleInList

4) Docs / release alignment

  • README.md: removed demo placeholder note and updated v0.2 checklist
  • docs/release-notes-v0.2.0-oss-alpha.1.md: updated demo-planning wording
  • docs/roadmap-v0.2.0.md: marked demo replacement as complete
  • docs/images/demo.gif: replaced placeholder with real emulator demo recording

Verification

  • Scope reviewed and tests added in source and UI test suites
  • ./gradlew test (via GitHub Actions: Android CI)
  • ./gradlew assembleDebug (via GitHub Actions: Android CI)
  • Emulator validation for smoke paths (manual)

@leesunghyun
leesunghyun marked this pull request as ready for review June 27, 2026 10:14
@leesunghyun

Copy link
Copy Markdown
Owner Author

Remaining follow-up: manual smoke validation is still marked unchecked in PR verification. I recommend running a quick 10~20 second emulator smoke pass (edit/save/back cases) and then checking this item manually.

@leesunghyun

Copy link
Copy Markdown
Owner Author

실기기(R5CN30C32XB, SM_G9860)에서 수동 스모크 시나리오 검증 완료했습니다.

검증 절차:

  1. 앱 설치 후 첫 번째 항목 편집 -> Title에 SMOKECHECK 추가 -> Save 탭
  2. 목록으로 복귀 후 첫 번째 항목 타이틀/바디 반영 확인
  3. 두 번째 항목 편집 -> Body에 NOSAVECHK 추가 -> Back 탭
  4. 목록에서 두 번째 항목이 변경되지 않은 상태 유지 확인

결과:

  • Save 반영: → (텍스트 반영됨)
  • Back without save: 항목은 바디 변경 없음(변경 미반영)

PR 체크리스트 [ ] 항목은 실기기 기준으로 완료 처리 가능합니다.

@leesunghyun

Copy link
Copy Markdown
Owner Author

실기기 검증 결과 보완 공지:

  • 저장 케이스: 첫 번째 항목 제목이 "Legacy ViewModel"에서 "Legacy ViewModel SMOKECHECK"로 변경되어 목록 반영됨.
  • 미저장 뒤 뒤로 가기: 두 번째 항목 "StateFlow Migration"은 편집 중 입력값 NOSAVECHK를 추가했지만 목록으로 복귀 시 바디/제목 변경 없음.
  • 따라서 PR 본문의 남은 체크 항목(Emulator validation for smoke paths)은 실기기 기준 완료 처리해도 됩니다.

@leesunghyun
leesunghyun merged commit 65043e1 into main Jun 27, 2026
1 check passed
@leesunghyun
leesunghyun deleted the codex/v0.2-release-workflow-tags branch June 27, 2026 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant