From fbf0efa3ca0c2beab6e8eb9d1efecac61f0cbb09 Mon Sep 17 00:00:00 2001 From: yuneng Date: Tue, 22 Sep 2026 00:30:44 +0000 Subject: [PATCH] test(ui): use fireEvent.change in config owned alerting tests Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../components/alerting/dynamic_form.integration.test.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/litellm-dashboard/src/components/alerting/dynamic_form.integration.test.tsx b/ui/litellm-dashboard/src/components/alerting/dynamic_form.integration.test.tsx index 59f8e58e598..9dbb7f00872 100644 --- a/ui/litellm-dashboard/src/components/alerting/dynamic_form.integration.test.tsx +++ b/ui/litellm-dashboard/src/components/alerting/dynamic_form.integration.test.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { render, screen } from "@testing-library/react"; +import { fireEvent, render, screen } from "@testing-library/react"; import userEvent from "@testing-library/user-event"; import { describe, it, expect, vi } from "vitest"; import DynamicForm from "./dynamic_form"; @@ -274,7 +274,7 @@ describe("DynamicForm config.yaml owned fields", () => { const toggle = screen.getByRole("switch"); expect(toggle).not.toHaveAttribute("data-disabled"); - await user.type(screen.getByDisplayValue("us-east"), "Z"); + fireEvent.change(screen.getByDisplayValue("us-east"), { target: { value: "us-eastZ" } }); await user.click(toggle); await submit(user); @@ -293,7 +293,7 @@ describe("DynamicForm config.yaml owned fields", () => { expect(screen.getByDisplayValue("us-east")).toBeDisabled(); expect(screen.getByDisplayValue("12")).toBeEnabled(); - await user.type(screen.getByDisplayValue("12"), "7"); + fireEvent.change(screen.getByDisplayValue("12"), { target: { value: "127" } }); await submit(user); expect(handleSubmit).toHaveBeenCalledWith({ daily_report_frequency: "127" });