Rewrite lane and book-detail test suites with React Testing Library#319
Rewrite lane and book-detail test suites with React Testing Library#319jonathangreen wants to merge 1 commit into
Conversation
|
Claude finished @jonathangreen's task in 4m 22s —— View job Code Review
SummaryThis is a clean, well-executed enzyme → RTL migration. I traced each new suite against the component it exercises ( Nice work — no changes requested. |
Greptile SummaryThis PR rewrites lane and book-detail component tests with React Testing Library. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (5): Last reviewed commit: "Rewrite lane and book-detail test suites..." | Re-trigger Greptile |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #319 +/- ##
==========================================
+ Coverage 90.14% 90.36% +0.22%
==========================================
Files 205 205
Lines 7610 7610
Branches 1664 1664
==========================================
+ Hits 6860 6877 +17
+ Misses 437 422 -15
+ Partials 313 311 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
The Claude code review bots minor comment:
Is valid, but I'm going to handle cleaning this up in a follow up PR after these get merged, when I delete the old |
04b38e1 to
d1cfd54
Compare
d1cfd54 to
fdb4fce
Compare
Description
Rewrites the lane-editing and book-detail editing test suites with React Testing Library.
Migrated suites (old enzyme test in
src/components/__tests__/removed, RTL test added/expanded intests/jest/components/):Migration notes (carried over from #316, for the suites in this PR):
Lanes,LanesSidebar,LaneEditor,Lane) and the book-detail forms previously mounted under enzyme;state()/instance()reads become DOM assertions anduserEventinteractions.Lanemerges into an existing jest suite rather than adding a new file.mapStateToProps/mapDispatchToPropsstay covered.This is one of four PRs splitting the oversized #316 into independently reviewable pieces, grouped by feature area. Each split branches from
mainand touches a disjoint set of component test files, so the four can be reviewed and merged in any order.Motivation and Context
#316 rewrote the HARD-tier and remaining merge test suites from enzyme to React Testing Library in a single ~11k-line change, which is impractical to review. Splitting it by feature area keeps each PR at a reviewable size while preserving the same net result. These were among the hardest suites in the mocha/chai/enzyme → jest/RTL migration — enzyme mounted them and poked class internals, so the rewrites re-express those assertions as DOM and behavior checks.
How Has This Been Tested?
npx jest --selectProjects unitover the migrated suites on this branch: 10 suites / 111 tests pass. No application source changes — test files only.Checklist: