Repository navigation
Commit 5cc5a37
test(webview): use the real VS Code toolkit in Playwright visual baselines (#2163)
* test(webview): render the real VS Code toolkit in every gallery story
The gallery vite config resolved @vscode/webview-ui-toolkit/react to the
Vitest mock for every story except realToolkitImporters (only the Ollama
story). The mock draws a plain input with the label after the field, so
baselines showing toolkit components did not look like the extension,
which renders the real custom elements with the label above the field,
padding, and borders.
Drop the playwright-gallery-toolkit-mock plugin so every story imports
the real toolkit, and keep pre-bundling it via optimizeDeps.include so a
cold Vite cache does not re-optimize and reload mid-test. The Vitest mock
stays in place for unit tests.
* test(webview): regenerate toolkit baselines from the pinned container
Baselines for the nine stories that render toolkit components, captured
by the pinned mcr.microsoft.com/playwright:v1.62.1-noble container via
the Visual Regression workflow: auto-approve settings, Bedrock custom
ARN, empty history, IO Intelligence, OpenAI-compatible Azure guidance
and extra body, telemetry banner, terminal settings, and UI settings.
The real toolkit draws text-field labels above their inputs and gives
checkboxes, textareas, links, and buttons the extension's borders and
padding, so these baselines now match what users see.
---------
Co-authored-by: Roomote <[email protected]>1 parent 64908ab commit 5cc5a37
27 files changed
Lines changed: 3 additions & 17 deletions
File tree
- webview-ui
- playwright
- src/components
- common/__tests__/__screenshots__
- history/__tests__/__screenshots__
- settings
- __tests__/__screenshots__
- providers/__tests__/__screenshots__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | 18 | | |
25 | 19 | | |
26 | 20 | | |
| |||
37 | 31 | | |
38 | 32 | | |
39 | 33 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | 34 | | |
50 | 35 | | |
51 | 36 | | |
| |||
82 | 67 | | |
83 | 68 | | |
84 | 69 | | |
85 | | - | |
86 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
87 | 73 | | |
88 | 74 | | |
89 | 75 | | |
| |||
0 commit comments