Commit 0d6d562
[scanner] 🐛 fix: update StorageOverview tests for useModalState migration (#19312)
The CardComponents mock only exported CardClusterFilter, but after PR #19310
the StorageOverview component uses CardControlsRow, CardHeaderRow, CardStatGrid,
and CardStatHeader from that module. These were undefined in the mock, causing
all 7 tests to fail when the component tried to render them.
- Add React import for ReactNode type usage in mocks
- Add CardHeaderRow mock (renders children as fragment)
- Replace CardClusterFilter mock with CardControlsRow mock that renders
the cluster-filter testid when clusterFilter prop is provided
- Add CardStatGrid mock (renders children as fragment)
- Add CardStatHeader mock (renders children as fragment)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 697cf5e commit 0d6d562
1 file changed
Lines changed: 10 additions & 2 deletions
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
48 | | - | |
49 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
50 | 56 | | |
| 57 | + | |
| 58 | + | |
51 | 59 | | |
52 | 60 | | |
53 | 61 | | |
| |||
0 commit comments