mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-12 08:42:18 +00:00
test(ui): await the playground model combobox before clicking it
The ChatUI playground test helper looked up the model combobox with a synchronous getByPlaceholderText. That control renders its placeholder from the model-loading flag, so the text is "Loading models..." until the mocked fetch resolves, and the element the helper wants does not exist yet. Under a loaded full-suite run the query could land inside that window and fail with "Unable to find an element with the placeholder text of: Select a Model", while the same test passed in isolation every time. Switch the helper to findByPlaceholderText so it waits for the control to come back after loading.
This commit is contained in:
parent
e0f388cb5c
commit
f861af42c0
1 changed files with 1 additions and 1 deletions
|
|
@ -35,7 +35,7 @@ const STREAMING_ENABLED_ARG_INDEX = 25;
|
|||
|
||||
async function openComboboxByPlaceholder(placeholder: string) {
|
||||
const user = userEvent.setup();
|
||||
const combobox = screen.getByPlaceholderText(placeholder);
|
||||
const combobox = await screen.findByPlaceholderText(placeholder);
|
||||
await user.click(combobox);
|
||||
return combobox;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue