Commit 233e398
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 79d3096 commit 233e398
File tree
8 files changed
+427
-228
lines changed- src/core
- config/__tests__
- task/__tests__
- webview/__tests__
- webview-ui/src
- components
- chat/__tests__
- history/__tests__
- context/__tests__
8 files changed
+427
-228
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 | 6 | | |
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
24 | 38 | | |
25 | 39 | | |
26 | 40 | | |
| |||
148 | 162 | | |
149 | 163 | | |
150 | 164 | | |
| 165 | + | |
151 | 166 | | |
152 | 167 | | |
153 | 168 | | |
| |||
501 | 516 | | |
502 | 517 | | |
503 | 518 | | |
504 | | - | |
505 | 519 | | |
506 | 520 | | |
507 | 521 | | |
| |||
736 | 750 | | |
737 | 751 | | |
738 | 752 | | |
739 | | - | |
| 753 | + | |
740 | 754 | | |
741 | 755 | | |
742 | 756 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
46 | 49 | | |
47 | 50 | | |
48 | 51 | | |
49 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
50 | 57 | | |
51 | 58 | | |
52 | 59 | | |
| |||
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 | | |
| |||
737 | 744 | | |
738 | 745 | | |
739 | 746 | | |
740 | | - | |
741 | | - | |
742 | | - | |
743 | | - | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
744 | 751 | | |
745 | 752 | | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
746 | 758 | | |
747 | 759 | | |
748 | 760 | | |
749 | 761 | | |
750 | 762 | | |
751 | 763 | | |
752 | | - | |
753 | 764 | | |
754 | 765 | | |
755 | 766 | | |
| |||
777 | 788 | | |
778 | 789 | | |
779 | 790 | | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
780 | 799 | | |
781 | 800 | | |
782 | 801 | | |
783 | 802 | | |
784 | 803 | | |
785 | 804 | | |
786 | | - | |
787 | | - | |
788 | | - | |
789 | | - | |
790 | 805 | | |
791 | 806 | | |
792 | 807 | | |
| |||
800 | 815 | | |
801 | 816 | | |
802 | 817 | | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
803 | 823 | | |
804 | 824 | | |
805 | 825 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| |||
0 commit comments