Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

injecting localstorage values to hide usageIndicator, prompts, and new badges

yuneng-jiang0d6fcee23ed8
diff --git a/ui/litellm-dashboard/e2e_tests/tests/navigation/sidebar.spec.ts b/ui/litellm-dashboard/e2e_tests/tests/navigation/sidebar.spec.ts
index ce07cc2b83d..1fc982a7411 100644
--- a/ui/litellm-dashboard/e2e_tests/tests/navigation/sidebar.spec.ts
+++ b/ui/litellm-dashboard/e2e_tests/tests/navigation/sidebar.spec.ts
@@ -26,6 +26,11 @@ for (const { role, storage } of roles) {
test("should navigate to correct URL when clicking sidebar menu items from homepage", async ({ page }) => {
await page.goto("/ui");
+ await page.evaluate(() => {
+ window.localStorage.setItem("disableUsageIndicator", "true");
+ window.localStorage.setItem("disableShowPrompts", "true");
+ window.localStorage.setItem("disableShowNewBadge", "true");
+ });
for (const buttonLabel of sidebarButtons[role as keyof typeof sidebarButtons]) {
const expectedPage = menuLabelToPage[buttonLabel];
@@ -45,6 +50,13 @@ for (const { role, storage } of roles) {
});
test("should navigate directly to page using navigation helper", async ({ page }) => {
+ await page.goto("/ui");
+ await page.evaluate(() => {
+ window.localStorage.setItem("disableUsageIndicator", "true");
+ window.localStorage.setItem("disableShowPrompts", "true");
+ window.localStorage.setItem("disableShowNewBadge", "true");
+ });
+
// Test direct navigation to verify the helper function works
await navigateToPage(page, Page.ApiKeys);
await expect(page).toHaveURL(new RegExp(`[?&]page=${Page.ApiKeys}(&|$)`));