refactor(tests): replace manual TemplateMeta with pipeline-rendered#228
Merged
mohamedmansour merged 2 commits intomainfrom Apr 14, 2026
Merged
refactor(tests): replace manual TemplateMeta with pipeline-rendered#228mohamedmansour merged 2 commits intomainfrom
mohamedmansour merged 2 commits intomainfrom
Conversation
85dca74 to
b638bcc
Compare
…ixtures
E2E test fixtures previously hand-authored two artifacts per test:
a JS object mirroring the compiled TemplateMeta shape (bindText,
nodePath, slot, etc.) and a hand-written fixture.html simulating SSR
output. Both were fragile, hard to read, and disconnected from the
real parse → compile → render pipeline.
Replace them with real WebUI HTML templates compiled and rendered by
@microsoft/webui build() + render(). Each fixture is now a mini
WebUI app:
src/index.html page template
src/<tag>/<tag>.html component template (real WebUI syntax)
state.json initial render state
element.ts component class (no template registration)
Infrastructure:
- fixture-render.ts discovers src/ dirs, calls build()+render() per
fixture, injects the client bundle <script>, and caches the result.
Supports watchMode for auto-rebuild on template changes.
- The test server serves pipeline HTML at /<name>/fixture.html and
falls back to static files for JS bundles and CSS.
- Per-fixture webui.config.json overrides build options (e.g. css
strategy for the css-module fixture).
Fixture consolidation (28 → 24):
- text + counter + event + client-wire merged into 'basics' — one
component covering text bindings, @attr, @observable, derived
values, click events, and client-created mounting.
- nav absorbed into sidebar-repeat (strict subset).
New coverage added to existing fixtures:
- attr: mixed static+dynamic attributes (href="/items/{{id}}"),
prefix+suffix patterns
- list: {{items.length}} template binding
- basics: @input and @keydown events (fixme — event listener doesn't
fire after SSR hydration, tracked for framework investigation)
Spec simplification:
- Light/shadow DOM loop removed — the pipeline always produces shadow
DOM via declarative shadow root, which is the production path.
- Dedicated light-dom fixture added for the light-DOM hydration path.
- Specs use fixture.html only; locators unchanged (Playwright CSS
selectors pierce shadow DOM by default).
Developer tooling:
- cargo xtask new-fixture <name> [--tag <tag>] scaffolds the full
fixture directory structure with correct boilerplate.
- tests/fixtures/README.md documents the fixture format, the false
<if> workaround for dynamic children, and how to create new tests.
- Dead builder DSL removed from webui-test-support (~350 lines).
Only registerCompiledTemplate and renderTemplateScript remain.
Router E2E:
- Added a Playwright E2E suite for webui-router with a multi-route
fixture app (shell + alpha/beta/items/:id).
- Tests SSR deep links, client-side navigation, page reload
preservation, and browser back/forward history.
- 4 history tests marked fixme — they expose a router issue where
the second client navigation unmounts the old page but fails to
render the new one.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
b638bcc to
23fb991
Compare
akroshg
previously approved these changes
Apr 14, 2026
There was a problem hiding this comment.
Pull request overview
Refactors the WebUI E2E fixture system to stop hand-authoring fixture.html + manual TemplateMeta objects, and instead compile + SSR-render real WebUI templates via @microsoft/webui (build() + render()). Also adds a new Playwright E2E suite for @microsoft/webui-router.
Changes:
- Add pipeline fixture rendering (
renderFixtures) and serve rendered HTML at/<fixture>/fixture.htmlfrom the framework E2E server. - Simplify
webui-test-supporttemplate registration utilities and addfixture-renderexport. - Add
webui-routerE2E fixture app + Playwright config, and teachcargo xtask e2eto run a per-suite pre-script.
Reviewed changes
Copilot reviewed 210 out of 211 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| xtask/src/e2e.rs | Adds optional per-suite pre_script step and configures router suite to start a server + prebuild E2E assets. |
| pnpm-lock.yaml | Updates workspace lockfile for new/changed devDependencies. |
| packages/webui/src/index.ts | Extends BuildOptions.css to include "module". |
| packages/webui-test-support/src/register-template.ts | Removes manual meta-building helpers; keeps minimal TemplateMeta registration + script helper. |
| packages/webui-test-support/src/fixture-render.ts | New: discovers fixtures with src/index.html, calls build() + render(), injects client bundle script, optional watch mode. |
| packages/webui-test-support/package.json | Adds dependency on @microsoft/webui and exports ./fixture-render. |
| packages/webui-router/tsconfig.e2e.json | Adds a TS config for bundling router E2E fixture code. |
| packages/webui-router/tests/router-e2e.spec.ts | New Playwright E2E tests for SSR deep links, client navigation, and reload preservation (with some fixme). |
| packages/webui-router/tests/fixtures/router-app/src/route-shell/route-shell.html | Router test shell template (nav + outlet). |
| packages/webui-router/tests/fixtures/router-app/src/page-detail/page-detail.html | Router detail page template for items/:itemId. |
| packages/webui-router/tests/fixtures/router-app/src/page-beta/page-beta.html | Router beta page template. |
| packages/webui-router/tests/fixtures/router-app/src/page-alpha/page-alpha.html | Router alpha page template. |
| packages/webui-router/tests/fixtures/router-app/src/index.ts | Router fixture app custom elements + Router.start() on hydration. |
| packages/webui-router/tests/fixtures/router-app/src/index.html | Router fixture app page template defining nested routes. |
| packages/webui-router/tests/fixtures/router-app/data/state.json | Initial router fixture SSR state. |
| packages/webui-router/playwright.config.ts | New router Playwright config with webServer command to serve the fixture app. |
| packages/webui-router/package.json | Adds E2E scripts and dependencies for router Playwright testing. |
| packages/webui-framework/tests/server.ts | Framework fixture server now renders pipeline HTML via renderFixtures() and serves it at /<name>/fixture.html. |
| packages/webui-framework/tests/fixtures/text/text.spec.ts | Removes old manual text fixture spec (superseded by basics). |
| packages/webui-framework/tests/fixtures/text/fixture.html | Removes hand-authored SSR HTML. |
| packages/webui-framework/tests/fixtures/text/fixture-shadow.html | Removes hand-authored shadow SSR HTML. |
| packages/webui-framework/tests/fixtures/text/element.ts | Removes manual TemplateMeta registration fixture implementation. |
| packages/webui-framework/tests/fixtures/text-only-repeat/text-only-repeat.spec.ts | Updates to use fixture.html only (pipeline). |
| packages/webui-framework/tests/fixtures/text-only-repeat/state.json | Adds SSR state for pipeline rendering. |
| packages/webui-framework/tests/fixtures/text-only-repeat/src/test-text-only-repeat/test-text-only-repeat.html | Adds real WebUI component template. |
| packages/webui-framework/tests/fixtures/text-only-repeat/src/index.html | Adds real WebUI page template. |
| packages/webui-framework/tests/fixtures/text-only-repeat/fixture.html | Removes hand-authored SSR HTML. |
| packages/webui-framework/tests/fixtures/text-only-repeat/fixture-shadow.html | Removes hand-authored shadow SSR HTML. |
| packages/webui-framework/tests/fixtures/text-only-repeat/element.ts | Removes manual TemplateMeta registration. |
| packages/webui-framework/tests/fixtures/state-seed/state.json | Adds SSR state for pipeline rendering. |
| packages/webui-framework/tests/fixtures/state-seed/state-seed.spec.ts | Updates to use fixture.html only (pipeline). |
| packages/webui-framework/tests/fixtures/state-seed/src/test-state-seed/test-state-seed.html | Adds real WebUI component template. |
| packages/webui-framework/tests/fixtures/state-seed/src/test-state-seed-shell/test-state-seed-shell.html | Adds real WebUI nested component template. |
| packages/webui-framework/tests/fixtures/state-seed/src/index.html | Adds real WebUI page template. |
| packages/webui-framework/tests/fixtures/state-seed/fixture.html | Removes hand-authored SSR HTML. |
| packages/webui-framework/tests/fixtures/state-seed/fixture-shadow.html | Removes hand-authored shadow SSR HTML. |
| packages/webui-framework/tests/fixtures/state-seed/element.ts | Removes manual TemplateMeta registration. |
| packages/webui-framework/tests/fixtures/split-repeat/state.json | Adds SSR state for pipeline rendering. |
| packages/webui-framework/tests/fixtures/split-repeat/src/test-split-repeat/test-split-repeat.html | Adds real WebUI component template. |
| packages/webui-framework/tests/fixtures/split-repeat/src/index.html | Adds real WebUI page template. |
| packages/webui-framework/tests/fixtures/split-repeat/split-repeat.spec.ts | Updates to use fixture.html only (pipeline). |
| packages/webui-framework/tests/fixtures/split-repeat/fixture.html | Removes hand-authored SSR HTML. |
| packages/webui-framework/tests/fixtures/split-repeat/fixture-shadow.html | Removes hand-authored shadow SSR HTML. |
| packages/webui-framework/tests/fixtures/split-repeat/element.ts | Removes manual TemplateMeta registration. |
| packages/webui-framework/tests/fixtures/slot-shadow/state.json | Adds SSR state for pipeline rendering. |
| packages/webui-framework/tests/fixtures/slot-shadow/src/test-slot-parent/test-slot-parent.html | Adds real WebUI component template. |
| packages/webui-framework/tests/fixtures/slot-shadow/src/test-slot-btn/test-slot-btn.html | Adds real WebUI component template with <slot>. |
| packages/webui-framework/tests/fixtures/slot-shadow/src/index.html | Adds real WebUI page template. |
| packages/webui-framework/tests/fixtures/slot-shadow/fixture.html | Removes hand-authored SSR HTML. |
| packages/webui-framework/tests/fixtures/slot-shadow/element.ts | Removes manual template registration comments/logic (now pipeline templates). |
| packages/webui-framework/tests/fixtures/sidebar-repeat/state.json | Adds SSR state for pipeline rendering. |
| packages/webui-framework/tests/fixtures/sidebar-repeat/src/test-sidebar-repeat/test-sidebar-repeat.html | Adds real WebUI component template. |
| packages/webui-framework/tests/fixtures/sidebar-repeat/src/index.html | Adds real WebUI page template. |
| packages/webui-framework/tests/fixtures/sidebar-repeat/sidebar-repeat.spec.ts | Updates to use fixture.html only (pipeline). |
| packages/webui-framework/tests/fixtures/sidebar-repeat/fixture.html | Removes hand-authored SSR HTML. |
| packages/webui-framework/tests/fixtures/sidebar-repeat/fixture-shadow.html | Removes hand-authored shadow SSR HTML. |
| packages/webui-framework/tests/fixtures/sidebar-repeat/element.ts | Removes manual TemplateMeta registration. |
| packages/webui-framework/tests/fixtures/root-event/state.json | Adds SSR state for pipeline rendering. |
| packages/webui-framework/tests/fixtures/root-event/src/test-root-event/test-root-event.html | Adds real WebUI root-event template (<template ... @click>). |
| packages/webui-framework/tests/fixtures/root-event/src/index.html | Adds real WebUI page template. |
| packages/webui-framework/tests/fixtures/root-event/root-event.spec.ts | Updates to use fixture.html only (pipeline). |
| packages/webui-framework/tests/fixtures/root-event/fixture.html | Removes hand-authored SSR HTML. |
| packages/webui-framework/tests/fixtures/root-event/fixture-shadow.html | Removes hand-authored shadow SSR HTML. |
| packages/webui-framework/tests/fixtures/root-event/element.ts | Removes manual TemplateMeta registration. |
| packages/webui-framework/tests/fixtures/repeat-conditional/state.json | Adds SSR state for pipeline rendering. |
| packages/webui-framework/tests/fixtures/repeat-conditional/src/test-repeat-conditional/test-repeat-conditional.html | Adds real WebUI component template with repeat + conditionals. |
| packages/webui-framework/tests/fixtures/repeat-conditional/src/index.html | Adds real WebUI page template. |
| packages/webui-framework/tests/fixtures/repeat-conditional/repeat-conditional.spec.ts | Updates to use fixture.html only (pipeline). |
| packages/webui-framework/tests/fixtures/repeat-conditional/fixture.html | Removes hand-authored SSR HTML. |
| packages/webui-framework/tests/fixtures/repeat-conditional/fixture-shadow.html | Removes hand-authored shadow SSR HTML. |
| packages/webui-framework/tests/fixtures/repeat-conditional/element.ts | Removes manual TemplateMeta registration. |
| packages/webui-framework/tests/fixtures/repeat-append/state.json | Adds SSR state for pipeline rendering. |
| packages/webui-framework/tests/fixtures/repeat-append/src/test-repeat-parent/test-repeat-parent.html | Adds real WebUI parent template with repeat + controls. |
| packages/webui-framework/tests/fixtures/repeat-append/src/test-repeat-child/test-repeat-child.html | Adds real WebUI child template. |
| packages/webui-framework/tests/fixtures/repeat-append/src/index.html | Adds real WebUI page template. |
| packages/webui-framework/tests/fixtures/repeat-append/fixture-ssr.html | Removes old hand-authored SSR HTML variant. |
| packages/webui-framework/tests/fixtures/repeat-append/element.ts | Adds updated component classes for the fixture. |
| packages/webui-framework/tests/fixtures/ref/state.json | Adds SSR state for pipeline rendering. |
| packages/webui-framework/tests/fixtures/ref/src/test-ref/test-ref.html | Adds real WebUI component template using w-ref. |
| packages/webui-framework/tests/fixtures/ref/src/index.html | Adds real WebUI page template. |
| packages/webui-framework/tests/fixtures/ref/ref.spec.ts | Updates to use fixture.html only (pipeline) and adjusts focus assertion. |
| packages/webui-framework/tests/fixtures/ref/fixture.html | Removes hand-authored SSR HTML. |
| packages/webui-framework/tests/fixtures/ref/fixture-shadow.html | Removes hand-authored shadow SSR HTML. |
| packages/webui-framework/tests/fixtures/ref/element.ts | Removes manual TemplateMeta registration. |
| packages/webui-framework/tests/fixtures/optional-css-link/state.json | Adds SSR state for pipeline rendering. |
| packages/webui-framework/tests/fixtures/optional-css-link/src/test-no-css-host/test-no-css-host.html | Adds real WebUI host template. |
| packages/webui-framework/tests/fixtures/optional-css-link/src/test-no-css-child/test-no-css-child.html | Adds real WebUI child template. |
| packages/webui-framework/tests/fixtures/optional-css-link/src/index.html | Makes child reachable via false <if> for template emission. |
| packages/webui-framework/tests/fixtures/optional-css-link/optional-css-link.spec.ts | Updates to use fixture.html only (pipeline). |
| packages/webui-framework/tests/fixtures/optional-css-link/fixture-shadow.html | Removes hand-authored shadow SSR HTML. |
| packages/webui-framework/tests/fixtures/optional-css-link/element.ts | Removes manual TemplateMeta registration. |
| packages/webui-framework/tests/fixtures/nested-repeat/state.json | Adds SSR state for pipeline rendering. |
| packages/webui-framework/tests/fixtures/nested-repeat/src/test-nested-repeat/test-nested-repeat.html | Adds real WebUI nested-repeat template. |
| packages/webui-framework/tests/fixtures/nested-repeat/src/index.html | Adds real WebUI page template (no manual script tag). |
| packages/webui-framework/tests/fixtures/nested-repeat/nested-repeat.spec.ts | Updates to use fixture.html only and removes dual DOM-mode loops. |
| packages/webui-framework/tests/fixtures/nested-repeat/fixture-ssr.html | Removes hand-authored SSR HTML. |
| packages/webui-framework/tests/fixtures/nested-repeat/fixture-ssr-shadow.html | Removes hand-authored shadow SSR HTML. |
| packages/webui-framework/tests/fixtures/nested-repeat/fixture-shadow.html | Removes hand-authored shadow SSR HTML. |
| packages/webui-framework/tests/fixtures/nested-repeat/element.ts | Removes manual TemplateMeta registration. |
| packages/webui-framework/tests/fixtures/nested-event/state.json | Adds SSR state for pipeline rendering. |
| packages/webui-framework/tests/fixtures/nested-event/src/test-nested-event/test-nested-event.html | Adds real WebUI parent template. |
| packages/webui-framework/tests/fixtures/nested-event/src/test-nested-child/test-nested-child.html | Adds real WebUI child template. |
| packages/webui-framework/tests/fixtures/nested-event/src/index.html | Adds real WebUI page template. |
| packages/webui-framework/tests/fixtures/nested-event/nested-event.spec.ts | Updates to use fixture.html only (pipeline). |
| packages/webui-framework/tests/fixtures/nested-event/fixture.html | Removes hand-authored SSR HTML. |
| packages/webui-framework/tests/fixtures/nested-event/fixture-shadow.html | Removes hand-authored shadow SSR HTML. |
| packages/webui-framework/tests/fixtures/nested-event/element.ts | Removes manual TemplateMeta registration. |
| packages/webui-framework/tests/fixtures/nav/nav.spec.ts | Removes old nav fixture tests (absorbed elsewhere). |
| packages/webui-framework/tests/fixtures/nav/fixture.html | Removes hand-authored SSR HTML. |
| packages/webui-framework/tests/fixtures/nav/fixture-shadow.html | Removes hand-authored shadow SSR HTML. |
| packages/webui-framework/tests/fixtures/nav/element.ts | Removes manual TemplateMeta registration. |
| packages/webui-framework/tests/fixtures/multi-repeat/state.json | Adds SSR state for pipeline rendering. |
| packages/webui-framework/tests/fixtures/multi-repeat/src/test-multi-repeat/test-multi-repeat.html | Adds real WebUI component template. |
| packages/webui-framework/tests/fixtures/multi-repeat/src/index.html | Adds real WebUI page template. |
| packages/webui-framework/tests/fixtures/multi-repeat/multi-repeat.spec.ts | Updates to use fixture.html only (pipeline). |
| packages/webui-framework/tests/fixtures/multi-repeat/fixture.html | Removes hand-authored SSR HTML. |
| packages/webui-framework/tests/fixtures/multi-repeat/fixture-shadow.html | Removes hand-authored shadow SSR HTML. |
| packages/webui-framework/tests/fixtures/multi-repeat/element.ts | Removes manual TemplateMeta registration. |
| packages/webui-framework/tests/fixtures/list/state.json | Adds SSR state for pipeline rendering. |
| packages/webui-framework/tests/fixtures/list/src/test-list/test-list.html | Adds real WebUI parent template (adds {{items.length}} coverage). |
| packages/webui-framework/tests/fixtures/list/src/test-list-item/test-list-item.html | Adds real WebUI child template with conditional. |
| packages/webui-framework/tests/fixtures/list/src/index.html | Adds real WebUI page template. |
| packages/webui-framework/tests/fixtures/list/list.spec.ts | Updates to use fixture.html only (pipeline) and adds count assertion. |
| packages/webui-framework/tests/fixtures/list/fixture.html | Removes hand-authored SSR HTML. |
| packages/webui-framework/tests/fixtures/list/fixture-shadow.html | Removes hand-authored shadow SSR HTML. |
| packages/webui-framework/tests/fixtures/list/element.ts | Removes manual TemplateMeta registration. |
| packages/webui-framework/tests/fixtures/light-dom/light-dom.spec.ts | Adds dedicated light-DOM hydration test coverage. |
| packages/webui-framework/tests/fixtures/light-dom/fixture.html | Adds hand-authored light-DOM SSR HTML for the non-pipeline path. |
| packages/webui-framework/tests/fixtures/light-dom/element.ts | Adds manual TemplateMeta registration for light-DOM-only testing. |
| packages/webui-framework/tests/fixtures/event/fixture.html | Removes hand-authored SSR HTML (covered by basics). |
| packages/webui-framework/tests/fixtures/event/fixture-shadow.html | Removes hand-authored shadow SSR HTML. |
| packages/webui-framework/tests/fixtures/event/event.spec.ts | Removes old event fixture tests (covered by basics). |
| packages/webui-framework/tests/fixtures/event/element.ts | Removes manual TemplateMeta registration. |
| packages/webui-framework/tests/fixtures/css-style/state.json | Adds SSR state for pipeline rendering. |
| packages/webui-framework/tests/fixtures/css-style/src/test-style-host/test-style-host.html | Adds real WebUI host template with inline <style>. |
| packages/webui-framework/tests/fixtures/css-style/src/test-style-child/test-style-child.html | Adds real WebUI child template with inline <style>. |
| packages/webui-framework/tests/fixtures/css-style/src/index.html | Makes child reachable via false <if>. |
| packages/webui-framework/tests/fixtures/css-style/fixture-shadow.html | Removes hand-authored shadow SSR HTML. |
| packages/webui-framework/tests/fixtures/css-style/element.ts | Removes manual TemplateMeta registration. |
| packages/webui-framework/tests/fixtures/css-style/css-style.spec.ts | Updates to use fixture.html only (pipeline). |
| packages/webui-framework/tests/fixtures/css-module/webui.config.json | Adds per-fixture build override to use CSS module strategy. |
| packages/webui-framework/tests/fixtures/css-module/state.json | Adds SSR state for pipeline rendering. |
| packages/webui-framework/tests/fixtures/css-module/src/test-module-host/test-module-host.html | Adds real WebUI host template. |
| packages/webui-framework/tests/fixtures/css-module/src/test-module-host/test-module-host.css | Adds module CSS file. |
| packages/webui-framework/tests/fixtures/css-module/src/test-module-child/test-module-child.html | Adds real WebUI child template. |
| packages/webui-framework/tests/fixtures/css-module/src/test-module-child/test-module-child.css | Adds module CSS file. |
| packages/webui-framework/tests/fixtures/css-module/src/index.html | Adds real WebUI page template and makes child reachable via false <if>. |
| packages/webui-framework/tests/fixtures/css-module/fixture.html | Removes hand-authored SSR HTML. |
| packages/webui-framework/tests/fixtures/css-module/fixture-shadow.html | Removes hand-authored shadow SSR HTML. |
| packages/webui-framework/tests/fixtures/css-module/element.ts | Removes manual TemplateMeta registration. |
| packages/webui-framework/tests/fixtures/css-module/css-module.spec.ts | Updates to use fixture.html only (pipeline). |
| packages/webui-framework/tests/fixtures/css-link/state.json | Adds SSR state for pipeline rendering. |
| packages/webui-framework/tests/fixtures/css-link/src/test-link-host/test-link-host.html | Adds real WebUI host template with <link rel=\"stylesheet\">. |
| packages/webui-framework/tests/fixtures/css-link/src/test-link-child/test-link-child.html | Adds real WebUI child template with <link rel=\"stylesheet\">. |
| packages/webui-framework/tests/fixtures/css-link/src/index.html | Makes child reachable via false <if>. |
| packages/webui-framework/tests/fixtures/css-link/fixture-shadow.html | Removes hand-authored shadow SSR HTML. |
| packages/webui-framework/tests/fixtures/css-link/element.ts | Removes manual TemplateMeta registration. |
| packages/webui-framework/tests/fixtures/css-link/css-link.spec.ts | Updates to use fixture.html only (pipeline). |
| packages/webui-framework/tests/fixtures/counter/fixture.html | Removes hand-authored SSR HTML (covered by basics). |
| packages/webui-framework/tests/fixtures/counter/fixture-shadow.html | Removes hand-authored shadow SSR HTML. |
| packages/webui-framework/tests/fixtures/counter/element.ts | Removes manual TemplateMeta registration. |
| packages/webui-framework/tests/fixtures/counter/counter.spec.ts | Removes old counter fixture tests (covered by basics). |
| packages/webui-framework/tests/fixtures/conditional/state.json | Adds SSR state for pipeline rendering. |
| packages/webui-framework/tests/fixtures/conditional/src/test-conditional/test-conditional.html | Adds real WebUI template with negation/compound/comparison coverage. |
| packages/webui-framework/tests/fixtures/conditional/src/test-conditional-client/test-conditional-client.html | Adds second component template. |
| packages/webui-framework/tests/fixtures/conditional/src/index.html | Adds page template mounting both conditional components. |
| packages/webui-framework/tests/fixtures/conditional/fixture.html | Removes hand-authored SSR HTML. |
| packages/webui-framework/tests/fixtures/conditional/fixture-shadow.html | Removes hand-authored shadow SSR HTML. |
| packages/webui-framework/tests/fixtures/conditional/element.ts | Removes manual TemplateMeta registration and adds count observable. |
| packages/webui-framework/tests/fixtures/conditional/conditional.spec.ts | Updates to use fixture.html only and adds new conditional coverage assertions. |
| packages/webui-framework/tests/fixtures/conditional-component/state.json | Adds SSR state for pipeline rendering. |
| packages/webui-framework/tests/fixtures/conditional-component/src/test-nested-cond-parent/test-nested-cond-parent.html | Adds real WebUI template for nested conditional parent. |
| packages/webui-framework/tests/fixtures/conditional-component/src/test-mid-comp/test-mid-comp.html | Adds real WebUI mid component template with inner <if>. |
| packages/webui-framework/tests/fixtures/conditional-component/src/test-grandchild-comp/test-grandchild-comp.html | Adds real WebUI grandchild template. |
| packages/webui-framework/tests/fixtures/conditional-component/src/test-cond-parent/test-cond-parent.html | Adds real WebUI template for flat conditional parent. |
| packages/webui-framework/tests/fixtures/conditional-component/src/test-child-comp/test-child-comp.html | Adds real WebUI child component template. |
| packages/webui-framework/tests/fixtures/conditional-component/src/index.html | Adds page template mounting both conditional parents. |
| packages/webui-framework/tests/fixtures/conditional-component/fixture.html | Removes hand-authored SSR HTML. |
| packages/webui-framework/tests/fixtures/conditional-component/element.ts | Removes the “late template registration” simulation code path. |
| packages/webui-framework/tests/fixtures/conditional-component/conditional-component.spec.ts | Collapses prior “templates missing vs available” test split into a single suite. |
| packages/webui-framework/tests/fixtures/complex-prop/state.json | Adds SSR state for pipeline rendering. |
| packages/webui-framework/tests/fixtures/complex-prop/src/test-item-list/test-item-list.html | Adds real WebUI list template. |
| packages/webui-framework/tests/fixtures/complex-prop/src/test-item-host/test-item-host.html | Adds real WebUI host template passing :items. |
| packages/webui-framework/tests/fixtures/complex-prop/src/index.html | Adds page template. |
| packages/webui-framework/tests/fixtures/complex-prop/fixture.html | Removes hand-authored SSR HTML. |
| packages/webui-framework/tests/fixtures/complex-prop/element.ts | Removes manual TemplateMeta registration and keeps only component class logic. |
| packages/webui-framework/tests/fixtures/client-wire/fixture.html | Removes hand-authored no-SSR fixture HTML (covered by basics). |
| packages/webui-framework/tests/fixtures/client-wire/element.ts | Removes manual template fixture implementation (covered by basics). |
| packages/webui-framework/tests/fixtures/client-wire/client-wire.spec.ts | Removes old client-wire regression tests (covered by basics). |
| packages/webui-framework/tests/fixtures/bench/state.json | Adds SSR state for pipeline rendering. |
| packages/webui-framework/tests/fixtures/bench/src/test-bench/test-bench.html | Adds real WebUI benchmark template. |
| packages/webui-framework/tests/fixtures/bench/src/test-bench-repeat/test-bench-repeat.html | Adds real WebUI repeat benchmark template. |
| packages/webui-framework/tests/fixtures/bench/src/test-bench-events/test-bench-events.html | Adds real WebUI event benchmark template. |
| packages/webui-framework/tests/fixtures/bench/src/index.html | Removes manual script tag and relies on injected bundle. |
| packages/webui-framework/tests/fixtures/bench/fixture-shadow.html | Removes hand-authored shadow SSR HTML. |
| packages/webui-framework/tests/fixtures/bench/element.ts | Removes large manual template-construction code. |
| packages/webui-framework/tests/fixtures/bench/bench.spec.ts | Updates to use fixture.html only (pipeline). |
| packages/webui-framework/tests/fixtures/basics/state.json | Adds SSR state for consolidated “basics” fixture. |
| packages/webui-framework/tests/fixtures/basics/src/test-basics/test-basics.html | Adds real WebUI basics template (bindings + events + input/keydown). |
| packages/webui-framework/tests/fixtures/basics/src/index.html | Adds basics page template. |
| packages/webui-framework/tests/fixtures/basics/element.ts | Adds basics component class. |
| packages/webui-framework/tests/fixtures/basics/basics.spec.ts | Adds consolidated tests replacing text/counter/event/client-wire. |
| packages/webui-framework/tests/fixtures/attr/state.json | Adds SSR state for pipeline rendering. |
| packages/webui-framework/tests/fixtures/attr/src/test-attr/test-attr.html | Adds real WebUI template covering mixed/prefix/suffix attrs. |
| packages/webui-framework/tests/fixtures/attr/src/index.html | Adds page template. |
| packages/webui-framework/tests/fixtures/attr/fixture.html | Removes hand-authored SSR HTML. |
| packages/webui-framework/tests/fixtures/attr/fixture-shadow.html | Removes hand-authored shadow SSR HTML. |
| packages/webui-framework/tests/fixtures/attr/element.ts | Removes manual TemplateMeta registration and adds observables used by new template. |
| packages/webui-framework/tests/fixtures/attr/attr.spec.ts | Updates to use fixture.html only and adds new mixed-attribute assertions. |
| packages/webui-framework/tests/fixtures/README.md | New: documents the new pipeline-driven fixture format and guidance (including dynamic children pattern). |
| .github/skills/testing/SKILL.md | Updates internal testing skill doc to match new fixture pipeline and patterns. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
mohamedmansour
commented
Apr 14, 2026
Contributor
Author
mohamedmansour
left a comment
There was a problem hiding this comment.
All 6 review comments addressed in d98f197:
- renderTemplateScript + functions — Added doc comment documenting the JSON.stringify limitation
- Self-dependency — Removed, switched to relative import
- Duplicate build:e2e — Removed from
testscript; xtaskpre_scriptowns it - render() crash without addon — Error message now points to
cargo build -p microsoft-webui-node - Empty-protocol error — Same actionable message as #4
- recursive fs.watch on Linux — Wrapped in try/catch with platform warning
akroshg
approved these changes
Apr 14, 2026
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.
…ixtures
E2E test fixtures previously hand-authored two artifacts per test: a JS object mirroring the compiled TemplateMeta shape (bindText, nodePath, slot, etc.) and a hand-written fixture.html simulating SSR output. Both were fragile, hard to read, and disconnected from the real parse → compile → render pipeline.
Replace them with real WebUI HTML templates compiled and rendered by @microsoft/webui build() + render(). Each fixture is now a mini WebUI app:
Infrastructure:
Fixture consolidation (28 → 24):
New coverage added to existing fixtures:
Spec simplification:
Router E2E: