mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-09 22:31:41 +00:00
test(ui/team): fix guardrails overview test for new component
Updates the expected header text to "Guardrails Settings" to match GuardrailSettingsView's rendering, and moves the mock guardrails from team_info.guardrails (legacy top-level path that nothing reads) to team_info.metadata.guardrails where the component actually looks. Also tightens the assertion to verify the individual guardrail names appear, not just the section header.
This commit is contained in:
parent
842523a918
commit
2d14e4a4ed
1 changed files with 4 additions and 2 deletions
|
|
@ -276,15 +276,17 @@ describe("TeamInfoView", () => {
|
|||
it("should display guardrails in overview when present", async () => {
|
||||
vi.mocked(networking.teamInfoCall).mockResolvedValue(
|
||||
createMockTeamData({
|
||||
guardrails: ["guardrail1", "guardrail2"],
|
||||
metadata: { guardrails: ["guardrail1", "guardrail2"] },
|
||||
})
|
||||
);
|
||||
|
||||
renderWithProviders(<TeamInfoView {...defaultProps} />);
|
||||
|
||||
await waitFor(() => {
|
||||
expect(screen.getByText("Guardrails")).toBeInTheDocument();
|
||||
expect(screen.getByText("Guardrails Settings")).toBeInTheDocument();
|
||||
});
|
||||
expect(screen.getByText("guardrail1")).toBeInTheDocument();
|
||||
expect(screen.getByText("guardrail2")).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("should display policies in overview when present", async () => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue