Skip to content

feat(fast-test-harness): propagate shadow DOM options through template generation and SSR#7519

Open
radium-v wants to merge 4 commits into
mainfrom
users/radium-v/test-harness-ensure-shadow-properties
Open

feat(fast-test-harness): propagate shadow DOM options through template generation and SSR#7519
radium-v wants to merge 4 commits into
mainfrom
users/radium-v/test-harness-ensure-shadow-properties

Conversation

@radium-v
Copy link
Copy Markdown
Collaborator

Pull Request

📖 Description

Adds support for shadow DOM options (e.g. delegatesFocus, mode) throughout the test harness template generation and SSR rendering pipeline, so SSR-rendered components produce declarative shadow roots that match their client-side definitions.

Also adds a url property to SSRFixture for tests that need to control the page URL during SSR rendering.

Key changes:

  • Template generation now reads shadow options from component definitions and emits matching shadowrootmode / shadowrootdelegatesfocus attributes via a pluggable resolver (resolveShadowOptions).
  • SSR rendering propagates shadow options through to the rendered output.
  • SSRFixture gains a url option.

📑 Test Plan

  • New unit tests cover the shadow-options resolution path in generate-templates and generate-webui-templates, plus SSR render behavior.
  • New Playwright spec verifies the SSRFixture url property.
  • All existing tests pass locally via npm run test -w @microsoft/fast-test-harness.

✅ 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.

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.

1 participant