diff --git a/ui/litellm-dashboard/src/components/EntityUsageExport/ExportSummary.test.tsx b/ui/litellm-dashboard/src/components/EntityUsageExport/ExportSummary.test.tsx
index ab426e291b..1aeee42f74 100644
--- a/ui/litellm-dashboard/src/components/EntityUsageExport/ExportSummary.test.tsx
+++ b/ui/litellm-dashboard/src/components/EntityUsageExport/ExportSummary.test.tsx
@@ -14,8 +14,10 @@ describe("ExportSummary", () => {
it("should display formatted date range", () => {
render();
- const text = screen.getByText(/\d+.*-.*\d+/);
- expect(text).toBeInTheDocument();
+ // Pin locale to en-US so test is deterministic regardless of CI runner locale
+ const expectedFrom = dateRange.from!.toLocaleDateString("en-US");
+ const expectedTo = dateRange.to!.toLocaleDateString("en-US");
+ expect(screen.getByText(`${expectedFrom} - ${expectedTo}`)).toBeInTheDocument();
});
it("should show singular 'filter' for one filter", () => {
diff --git a/ui/litellm-dashboard/src/components/GuardrailsMonitor/GuardrailConfig.test.tsx b/ui/litellm-dashboard/src/components/GuardrailsMonitor/GuardrailConfig.test.tsx
index ac84c270d8..54c7ebabe7 100644
--- a/ui/litellm-dashboard/src/components/GuardrailsMonitor/GuardrailConfig.test.tsx
+++ b/ui/litellm-dashboard/src/components/GuardrailsMonitor/GuardrailConfig.test.tsx
@@ -54,7 +54,10 @@ describe("GuardrailConfig", () => {
customCodeSwitch = container.querySelector('[role="switch"]');
container = container.parentElement;
}
- await user.click(customCodeSwitch!);
+ if (!customCodeSwitch) {
+ throw new Error("Could not find the Custom Code Override switch via DOM traversal");
+ }
+ await user.click(customCodeSwitch);
expect(screen.getByPlaceholderText(/async def evaluate/)).toBeInTheDocument();
});
@@ -82,7 +85,7 @@ describe("GuardrailConfig", () => {
const user = userEvent.setup({ advanceTimers: vi.advanceTimersByTime });
render();
await user.click(screen.getByRole("button", { name: /re-run on failing logs/i }));
- act(() => { vi.advanceTimersByTime(2500); });
+ await act(async () => { vi.advanceTimersByTime(2500); });
expect(screen.getByText(/7\/10 would now pass/)).toBeInTheDocument();
});