Commit e54e60f
committed
Extract modal logic into ProjectModals, tighten type guards and coverage
- Add ProjectModals component to own modal state (select/create/metadata) and their transitions, removing this responsibility from InterlinearizerLoader
- Add ProjectModals.test.tsx with full coverage of modal visibility and transition flows
- Strengthen isPlatformError mock to require platformErrorVersion to be a valid number, not just present
- Handle SyntaxError in CreateProjectModal.handleSubmit with a user-visible notification instead of silently failing
- Add test for invalid JSON response in CreateProjectModal
- Add test for non-string description field in SelectInterlinearProjectModal
- Mark isSubmittingRef guard branches with v8 ignore in modals1 parent e07e4d7 commit e54e60f
7 files changed
Lines changed: 793 additions & 192 deletions
File tree
- __mocks__
- src
- __tests__/components
- components
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
81 | 85 | | |
82 | 86 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
11 | 27 | | |
12 | 28 | | |
13 | 29 | | |
| |||
244 | 260 | | |
245 | 261 | | |
246 | 262 | | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
247 | 282 | | |
248 | 283 | | |
249 | 284 | | |
| |||
0 commit comments