Rewrite service and collection configuration test suites with React Testing Library#320
Conversation
|
Claude finished @jonathangreen's task in 4m 29s —— View job Code Review
SummaryThis is a clean, high-quality enzyme→RTL migration. The rewrites consistently replace instance-method spying with observable behavior — the DetailsNit:
|
Greptile SummaryThis PR rewrites service and collection configuration tests with React Testing Library.
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (7): Last reviewed commit: "Remove unused container binding in Proto..." | Re-trigger Greptile |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #320 +/- ##
==========================================
+ Coverage 90.72% 91.02% +0.30%
==========================================
Files 205 205
Lines 7610 7610
Branches 1664 1664
==========================================
+ Hits 6904 6927 +23
+ Misses 402 387 -15
+ Partials 304 296 -8
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:
|
38ac4f0 to
9b3a59a
Compare
e59dbeb to
88ed727
Compare
tdilauro
left a comment
There was a problem hiding this comment.
Looks good.
A few minor comments below for consideration.
Co-authored-by: Tim DiLauro <tdilauro@users.noreply.github.com>
The hidden-setting test destructured container from render() but made all of its assertions through screen, tripping no-unused-vars under --max-warnings 0.
a488301 to
1b2980d
Compare
Description
Rewrites the service and collection configuration 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):
ServiceEditFormwas one of the largest suites in the migration (originally 1087 LOC).FormData(via the shared FormData shim) rather than that a save method was called.EditableConfigListmethod short-circuits (CollectionsextendsEditableConfigList).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 / 134 tests pass. No application source changes — test files only.Checklist: