Rewrite custom-list test suites with React Testing Library#318
Rewrite custom-list test suites with React Testing Library#318jonathangreen wants to merge 1 commit into
Conversation
|
Claude finished @jonathangreen's task in 4m 18s —— View job Code Review — PR #318: Rewrite custom-list test suites with React Testing Library
SummaryThis is a clean, faithful test-only migration. I reviewed all five migrated suites against their source components ( A few things I specifically checked that are correct as written (so no change needed):
Note: I was unable to execute the suites myself (dependency install requires an approval I don't have in this run), so this is a static review; the author's reported 5 suites / 109 tests passing and the Codecov result are consistent with what I read. |
Greptile SummaryThis PR rewrites the custom-list test suites with React Testing Library.
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (2): Last reviewed commit: "Rewrite custom-list test suites with Rea..." | Re-trigger Greptile |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #318 +/- ##
==========================================
+ Coverage 90.14% 90.22% +0.07%
==========================================
Files 205 205
Lines 7610 7610
Branches 1664 1664
==========================================
+ Hits 6860 6866 +6
+ Misses 437 431 -6
Partials 313 313
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:
|
993d3b1 to
2313de7
Compare
Description
Rewrites the custom-list and list-entry 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):
CustomListEntriesEditorwas the largest suite in the whole migration (originally 1461 LOC).CustomListEntriesEditorandLaneCustomListsEditorusereact-beautiful-dnd, which can't drag in jsdom.DragDropContextis mocked to captureonDragStart/onDragEnd, which the tests then invoke with synthetic drag results — both suites reach 100% coverage this way.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: 5 suites / 109 tests pass. No application source changes — test files only.Checklist: