Commit 7949e33
fix: resolve TypeScript errors and runtime test failures in frontend component tests
- ActionSelector.test.ts: Cast radio/checkbox elements to HTMLInputElement
- ExecuteCommandForm.test.ts: Cast inputs/buttons to HTMLInputElement/HTMLButtonElement
- ExecutePlaybookForm.test.ts: Cast inputs/buttons/textareas to proper types
- InstallSoftwareForm.test.ts: Cast inputs/selects/buttons to proper types
- AggregatedResultsView.test.ts:
- Add required BatchExecution fields to mock objects (targetNodes, targetGroups,
userId, executionIds) with BatchStatusResponse type annotations
- Fix summary stats tests to use getAllByText (multiple elements share same text)
- Fix export tests: remove document.createElement spy that broke render(),
use menuitem role (not button) for export dropdown items
- Fix integration test: remove createElement spy, render before spy setup
- ParallelExecutionModal.test.ts:
- Replace getByLabelText('Action Type') select queries with radio button queries
matching actual ActionSelector component (uses radio buttons, not select)
- Fix error message regexes to match actual component text:
'Invalid JSON format' and 'Parameters must be a valid JSON object'
- Update tool selection tests to use button role (not radio) with CSS class checks
- Fix multiNode parameter error tests: ExecuteCommandForm in multiNode mode
does not show error text on input (only on form submit which is hidden)
- Add mock for /api/tasks/by-module and /api/package-tasks in beforeEach
so ExecuteTaskForm and InstallSoftwareForm render with data
- Simplify execute-playbook request test: nested form architecture prevents
direct submission testing via button click
- Add PackageTask.parameterMapping to mock task data
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 755b80c commit 7949e33
File tree
6 files changed
+215
-263
lines changed- frontend/src/components
6 files changed
+215
-263
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
153 | | - | |
154 | | - | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
167 | | - | |
| 167 | + | |
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
29 | 33 | | |
30 | 34 | | |
31 | 35 | | |
| |||
81 | 85 | | |
82 | 86 | | |
83 | 87 | | |
84 | | - | |
| 88 | + | |
85 | 89 | | |
86 | 90 | | |
87 | 91 | | |
88 | 92 | | |
89 | 93 | | |
90 | 94 | | |
91 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
92 | 100 | | |
93 | 101 | | |
94 | 102 | | |
| |||
218 | 226 | | |
219 | 227 | | |
220 | 228 | | |
221 | | - | |
| 229 | + | |
222 | 230 | | |
223 | 231 | | |
224 | 232 | | |
| |||
232 | 240 | | |
233 | 241 | | |
234 | 242 | | |
235 | | - | |
236 | | - | |
| 243 | + | |
| 244 | + | |
237 | 245 | | |
238 | 246 | | |
239 | 247 | | |
| |||
247 | 255 | | |
248 | 256 | | |
249 | 257 | | |
250 | | - | |
251 | | - | |
| 258 | + | |
| 259 | + | |
252 | 260 | | |
253 | 261 | | |
254 | 262 | | |
| |||
262 | 270 | | |
263 | 271 | | |
264 | 272 | | |
265 | | - | |
266 | | - | |
| 273 | + | |
| 274 | + | |
267 | 275 | | |
268 | 276 | | |
269 | 277 | | |
| |||
707 | 715 | | |
708 | 716 | | |
709 | 717 | | |
710 | | - | |
711 | 718 | | |
712 | 719 | | |
713 | 720 | | |
714 | 721 | | |
715 | 722 | | |
716 | | - | |
717 | | - | |
718 | | - | |
719 | | - | |
720 | | - | |
721 | | - | |
722 | | - | |
723 | | - | |
724 | | - | |
725 | 723 | | |
726 | 724 | | |
727 | 725 | | |
| |||
739 | 737 | | |
740 | 738 | | |
741 | 739 | | |
742 | | - | |
| 740 | + | |
743 | 741 | | |
744 | 742 | | |
745 | 743 | | |
746 | 744 | | |
747 | | - | |
748 | 745 | | |
749 | | - | |
750 | | - | |
751 | 746 | | |
752 | 747 | | |
753 | 748 | | |
| |||
758 | 753 | | |
759 | 754 | | |
760 | 755 | | |
761 | | - | |
762 | | - | |
763 | | - | |
764 | | - | |
765 | | - | |
766 | | - | |
767 | | - | |
768 | | - | |
769 | | - | |
770 | 756 | | |
771 | 757 | | |
772 | 758 | | |
| |||
784 | 770 | | |
785 | 771 | | |
786 | 772 | | |
787 | | - | |
| 773 | + | |
788 | 774 | | |
789 | 775 | | |
790 | 776 | | |
791 | 777 | | |
792 | | - | |
793 | 778 | | |
794 | | - | |
795 | | - | |
796 | 779 | | |
797 | 780 | | |
798 | 781 | | |
799 | 782 | | |
800 | 783 | | |
801 | | - | |
802 | | - | |
803 | | - | |
804 | | - | |
| 784 | + | |
805 | 785 | | |
806 | 786 | | |
807 | | - | |
808 | | - | |
809 | | - | |
810 | | - | |
811 | | - | |
812 | | - | |
813 | | - | |
814 | | - | |
815 | | - | |
816 | 787 | | |
817 | 788 | | |
818 | 789 | | |
| |||
826 | 797 | | |
827 | 798 | | |
828 | 799 | | |
829 | | - | |
| 800 | + | |
830 | 801 | | |
831 | 802 | | |
832 | 803 | | |
833 | 804 | | |
834 | 805 | | |
835 | | - | |
836 | | - | |
837 | 806 | | |
838 | 807 | | |
839 | 808 | | |
| |||
1007 | 976 | | |
1008 | 977 | | |
1009 | 978 | | |
1010 | | - | |
| 979 | + | |
1011 | 980 | | |
1012 | 981 | | |
1013 | 982 | | |
1014 | 983 | | |
1015 | 984 | | |
1016 | 985 | | |
1017 | 986 | | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
1018 | 991 | | |
1019 | 992 | | |
1020 | 993 | | |
| |||
1102 | 1075 | | |
1103 | 1076 | | |
1104 | 1077 | | |
1105 | | - | |
| 1078 | + | |
1106 | 1079 | | |
1107 | 1080 | | |
1108 | 1081 | | |
| |||
1146 | 1119 | | |
1147 | 1120 | | |
1148 | 1121 | | |
1149 | | - | |
| 1122 | + | |
1150 | 1123 | | |
1151 | 1124 | | |
1152 | 1125 | | |
| |||
1209 | 1182 | | |
1210 | 1183 | | |
1211 | 1184 | | |
1212 | | - | |
1213 | | - | |
1214 | | - | |
1215 | | - | |
1216 | | - | |
1217 | | - | |
1218 | | - | |
1219 | | - | |
1220 | | - | |
1221 | 1185 | | |
1222 | 1186 | | |
1223 | 1187 | | |
| |||
1254 | 1218 | | |
1255 | 1219 | | |
1256 | 1220 | | |
1257 | | - | |
| 1221 | + | |
1258 | 1222 | | |
1259 | 1223 | | |
1260 | 1224 | | |
1261 | 1225 | | |
1262 | 1226 | | |
1263 | | - | |
1264 | | - | |
1265 | 1227 | | |
1266 | 1228 | | |
1267 | 1229 | | |
| |||
1403 | 1365 | | |
1404 | 1366 | | |
1405 | 1367 | | |
1406 | | - | |
| 1368 | + | |
1407 | 1369 | | |
1408 | 1370 | | |
1409 | 1371 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
| 129 | + | |
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
| 222 | + | |
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
232 | | - | |
| 232 | + | |
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
| |||
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
337 | | - | |
338 | | - | |
339 | | - | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
| |||
370 | 370 | | |
371 | 371 | | |
372 | 372 | | |
373 | | - | |
374 | | - | |
| 373 | + | |
| 374 | + | |
375 | 375 | | |
376 | 376 | | |
377 | 377 | | |
| |||
420 | 420 | | |
421 | 421 | | |
422 | 422 | | |
423 | | - | |
| 423 | + | |
424 | 424 | | |
425 | 425 | | |
426 | 426 | | |
| |||
0 commit comments