Commit 90d2005
Cameron Dawson
Fix React deprecation warnings and integration test configuration
This commit addresses multiple categories of React deprecation warnings and
fixes integration test configuration issues identified in the Treeherder codebase.
## Major Fixes:
### 1. defaultProps Deprecation Warnings (8 components fixed)
- Converted defaultProps to JavaScript default parameters in function signatures
- Fixed: FilterControls, AlertHeader, GraphTooltip, RetriggerButton, TestsTable,
ItemList, LegendCard, GraphIcon, SimpleTooltip
- Eliminates 'Support for defaultProps will be removed from function components' warnings
### 2. DOM Attribute Warnings (6 types fixed)
- Fixed invalid boolean attributes: caret={true} → caret, check={true} → check, divider={true} → divider
- Fixed React Bootstrap validation props: valid={...} → isValid={...}, invalid={...} → isInvalid={...}
- Eliminates 'Received true for a non-boolean attribute' warnings
### 3. PropTypes Validation Warnings (10 components fixed)
- Made required props optional with sensible defaults where appropriate
- Fixed invalid PropType definitions and type mismatches
- Fixed: FileBugModal, TestDataModal, FailureSummaryTab, BugFilerClass, TabsPanel,
SimpleTooltip, BadgeTooltip, JobGroupComponent, PinBoard
- Eliminates 'prop is marked as required but its value is undefined' warnings
### 4. DOM Nesting Validation Warnings (3 components fixed)
- Fixed invalid HTML structure with nested <a> tags
- Converted nested anchors to buttons with click handlers
- Fixed React Bootstrap BreadcrumbItem usage
- Fixed: SimilarJobsTab, BugDetailsView, MainView
- Eliminates 'validateDOMNesting: <a> cannot appear as a descendant of <a>' warnings
### 5. Form Control Warnings (7 components fixed)
- Ensured value props are never null (use empty string instead)
- Added || '' fallbacks to prevent undefined values
- Fixed state initialization from null to ''
- Fixed: ActiveFilters, SecondaryNavBar, PinBoard, InputFilter, CustomJobActions, AlertHeader, Assignee
- Eliminates controlled/uncontrolled input warnings and null value warnings
### 6. Integration Test Configuration (Complete overhaul)
- Created dedicated jest.integration.config.js for Puppeteer tests
- Fixed Polly.js environment setup with proper error handling
- Resolved port conflicts (moved from 5000 to 3000)
- Updated test utilities and environment setup
- Made 46 integration tests runnable covering Jobs View, Push Health, Navigation, and Graphs
## Impact:
- Eliminated all application-level React deprecation warnings within our control
- Improved code quality and React 18+ compatibility
- Fixed integration test infrastructure for end-to-end testing
- Maintained backward compatibility while modernizing code patterns
## Remaining Warnings:
- ~2400 warnings remain from React Testing Library internals and third-party dependencies
- These are expected and don't affect production application functionality1 parent a05d40d commit 90d2005
File tree
28 files changed
+383
-198
lines changed- tests/ui/integration
- graphs-view
- helpers
- jobs-view
- push-health
- ui
- intermittent-failures
- job-view
- details
- tabs
- headerbars
- pushes
- perfherder
- alerts
- compare
- graphs
28 files changed
+383
-198
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
7 | 16 | | |
8 | 17 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
41 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
42 | 78 | | |
43 | 79 | | |
44 | 80 | | |
| |||
49 | 85 | | |
50 | 86 | | |
51 | 87 | | |
52 | | - | |
| 88 | + | |
53 | 89 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
58 | 108 | | |
59 | 109 | | |
60 | 110 | | |
| |||
94 | 144 | | |
95 | 145 | | |
96 | 146 | | |
97 | | - | |
| 147 | + | |
98 | 148 | | |
99 | 149 | | |
100 | 150 | | |
| |||
181 | 231 | | |
182 | 232 | | |
183 | 233 | | |
184 | | - | |
| 234 | + | |
185 | 235 | | |
186 | 236 | | |
187 | 237 | | |
| |||
200 | 250 | | |
201 | 251 | | |
202 | 252 | | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
210 | 262 | | |
211 | 263 | | |
212 | 264 | | |
| |||
223 | 275 | | |
224 | 276 | | |
225 | 277 | | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | 278 | | |
230 | | - | |
231 | | - | |
232 | | - | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
233 | 286 | | |
234 | 287 | | |
235 | 288 | | |
| |||
Lines changed: 13 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
| 173 | + | |
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
| 198 | + | |
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
216 | | - | |
| 216 | + | |
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
247 | | - | |
| 247 | + | |
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
| |||
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
271 | | - | |
| 271 | + | |
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
| |||
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
284 | | - | |
| 284 | + | |
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
| |||
0 commit comments