Skip to content

feat(demo-function): TS spec manifest discovery (#49)#50

Merged
jmjava merged 1 commit intomainfrom
cursor/ts-manifest-discovery-fcf7
May 5, 2026
Merged

feat(demo-function): TS spec manifest discovery (#49)#50
jmjava merged 1 commit intomainfrom
cursor/ts-manifest-discovery-fcf7

Conversation

@jmjava
Copy link
Copy Markdown
Owner

@jmjava jmjava commented May 5, 2026

Summary

Implements Playwright TypeScript manifest discovery for docgen demo-function as described in #49.

  • --manifest path.spec.ts: looks for sibling path.spec.docgen.yaml then path.docgen.yaml (so lesson.spec.ts pairs with lesson.docgen.yaml).
  • Inline docgen annotations: scans each test('title', …) block for test.info().annotations.push({ type: "docgen", description: … }); supports JSON.stringify({ … }) (trailing commas tolerated) and JSON-in-a-string description.
  • Disambiguation: path.spec.ts::Test title or --grep when multiple annotated tests exist.
  • demonstration.grep in YAML without demonstration.spec is now honored (needed for sidecar + npx playwright test).

Closes #49.

Test plan

  • pytest tests/test_demo_function.py
Open in Web Open in Cursor 

- Resolve sibling YAML: `foo.spec.docgen.yaml` and `foo.docgen.yaml`
- Parse `type: docgen` annotations per `test()` block (JSON.stringify + strings)
- Support `path.spec.ts::title` and `--grep` for disambiguation
- Fix `demonstration.grep` for sidecars without `demonstration.spec`

Closes #49

Co-authored-by: John Menke <jmjava@gmail.com>
@jmjava jmjava marked this pull request as ready for review May 5, 2026 13:38
@jmjava jmjava merged commit b880ba7 into main May 5, 2026
7 checks passed
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.

demo-function: Playwright TS manifest discovery (sidecar + docgen annotations)

2 participants