diff --git a/webview-ui/playwright/vite.config.ts b/webview-ui/playwright/vite.config.ts index 0678eb76c4..f3649be72d 100644 --- a/webview-ui/playwright/vite.config.ts +++ b/webview-ui/playwright/vite.config.ts @@ -15,12 +15,6 @@ const rooCodeTypesShimImporters = [ "/webview-ui/src/components/settings/UISettings.tsx", ] -// Every story gets the Vitest toolkit mock, which draws a text field's label -// below its input. These importers get the real toolkit so the story looks -// like the extension. Add an importer here only with its own baseline. -const realToolkitImporters = ["/settings/providers/Ollama.tsx"] -const toolkitMock = path.resolve(webviewRoot, "src/__mocks__/@vscode/webview-ui-toolkit/react.tsx") - export default defineConfig({ root: path.resolve(dirname, "gallery"), plugins: [ @@ -37,15 +31,6 @@ export default defineConfig({ } }, }, - { - name: "playwright-gallery-toolkit-mock", - enforce: "pre", - resolveId(source, importer) { - if (source !== "@vscode/webview-ui-toolkit/react") return - if (importer && realToolkitImporters.some((suffix) => importer.endsWith(suffix))) return - return toolkitMock - }, - }, react({ babel: { plugins: [["babel-plugin-react-compiler", { target: "18" }]], @@ -82,8 +67,9 @@ export default defineConfig({ "process.env.PKG_RELEASE_CHANNEL": JSON.stringify("stable"), }, optimizeDeps: { - // Pre-bundle the real toolkit (see realToolkitImporters). If Vite finds it - // during the first page load, it re-optimizes and reloads mid-test. + // Pre-bundle the real toolkit: every story now renders the same toolkit + // custom elements the extension uses. If Vite finds it during the first + // page load, it re-optimizes and reloads mid-test. include: ["@vscode/webview-ui-toolkit/react"], exclude: ["@vscode/codicons"], }, diff --git a/webview-ui/src/components/common/__tests__/__screenshots__/telemetry-banner-dark.png b/webview-ui/src/components/common/__tests__/__screenshots__/telemetry-banner-dark.png index b96da57da0..c30211333c 100644 Binary files a/webview-ui/src/components/common/__tests__/__screenshots__/telemetry-banner-dark.png and b/webview-ui/src/components/common/__tests__/__screenshots__/telemetry-banner-dark.png differ diff --git a/webview-ui/src/components/history/__tests__/__screenshots__/history-empty-dark.png b/webview-ui/src/components/history/__tests__/__screenshots__/history-empty-dark.png index 6ba8885ca7..dca90145df 100644 Binary files a/webview-ui/src/components/history/__tests__/__screenshots__/history-empty-dark.png and b/webview-ui/src/components/history/__tests__/__screenshots__/history-empty-dark.png differ diff --git a/webview-ui/src/components/history/__tests__/__screenshots__/history-empty-high-contrast-light.png b/webview-ui/src/components/history/__tests__/__screenshots__/history-empty-high-contrast-light.png index fbc57e12ca..6c2488c71b 100644 Binary files a/webview-ui/src/components/history/__tests__/__screenshots__/history-empty-high-contrast-light.png and b/webview-ui/src/components/history/__tests__/__screenshots__/history-empty-high-contrast-light.png differ diff --git a/webview-ui/src/components/history/__tests__/__screenshots__/history-empty-high-contrast.png b/webview-ui/src/components/history/__tests__/__screenshots__/history-empty-high-contrast.png index 1d164a4d60..a4ca6ce53e 100644 Binary files a/webview-ui/src/components/history/__tests__/__screenshots__/history-empty-high-contrast.png and b/webview-ui/src/components/history/__tests__/__screenshots__/history-empty-high-contrast.png differ diff --git a/webview-ui/src/components/history/__tests__/__screenshots__/history-empty-light.png b/webview-ui/src/components/history/__tests__/__screenshots__/history-empty-light.png index 291191fd97..cff4990f62 100644 Binary files a/webview-ui/src/components/history/__tests__/__screenshots__/history-empty-light.png and b/webview-ui/src/components/history/__tests__/__screenshots__/history-empty-light.png differ diff --git a/webview-ui/src/components/settings/__tests__/__screenshots__/auto-approve-settings-dark.png b/webview-ui/src/components/settings/__tests__/__screenshots__/auto-approve-settings-dark.png index d2c31eaa59..b28c9a771a 100644 Binary files a/webview-ui/src/components/settings/__tests__/__screenshots__/auto-approve-settings-dark.png and b/webview-ui/src/components/settings/__tests__/__screenshots__/auto-approve-settings-dark.png differ diff --git a/webview-ui/src/components/settings/__tests__/__screenshots__/auto-approve-settings-high-contrast-light.png b/webview-ui/src/components/settings/__tests__/__screenshots__/auto-approve-settings-high-contrast-light.png index 7516643165..1d2cee5be6 100644 Binary files a/webview-ui/src/components/settings/__tests__/__screenshots__/auto-approve-settings-high-contrast-light.png and b/webview-ui/src/components/settings/__tests__/__screenshots__/auto-approve-settings-high-contrast-light.png differ diff --git a/webview-ui/src/components/settings/__tests__/__screenshots__/auto-approve-settings-high-contrast.png b/webview-ui/src/components/settings/__tests__/__screenshots__/auto-approve-settings-high-contrast.png index 077f4efbca..56ad9262e6 100644 Binary files a/webview-ui/src/components/settings/__tests__/__screenshots__/auto-approve-settings-high-contrast.png and b/webview-ui/src/components/settings/__tests__/__screenshots__/auto-approve-settings-high-contrast.png differ diff --git a/webview-ui/src/components/settings/__tests__/__screenshots__/auto-approve-settings-light.png b/webview-ui/src/components/settings/__tests__/__screenshots__/auto-approve-settings-light.png index 7b70bae540..cb69d9b77a 100644 Binary files a/webview-ui/src/components/settings/__tests__/__screenshots__/auto-approve-settings-light.png and b/webview-ui/src/components/settings/__tests__/__screenshots__/auto-approve-settings-light.png differ diff --git a/webview-ui/src/components/settings/__tests__/__screenshots__/terminal-settings-dark.png b/webview-ui/src/components/settings/__tests__/__screenshots__/terminal-settings-dark.png index 986777086d..f754b8e292 100644 Binary files a/webview-ui/src/components/settings/__tests__/__screenshots__/terminal-settings-dark.png and b/webview-ui/src/components/settings/__tests__/__screenshots__/terminal-settings-dark.png differ diff --git a/webview-ui/src/components/settings/__tests__/__screenshots__/terminal-settings-high-contrast-light.png b/webview-ui/src/components/settings/__tests__/__screenshots__/terminal-settings-high-contrast-light.png index 209b7b5347..147fec8d40 100644 Binary files a/webview-ui/src/components/settings/__tests__/__screenshots__/terminal-settings-high-contrast-light.png and b/webview-ui/src/components/settings/__tests__/__screenshots__/terminal-settings-high-contrast-light.png differ diff --git a/webview-ui/src/components/settings/__tests__/__screenshots__/terminal-settings-high-contrast.png b/webview-ui/src/components/settings/__tests__/__screenshots__/terminal-settings-high-contrast.png index a5f7237253..e4a8cb5f9e 100644 Binary files a/webview-ui/src/components/settings/__tests__/__screenshots__/terminal-settings-high-contrast.png and b/webview-ui/src/components/settings/__tests__/__screenshots__/terminal-settings-high-contrast.png differ diff --git a/webview-ui/src/components/settings/__tests__/__screenshots__/terminal-settings-light.png b/webview-ui/src/components/settings/__tests__/__screenshots__/terminal-settings-light.png index 0572a168b0..5ed1e1046a 100644 Binary files a/webview-ui/src/components/settings/__tests__/__screenshots__/terminal-settings-light.png and b/webview-ui/src/components/settings/__tests__/__screenshots__/terminal-settings-light.png differ diff --git a/webview-ui/src/components/settings/__tests__/__screenshots__/ui-settings-dark.png b/webview-ui/src/components/settings/__tests__/__screenshots__/ui-settings-dark.png index 2773ec6614..b2f92d7b04 100644 Binary files a/webview-ui/src/components/settings/__tests__/__screenshots__/ui-settings-dark.png and b/webview-ui/src/components/settings/__tests__/__screenshots__/ui-settings-dark.png differ diff --git a/webview-ui/src/components/settings/__tests__/__screenshots__/ui-settings-high-contrast-light.png b/webview-ui/src/components/settings/__tests__/__screenshots__/ui-settings-high-contrast-light.png index ba27c7b912..3aa9092f5d 100644 Binary files a/webview-ui/src/components/settings/__tests__/__screenshots__/ui-settings-high-contrast-light.png and b/webview-ui/src/components/settings/__tests__/__screenshots__/ui-settings-high-contrast-light.png differ diff --git a/webview-ui/src/components/settings/__tests__/__screenshots__/ui-settings-high-contrast.png b/webview-ui/src/components/settings/__tests__/__screenshots__/ui-settings-high-contrast.png index 2eb48a95dc..f9c3e057ba 100644 Binary files a/webview-ui/src/components/settings/__tests__/__screenshots__/ui-settings-high-contrast.png and b/webview-ui/src/components/settings/__tests__/__screenshots__/ui-settings-high-contrast.png differ diff --git a/webview-ui/src/components/settings/__tests__/__screenshots__/ui-settings-light.png b/webview-ui/src/components/settings/__tests__/__screenshots__/ui-settings-light.png index f454bb2d51..ca6aab1ec3 100644 Binary files a/webview-ui/src/components/settings/__tests__/__screenshots__/ui-settings-light.png and b/webview-ui/src/components/settings/__tests__/__screenshots__/ui-settings-light.png differ diff --git a/webview-ui/src/components/settings/providers/__tests__/__screenshots__/bedrock-custom-arn-opus-5-5-dark.png b/webview-ui/src/components/settings/providers/__tests__/__screenshots__/bedrock-custom-arn-opus-5-5-dark.png index 9445a6125d..d4505c86fa 100644 Binary files a/webview-ui/src/components/settings/providers/__tests__/__screenshots__/bedrock-custom-arn-opus-5-5-dark.png and b/webview-ui/src/components/settings/providers/__tests__/__screenshots__/bedrock-custom-arn-opus-5-5-dark.png differ diff --git a/webview-ui/src/components/settings/providers/__tests__/__screenshots__/bedrock-custom-arn-other-dark.png b/webview-ui/src/components/settings/providers/__tests__/__screenshots__/bedrock-custom-arn-other-dark.png index 4d9b3bda68..7d3b06bf0b 100644 Binary files a/webview-ui/src/components/settings/providers/__tests__/__screenshots__/bedrock-custom-arn-other-dark.png and b/webview-ui/src/components/settings/providers/__tests__/__screenshots__/bedrock-custom-arn-other-dark.png differ diff --git a/webview-ui/src/components/settings/providers/__tests__/__screenshots__/bedrock-custom-arn-other-light.png b/webview-ui/src/components/settings/providers/__tests__/__screenshots__/bedrock-custom-arn-other-light.png index cc9eebd077..e8a6f86658 100644 Binary files a/webview-ui/src/components/settings/providers/__tests__/__screenshots__/bedrock-custom-arn-other-light.png and b/webview-ui/src/components/settings/providers/__tests__/__screenshots__/bedrock-custom-arn-other-light.png differ diff --git a/webview-ui/src/components/settings/providers/__tests__/__screenshots__/io-intelligence-settings.png b/webview-ui/src/components/settings/providers/__tests__/__screenshots__/io-intelligence-settings.png index b5ad92f3ef..af3b207382 100644 Binary files a/webview-ui/src/components/settings/providers/__tests__/__screenshots__/io-intelligence-settings.png and b/webview-ui/src/components/settings/providers/__tests__/__screenshots__/io-intelligence-settings.png differ diff --git a/webview-ui/src/components/settings/providers/__tests__/__screenshots__/openai-compatible-azure-guidance-dark.png b/webview-ui/src/components/settings/providers/__tests__/__screenshots__/openai-compatible-azure-guidance-dark.png index e8d6bb3b4b..8674321a98 100644 Binary files a/webview-ui/src/components/settings/providers/__tests__/__screenshots__/openai-compatible-azure-guidance-dark.png and b/webview-ui/src/components/settings/providers/__tests__/__screenshots__/openai-compatible-azure-guidance-dark.png differ diff --git a/webview-ui/src/components/settings/providers/__tests__/__screenshots__/openai-compatible-extra-body-dark.png b/webview-ui/src/components/settings/providers/__tests__/__screenshots__/openai-compatible-extra-body-dark.png index 92ac6867b5..26663c1d11 100644 Binary files a/webview-ui/src/components/settings/providers/__tests__/__screenshots__/openai-compatible-extra-body-dark.png and b/webview-ui/src/components/settings/providers/__tests__/__screenshots__/openai-compatible-extra-body-dark.png differ diff --git a/webview-ui/src/components/settings/providers/__tests__/__screenshots__/openai-compatible-extra-body-high-contrast-light.png b/webview-ui/src/components/settings/providers/__tests__/__screenshots__/openai-compatible-extra-body-high-contrast-light.png index 93c080dd07..8d14b0b0a9 100644 Binary files a/webview-ui/src/components/settings/providers/__tests__/__screenshots__/openai-compatible-extra-body-high-contrast-light.png and b/webview-ui/src/components/settings/providers/__tests__/__screenshots__/openai-compatible-extra-body-high-contrast-light.png differ diff --git a/webview-ui/src/components/settings/providers/__tests__/__screenshots__/openai-compatible-extra-body-high-contrast.png b/webview-ui/src/components/settings/providers/__tests__/__screenshots__/openai-compatible-extra-body-high-contrast.png index 171f554dd1..1dab5b66cf 100644 Binary files a/webview-ui/src/components/settings/providers/__tests__/__screenshots__/openai-compatible-extra-body-high-contrast.png and b/webview-ui/src/components/settings/providers/__tests__/__screenshots__/openai-compatible-extra-body-high-contrast.png differ diff --git a/webview-ui/src/components/settings/providers/__tests__/__screenshots__/openai-compatible-extra-body-light.png b/webview-ui/src/components/settings/providers/__tests__/__screenshots__/openai-compatible-extra-body-light.png index 0493d1fcd6..2bb6c7d0b4 100644 Binary files a/webview-ui/src/components/settings/providers/__tests__/__screenshots__/openai-compatible-extra-body-light.png and b/webview-ui/src/components/settings/providers/__tests__/__screenshots__/openai-compatible-extra-body-light.png differ