feat: add Playwright test harness with SSR and CSR support#7428
Open
feat: add Playwright test harness with SSR and CSR support#7428
Conversation
janechu
reviewed
Apr 11, 2026
| test.describe("Button", () => { | ||
| test.use({ tagName: "my-button", innerHTML: "Click me" }); | ||
|
|
||
| test("should render", async ({ fastPage }) => { |
Collaborator
There was a problem hiding this comment.
Since this is specifically from the @microsoft/fast-test-harness package, could this just be page instead of fastPage?
Collaborator
Author
There was a problem hiding this comment.
page is already the name of the built-in Playwright page fixture: https://playwright.dev/docs/test-fixtures#built-in-fixtures
janechu
reviewed
Apr 11, 2026
71e6073 to
c552d2d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
📖 Description
Adds
@microsoft/fast-test-harness, a new Playwright testing harness package for FAST web components. The harness provides shared fixtures for both client-side rendering (CSR) and server-side rendering (SSR) test workflows, a custom Express + Vite dev server, SSR rendering utilities, and support for custom assertions.This package is intended to be consumed by component packages in the monorepo (and downstream projects like MAI) to standardize how Playwright tests are authored and run against FAST-based web components.
👩💻 Reviewer Notes
privateand is not published to npm.@microsoft/fast-htmland@microsoft/fast-build.server.mjsentrypoint uses Express 5 and Vite'screateServerAPI to handle both CSR page serving and SSR fixture generation in a single process.📑 Test Plan
This package provides test infrastructure rather than component behavior. Validation will come from downstream adoption in component packages that use the harness fixtures. No Playwright tests are included in this package itself.
✅ Checklist
General
$ npm run change⏭ Next Steps
wasm-renderer.tsmodule wraps the Rust-basedfast-buildWASM renderer for SSR template compilation. This may be extracted or refined asfast-buildstabilizes.