Dogfood: minimal Vite + Playwright fixture for discover-tests#54
Open
Dogfood: minimal Vite + Playwright fixture for discover-tests#54
Conversation
Add fixtures/playwright-vite-dogfood with vite, @playwright/test, smoke.spec.ts at the fixture root (Playwright JSON list paths align with repo-relative files). Wire discover_tests.roots in docs/demos/docgen.yaml, ignore node_modules, refresh docgen.catalog.yaml with merged Playwright entry + fingerprints, and document npm ci / playwright install / discover-tests in demos README. Co-authored-by: John Menke <jmjava@gmail.com>
Co-authored-by: John Menke <jmjava@gmail.com>
When --format=json (or catalog), prefixing stdout with human messages broke pipelines (e.g. CI piping JSON). Route warning and merge-catalog status to stderr; stdout stays machine-readable. Harden CI step with empty-stdout assert and a compact json.loads check. Add unit test asserting JSON on stdout when discovery returns no tests. Co-authored-by: John Menke <jmjava@gmail.com>
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.
Summary
Adds
fixtures/playwright-vite-dogfood/(Vite +@playwright/test), wiresdiscover_tests.roots, catalog, docs, and a CI job that runsnpm ci, Playwright, anddocgen discover-tests.CI fix (JSON pipe)
docgen discover-testsprinted a warning to stdout whennpx playwright test --listreturned no tests, so... --format=json | python -c 'json.load(sys.stdin)'saw non-JSON first and failed withJSONDecodeError: Expecting value: line 1 column 1.Change: that warning and merge-catalog status lines now go to stderr; stdout is only JSON (or yaml) for machine-readable formats. Added unit test
test_discover_tests_json_stdout_is_pure_when_no_tests(assertsr.stdoutis[]with empty discovery).CI job
playwright-vite-dogfood:npm ci→playwright install --with-deps chromium→npm run test:e2e→pip install .→discover-tests --format=jsonpiped to Python assert (with empty-stdout guard).Verify locally