mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
test(ui): wait for step search value to settle in TraceDrawer test (#44470)
* test(ui): wait for step search value to settle in TraceDrawer test Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * test(ui): dispatch search typing and nav keys deterministically in TraceDrawer test Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --------- Co-authored-by: Yujong Lee <yujong@berri.ai> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
62fb808d4b
commit
c80e6e2474
1 changed files with 4 additions and 2 deletions
|
|
@ -316,12 +316,14 @@ describe("RunView", () => {
|
|||
});
|
||||
|
||||
it("does not navigate steps while typing or moving the search cursor", async () => {
|
||||
const user = userEvent.setup();
|
||||
renderRun(research);
|
||||
const search = await screen.findByRole("textbox", { name: "Search steps" });
|
||||
const selected = screen.getByTestId("detail-pane").getAttribute("data-row-id");
|
||||
await user.type(search, "jk{ArrowDown}{ArrowUp}");
|
||||
fireEvent.change(search, { target: { value: "jk" } });
|
||||
expect(search).toHaveValue("jk");
|
||||
for (const key of ["j", "k", "ArrowDown", "ArrowUp"]) {
|
||||
fireEvent.keyDown(search, { key });
|
||||
}
|
||||
expect(screen.getByTestId("detail-pane")).toHaveAttribute("data-row-id", selected);
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue