component-fixtures
SolidUse when creating or updating component fixtures for screenshot testing, or when designing UI components to be fixture-friendly. Covers fixture file structure, theming, service setup, CSS scoping, async rendering, and common pitfalls.
Web & Frontend 8 stars
0 forks Updated today MIT
Install
Quality Score: 78/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# Component Fixtures
Component fixtures render isolated UI components for visual screenshot testing via the component explorer. Fixtures live in `src/vs/workbench/test/browser/componentFixtures/` and are auto-discovered by the Vite dev server using the glob `src/**/*.fixture.ts`.
Use tools `mcp_component-exp_`* to list and screenshot fixtures. If you cannot see these tools, inform the user to them on.
## Running Fixtures Locally
1. Start the component explorer server: run the **Component Explorer Server** task
2. Use the `mcp_component-exp_list_fixtures` tool to see all available fixtures and their URLs
3. Use the `mcp_component-exp_screenshot` tool to capture screenshots programmatically
## File Structure
Each fixture file exports a default `defineThemedFixtureGroup(...)`. The file must end with `.fixture.ts`.
```
src/vs/workbench/test/browser/componentFixtures/
fixtureUtils.ts # Shared helpers (DO NOT import @vscode/component-explorer elsewhere)
myComponent.fixture.ts # Your fixture file
```
## Basic Pattern
```typescript
import { ComponentFixtureContext, createEditorServices, defineComponentFixture, defineThemedFixtureGroup } from './fixtureUtils.js';
export default defineThemedFixtureGroup({ path: 'myFeature/' }, {
Default: defineComponentFixture({ render: renderMyComponent }),
AnotherVariant: defineComponentFixture({ render: renderMyComponent }),
});
function renderMyComponent({ container, disposableStore, theme }: ComponentFixtu...
Details
- Author
- chapmanjw
- Repository
- chapmanjw/clawdius
- Created
- 1 months ago
- Last Updated
- today
- Language
- TypeScript
- License
- MIT
Similar Skills
Semantically similar based on skill content — not just same category
Testing & QA Listed
tests-vitest
Vitest component/unit test conventions — test authoring with React Testing Library, mocking patterns, and running. Load when the resolved frontend unit test tool is vitest.
1 Updated 6 days ago
johantor Web & Frontend Listed
ui-component
Instructions for creating UI components following the design system, accessibility standards, and file structure conventions.
0 Updated 6 days ago
syniol Web & Frontend Listed
frontend-component-style
Frontend component file structure, naming, and layer separation for new or refactored components.
0 Updated 2 days ago
arndvs