+
{/* Current tokens container */}
{/* Invisible overlay for current tokens section */}
@@ -291,7 +292,7 @@ const ContextWindowProgress = ({ contextWindow, contextTokens, maxTokens }: Cont
data-testid="context-tokens-used"
/>
{/* Current tokens used - darkest */}
-
+
{/* Container for reserved tokens */}
@@ -305,7 +306,7 @@ const ContextWindowProgress = ({ contextWindow, contextTokens, maxTokens }: Cont
data-testid="context-reserved-tokens"
/>
{/* Reserved for output section - medium gray */}
-
+
{/* Empty section (if any) */}
diff --git a/webview-ui/src/components/chat/__tests__/TaskHeader.test.tsx b/webview-ui/src/components/chat/__tests__/TaskHeader.test.tsx
index 6a81a9b540..6880de29d7 100644
--- a/webview-ui/src/components/chat/__tests__/TaskHeader.test.tsx
+++ b/webview-ui/src/components/chat/__tests__/TaskHeader.test.tsx
@@ -12,6 +12,11 @@ jest.mock("@/utils/vscode", () => ({
},
}))
+// Mock the VSCodeBadge component
+jest.mock("@vscode/webview-ui-toolkit/react", () => ({
+ VSCodeBadge: ({ children }: { children: React.ReactNode }) =>
{children}
,
+}))
+
// Mock the ExtensionStateContext
jest.mock("../../../context/ExtensionStateContext", () => ({
useExtensionState: () => ({
diff --git a/webview-ui/src/i18n/__tests__/TranslationContext.test.tsx b/webview-ui/src/i18n/__tests__/TranslationContext.test.tsx
index 0b4dbf8238..78fbfc23d4 100644
--- a/webview-ui/src/i18n/__tests__/TranslationContext.test.tsx
+++ b/webview-ui/src/i18n/__tests__/TranslationContext.test.tsx
@@ -2,7 +2,6 @@ import React from "react"
import { render } from "@testing-library/react"
import "@testing-library/jest-dom"
import TranslationProvider, { useAppTranslation } from "../TranslationContext"
-import { setupI18nForTests } from "../test-utils"
// Mock the useExtensionState hook
jest.mock("@/context/ExtensionStateContext", () => ({
@@ -23,11 +22,6 @@ const TestComponent = () => {
}
describe("TranslationContext", () => {
- beforeAll(() => {
- // Initialize i18next with test translations
- setupI18nForTests()
- })
-
it("should provide translations via context", () => {
const { getByTestId } = render(
diff --git a/webview-ui/src/setupTests.ts b/webview-ui/src/setupTests.ts
index 298fa25f8f..01034af37f 100644
--- a/webview-ui/src/setupTests.ts
+++ b/webview-ui/src/setupTests.ts
@@ -1,4 +1,8 @@
import "@testing-library/jest-dom"
+import { setupI18nForTests } from "./i18n/test-utils"
+
+// Set up i18n for all tests
+setupI18nForTests()
// Mock crypto.getRandomValues
Object.defineProperty(window, "crypto", {