Skip to content

Commit 0bbdd32

Browse files
committed
fix: update description section behavior for built-in modes in PromptsView tests
1 parent 0a0c0da commit 0bbdd32

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

webview-ui/src/components/modes/__tests__/ModesView.spec.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,17 +171,17 @@ describe("PromptsView", () => {
171171
groups: [],
172172
}
173173

174-
// Test with built-in mode (code) - description section should not be shown
174+
// Test with built-in mode (code) - description section should be shown with reset button
175175
const { unmount } = render(
176176
<ExtensionStateContext.Provider
177177
value={{ ...mockExtensionState, mode: "code", customModes: [customMode] } as any}>
178178
<ModesView onDone={vitest.fn()} />
179179
</ExtensionStateContext.Provider>,
180180
)
181181

182-
// Verify description reset button is not present for built-in modes
183-
// because the description section is only shown for custom modes
184-
expect(screen.queryByTestId("description-reset")).not.toBeInTheDocument()
182+
// Verify description reset button IS present for built-in modes
183+
// because built-in modes can have their descriptions customized and reset
184+
expect(screen.queryByTestId("description-reset")).toBeInTheDocument()
185185

186186
// Cleanup before testing custom mode
187187
unmount()
@@ -195,7 +195,7 @@ describe("PromptsView", () => {
195195
)
196196

197197
// Verify description section is present for custom modes
198-
// but reset button is not present (since it's only for built-in modes)
198+
// but reset button is NOT present (since custom modes manage their own descriptions)
199199
expect(screen.queryByTestId("description-reset")).not.toBeInTheDocument()
200200

201201
// Verify the description text field is present for custom modes

0 commit comments

Comments
 (0)