Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/skills/testing/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ FAST tests are [Playwright](https://playwright.dev/) integration tests that run

Fixture tests in `@microsoft/fast-element/test/declarative/fixtures` are the primary way to verify declarative template features. Each fixture is a self-contained test case with its own HTML, state, templates, and component definitions.

When changing declarative syntax, directive parsing, template generation, hydration behavior, or other user-authored template behavior, add or update a declarative fixture and exercise it in browser. Source-level parser tests may supplement narrow parsing edge cases, but they should not be the only coverage for syntax that users write in `entry.html` or `templates.html`. Use the local README files under `packages/fast-element/test/declarative/fixtures/` and each fixture category to choose the right fixture type and follow category-specific examples.

For a complete guide on creating fixtures β€” including how to write `entry.html`, `state.json`, `templates.html`, `main.ts`, and spec files β€” see:

πŸ“„ **[Writing Fixtures](../../../packages/fast-element/test/declarative/fixtures/WRITING_FIXTURES.md)**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Document declarative fixture testing guidance.",
"packageName": "@microsoft/fast-element",
"email": "7559015+janechu@users.noreply.github.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ Fixtures are auto-discovered by scanning category directories for subdirectories

---

## When to add or update a fixture

Use fixtures for changes to declarative syntax, directive parsing, template generation, hydration behavior, or other behavior that users express in `entry.html` or `templates.html`. Fixture coverage runs the generated template in a browser and catches integration issues that parser-only tests can miss.

Source-level parser tests may still be useful for very narrow edge cases, but they should supplement fixture coverage rather than replace it. Use the local README files in this directory and each fixture category to choose the right fixture type, then add or update the matching fixture and assert the behavior from the fixture's Playwright spec.

---

## fast-build.config.json

Each fixture must include a `fast-build.config.json` file that tells the `@microsoft/fast-build` CLI where to find the fixture's source files and how to build them. The build script passes `--config=<path>` to the CLI for each fixture.
Expand Down
Loading