Commit 5494896
Eric Wheeler
test: update UI tests after task history migration
- Removed pass-through state tests from ContextProxy that no longer apply
- Updated ClineProvider tests to use file-based history instead of global state
- Modified ChatTextArea tests to use useTaskSearch hook instead of taskHistory prop
- Completely rewrote useTaskSearch tests to use message-based architecture
- Updated other tests to remove taskHistory references from mock states
Signed-off-by: Eric Wheeler <[email protected]>
test: Fix ClineProvider test by mocking extension context and taskHistory
This commit fixes the failing test 'correctly identifies subtask scenario for issue #4602' by:
1. Adding necessary Vitest imports
2. Mocking getExtensionContext to return a mock context with globalStorageUri
3. Mocking taskHistory module to prevent file system operations during tests
Signed-off-by: Eric Wheeler <[email protected]>1 parent 1f08c7f commit 5494896
File tree
8 files changed
+428
-227
lines changed- src/core
- config/__tests__
- task/__tests__
- webview/__tests__
- webview-ui/src
- components
- chat/__tests__
- history/__tests__
- context/__tests__
8 files changed
+428
-227
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | 105 | | |
141 | 106 | | |
142 | 107 | | |
| |||
150 | 115 | | |
151 | 116 | | |
152 | 117 | | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | 118 | | |
181 | 119 | | |
182 | 120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | 201 | | |
218 | 202 | | |
219 | 203 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
23 | 38 | | |
24 | 39 | | |
25 | 40 | | |
| |||
147 | 162 | | |
148 | 163 | | |
149 | 164 | | |
| 165 | + | |
150 | 166 | | |
151 | 167 | | |
152 | 168 | | |
| |||
500 | 516 | | |
501 | 517 | | |
502 | 518 | | |
503 | | - | |
504 | 519 | | |
505 | 520 | | |
506 | 521 | | |
| |||
735 | 750 | | |
736 | 751 | | |
737 | 752 | | |
738 | | - | |
| 753 | + | |
739 | 754 | | |
740 | 755 | | |
741 | 756 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
42 | 45 | | |
43 | 46 | | |
44 | 47 | | |
45 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
46 | 53 | | |
47 | 54 | | |
48 | 55 | | |
| |||
Lines changed: 29 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
19 | 26 | | |
20 | 27 | | |
21 | 28 | | |
| |||
674 | 681 | | |
675 | 682 | | |
676 | 683 | | |
677 | | - | |
678 | | - | |
679 | | - | |
680 | | - | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
681 | 688 | | |
682 | 689 | | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
683 | 695 | | |
684 | 696 | | |
685 | 697 | | |
686 | 698 | | |
687 | 699 | | |
688 | 700 | | |
689 | | - | |
690 | 701 | | |
691 | 702 | | |
692 | 703 | | |
| |||
714 | 725 | | |
715 | 726 | | |
716 | 727 | | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
717 | 736 | | |
718 | 737 | | |
719 | 738 | | |
720 | 739 | | |
721 | 740 | | |
722 | 741 | | |
723 | | - | |
724 | | - | |
725 | | - | |
726 | | - | |
727 | 742 | | |
728 | 743 | | |
729 | 744 | | |
| |||
737 | 752 | | |
738 | 753 | | |
739 | 754 | | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
740 | 760 | | |
741 | 761 | | |
742 | 762 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
91 | 92 | | |
92 | | - | |
| 93 | + | |
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
| |||
0 commit comments