Skip to content

feat(skills): add component-testing agent skill#41738

Open
pavelfeldman wants to merge 1 commit into
microsoft:mainfrom
pavelfeldman:component-testing-skill
Open

feat(skills): add component-testing agent skill#41738
pavelfeldman wants to merge 1 commit into
microsoft:mainfrom
pavelfeldman:component-testing-skill

Conversation

@pavelfeldman

Copy link
Copy Markdown
Member

Summary

  • Adds a playwright-component-testing skill shipped in the playwright package, replacing @playwright/experimental-ct-* with plain e2e tests against a story gallery: stories colocated with components, a gallery page served by the app's dev server, and a mount(storyId) fixture returning a locator. Installed via npx playwright init-skills.
  • Skill templates live in top-level packages/skills, copied into playwright/lib/skills at build time.
  • Includes React and Vue templates, a migration guide, and two example projects under tests/components that instantiate the templates byte-for-byte (enforced by a sync test).

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Comment thread packages/playwright/src/program.ts Outdated
Comment thread packages/playwright/src/program.ts Outdated
Replaces @playwright/experimental-ct-* with story-gallery component testing
that needs no dedicated runtime or bundler integration.

- The gallery is a small user-implemented page (per references/gallery-spec.md)
  that exposes window.mount({ story, props }) / window.unmount() and renders
  into #root. No framework-specific gallery template to copy.
- A built-in mount(storyId, props?) fixture in @playwright/test navigates to
  baseURL and drives window.mount via page.evaluate(..., { exposeFunctions:
  true }), so props may carry real callbacks. component.update(props) re-renders
  in place and component.unmount() tears down.
- Ships React/Vue references, example stories/specs.

Also removes the standalone init-skills CLI command.
@pavelfeldman
pavelfeldman force-pushed the component-testing-skill branch from dcd53c7 to fe188b0 Compare July 16, 2026 23:13
@github-actions

Copy link
Copy Markdown
Contributor

Test results for "MCP"

1 failed
❌ [webkit] › mcp/dashboard.spec.ts:125 › daemon show: closing page exits the process @mcp-macos-latest-webkit

7759 passed, 1249 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

5 flaky ⚠️ [chromium-library] › library/video.spec.ts:736 › screencast › should work with video+trace `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-library] › library/video.spec.ts:664 › screencast › should capture full viewport `@realtime-time-library-chromium-linux`
⚠️ [chromium-library] › library/beforeunload.spec.ts:130 › should support dismissing the dialog multiple times `@chromium-ubuntu-22.04-node20`
⚠️ [chromium-library] › library/video.spec.ts:699 › screencast › should capture full viewport on hidpi `@chromium-ubuntu-22.04-node22`
⚠️ [firefox-page] › page/page-emulate-media.spec.ts:144 › should keep reduced motion and color emulation after reload `@firefox-ubuntu-22.04-node20`

50370 passed, 1158 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Hi, I'm the Playwright bot and I took a first look at the CI failures here.

🟢 The one failure is a pre-existing flake — this PR looks clear

The latest report (MCP, run 29543025346) has a single red test, mcp/dashboard.spec.ts:125, on macOS/WebKit. It's a known flake unrelated to this PR's changes.

Details

This PR swaps @playwright/experimental-ct-* for a story-gallery skill — it touches the component-testing skill templates, the mount() fixture in packages/playwright/src/index.ts, program.ts, and the build scripts. None of that goes near the MCP daemon/dashboard code path.

Pre-existing flake / infra

I'm a first pass, so treat this as a strong hint rather than the last word — but the evidence points squarely at a flake, and a rerun should go green.

Triaged by the Playwright bot - agent run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants