Commit bf7aa53
test(date-time-picker): boost coverage (#806)
* test(date-time-picker): cover Picker props (209–214) and boost coverage 95%+
Add MockPicker spec to hit header/footer/onConfirm/onCancel props wiring
Add rerender path to cover “no header/footer and no handlers” falsy branches
Add className/style specs to hit template literal trim branches
Improve filter/renderLabel/array time-mode branch coverage
Fix test stability by using rerender from render result
Affected
src/date-time-picker/tests/date-time-picker.test.tsx
src/date-time-picker/DateTimePicker.tsx
* fix: fix lint
* fix: fix type error
* test: update snapshots
---------
Co-authored-by: anlyyao <[email protected]>1 parent 22848d5 commit bf7aa53
File tree
7 files changed
+733
-36
lines changed- site
- src
- date-time-picker
- __tests__
- side-bar/__tests__/__snapshots__
- table/_example
- test/snap/__snapshots__
7 files changed
+733
-36
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
| 32 | + | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
208 | | - | |
209 | | - | |
| 208 | + | |
210 | 209 | | |
211 | 210 | | |
212 | | - | |
213 | | - | |
214 | | - | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
215 | 214 | | |
216 | 215 | | |
217 | 216 | | |
218 | 217 | | |
219 | | - | |
| 218 | + | |
| 219 | + | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
223 | | - | |
| 222 | + | |
| 223 | + | |
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
| |||
0 commit comments