From acd60a487ada6153fd3d813a5191597e47e980ad Mon Sep 17 00:00:00 2001 From: shivam Date: Fri, 10 Apr 2026 18:10:59 -0700 Subject: [PATCH] test(dashboard): PoliciesPanel attachment delete confirm flow Add integration test: Attachments tab, delete button opens modal, confirm calls deletePolicyAttachmentCall. Made-with: Cursor --- .../src/components/policies/index.test.tsx | 155 ++++++++++++++++++ 1 file changed, 155 insertions(+) create mode 100644 ui/litellm-dashboard/src/components/policies/index.test.tsx diff --git a/ui/litellm-dashboard/src/components/policies/index.test.tsx b/ui/litellm-dashboard/src/components/policies/index.test.tsx new file mode 100644 index 00000000000..1c393276a53 --- /dev/null +++ b/ui/litellm-dashboard/src/components/policies/index.test.tsx @@ -0,0 +1,155 @@ +import React from "react"; +import { screen, waitFor, within } from "@testing-library/react"; +import userEvent from "@testing-library/user-event"; +import { renderWithProviders } from "../../../tests/test-utils"; +import { beforeEach, describe, expect, it, vi } from "vitest"; +import * as networking from "../networking"; +import PoliciesPanel from "./index"; +import type { PolicyAttachment } from "./types"; + +vi.mock("./impact_popover", () => ({ + default: () =>