Skip to content

chore: add WebUI integration test pipeline for FAST HTML fixtures#7429

Draft
janechu wants to merge 10 commits intomainfrom
users/janechu/create-webui-integration-pipeline
Draft

chore: add WebUI integration test pipeline for FAST HTML fixtures#7429
janechu wants to merge 10 commits intomainfrom
users/janechu/create-webui-integration-pipeline

Conversation

@janechu
Copy link
Copy Markdown
Collaborator

@janechu janechu commented Apr 13, 2026

Pull Request

📖 Description

Add a GitHub Action and integration test script that validates @microsoft/webui can build and render the same declarative HTML fixture templates used by @microsoft/fast-build.

The integration test script (scripts/webui-integration-test.mjs) iterates over all 16 fixture directories in packages/fast-html/test/fixtures/, extracts <f-template> components, builds them with webui build --plugin=fast, renders the compiled protocol with each fixture's state.json, and validates the output contains the expected structure (declarative shadow DOM, hydration markers, f-template declarations).

Key changes:

  • New script: packages/fast-html/scripts/webui-integration-test.mjs
  • New workflow: .github/workflows/ci-webui-integration.yml
  • New npm script: test:webui-integration in @microsoft/fast-html
  • Added @microsoft/webui as a devDependency

📑 Test Plan

All 16 fixture integration tests pass locally:

Results: 16 passed, 0 failed, 16 total

Run with: npm run test:webui-integration -w @microsoft/fast-html

The CI workflow runs automatically on PRs and pushes to main.

✅ Checklist

General

  • I have included a change request file using $ npm run change
  • I have added tests for my changes.
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes.
  • I have read the CONTRIBUTING documentation and followed the standards for this project.

⏭ Next Steps

  • Consider adding output comparison between fast-build and webui rendered HTML to catch semantic differences.
  • Add the integration test step to the existing ci-validate-pr.yml workflow if isolation is no longer needed.

@janechu janechu changed the title feat: add WebUI integration test pipeline for FAST HTML fixtures chore: add WebUI integration test pipeline for FAST HTML fixtures Apr 13, 2026
@janechu janechu force-pushed the users/janechu/create-webui-integration-pipeline branch from 91484bb to 3610aac Compare April 13, 2026 17:12
janechu and others added 10 commits April 13, 2026 16:08
Create a GitHub Action workflow and test script that validates
@microsoft/webui can build and render the same declarative HTML
fixtures used by @microsoft/fast-build.

- Add scripts/webui-integration-test.mjs that extracts f-templates,
  runs webui build --plugin=fast, renders with state, and validates
  output for all 16 fixture directories
- Add .github/workflows/ci-webui-integration.yml triggered on PRs
  and pushes to main
- Add test:webui-integration npm script to fast-html package.json
- Add @microsoft/webui as devDependency
- Update DESIGN.md and README.md with integration test documentation

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ization

- Add permissions: contents: read to ci-webui-integration.yml
- Replace regex-based script tag removal with line filtering to
  avoid incomplete multi-character sanitization warning

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace custom .webui-integration-tmp directory with the already
gitignored temp/ directory structure.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The previous lockfile was generated with the darwin-arm64 platform
package resolved as a direct dependency rather than optional, causing
npm ci to fail on Linux/Windows with EBADPLATFORM.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Both build-fixtures.js and build-fixtures-with-webui.mjs now
  auto-discover fixture directories by scanning for entry.html,
  templates.html, and state.json instead of using a hardcoded array.
- Renamed webui-integration-test.mjs to build-fixtures-with-webui.mjs
  for consistency with build-fixtures.js.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Create build-fixtures.utilities.js with discoverFixtures() and
  extractFTemplates() shared by both build scripts
- Convert build-fixtures-with-webui.mjs to .js (package uses ESM)
- Both scripts now import from the shared utilities module

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace markup validation with actual Playwright test execution:

- build-fixtures-with-webui.js now only builds: renders fixtures with
  webui, writes index.html + main.ts + assets to temp/integrations/webui/
- Add playwright.webui.config.ts that serves the webui output via Vite
  and runs the same spec files from test/fixtures/
- Split into build:fixtures:webui and test:webui-integration npm scripts
- Add Playwright browser install step to CI workflow
- Update DESIGN.md and README.md

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Convert <f-when>/<f-repeat> to <if>/<for> in extractFTemplates so
webui evaluates conditionals and repeats server-side. Add
convertToWebuiSyntax() to shared utilities.

Update WEBUI_ISSUES.md with findings on the hydration mismatch this
reveals: webui's injected f-template blocks use <if>/<for> syntax
while fast-html's client JS expects <f-when>/<f-repeat>.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Moved to the parent ideas folder where it belongs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@janechu janechu force-pushed the users/janechu/create-webui-integration-pipeline branch from 2d12c76 to 9a4f7d9 Compare April 13, 2026 23:10
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