mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-28 01:32:17 +00:00
test(ui): use fireEvent.change in config owned alerting tests
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
8d6c6867e6
commit
fbf0efa3ca
1 changed files with 3 additions and 3 deletions
|
|
@ -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" });
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue