Skip to content

Commit 4802da7

Browse files
committed
fix: update tests to match codicon implementation instead of SVG
1 parent 3c24b62 commit 4802da7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

webview-ui/src/components/chat/__tests__/ApiConfigSelector.spec.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ describe("ApiConfigSelector", () => {
7575
render(<ApiConfigSelector {...defaultProps} />)
7676

7777
const trigger = screen.getByTestId("dropdown-trigger")
78-
// Check for the icon by looking for the SVG element
79-
const icon = trigger.querySelector("svg")
78+
// Check for the icon by looking for the codicon span element
79+
const icon = trigger.querySelector(".codicon-chevron-up")
8080
expect(icon).toBeInTheDocument()
8181
})
8282

@@ -263,7 +263,7 @@ describe("ApiConfigSelector", () => {
263263
// Find the one that's in the dropdown content (not the trigger)
264264
const configInDropdown = config1Elements.find((el) => el.closest('[data-testid="popover-content"]'))
265265
const selectedConfigRow = configInDropdown?.closest("div")
266-
const checkIcon = selectedConfigRow?.querySelector("svg")
266+
const checkIcon = selectedConfigRow?.querySelector(".codicon-check")
267267
expect(checkIcon).toBeInTheDocument()
268268
})
269269

0 commit comments

Comments
 (0)