mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
test(ui): open the member role select by keyboard so the payload test stops flaking
The base-ui select defers its mousedown open into a requestAnimationFrame, so under CI load the popup can miss findByRole's 1s budget and the role option is never found. Opening with Enter runs the open synchronously, and the option is still picked by mouse, so the payload assertion covers the same contract.
This commit is contained in:
parent
da7a10ebbd
commit
8e60091017
1 changed files with 2 additions and 1 deletions
|
|
@ -130,7 +130,8 @@ describe("UserSearchModal submit payload", () => {
|
|||
const { onSubmit } = setup();
|
||||
const user = userEvent.setup({ pointerEventsCheck: PointerEventsCheckLevel.Never });
|
||||
|
||||
await user.click(screen.getByLabelText("Member Role"));
|
||||
act(() => screen.getByLabelText("Member Role").focus());
|
||||
await user.keyboard("{Enter}");
|
||||
await user.click(await screen.findByRole("option", { name: /^admin/ }));
|
||||
await user.click(save());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue