mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-11 22:51:28 +00:00
test(ui): filter the Default model pin combobox by typing, not by virtualized index
The 'default model pin' tests picked the pin out of the antd Select by title, which only works while the pin is inside the (virtualized) options list's visible viewport. Adding a third bundled preset in #37068 grew the mocked model set, pushed the pin below the viewport, and reddened the tests on staging even though nothing about the production pin behaviour changed. Typing filters the Select down to the pin so the match is not sensitive to where the pin lands in the list. Co-authored-by: Krrish Dholakia <krrish-berri-2@users.noreply.github.com>
This commit is contained in:
parent
9d40cd4df7
commit
98fae6845a
1 changed files with 6 additions and 1 deletions
|
|
@ -616,7 +616,12 @@ describe("AddAutoRouterTab", () => {
|
|||
|
||||
// Applying a preset collapses Detailed Configuration, so the default model row is behind it.
|
||||
expandDetailedConfiguration();
|
||||
await user.click(screen.getByRole("combobox", { name: "Default model" }));
|
||||
const defaultModelCombobox = screen.getByRole("combobox", { name: "Default model" });
|
||||
await user.click(defaultModelCombobox);
|
||||
// Typing filters the antd Select down to the pin so the match does not depend on where the
|
||||
// pin lands in the (virtualized) options list; adding another preset to the bundled JSON has
|
||||
// in the past pushed the pin below the visible viewport and reddened this test.
|
||||
await user.type(defaultModelCombobox, PINNED_MODEL);
|
||||
await user.click((await screen.findAllByTitle(PINNED_MODEL)).slice(-1)[0]);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue