Yicong-Huang opened a new pull request, #5170:
URL: https://github.com/apache/texera/pull/5170
### What changes were proposed in this PR?
Adds two new top-level docs in `frontend/` and refreshes the README:
- **`frontend/TESTING.md`** — canonical human-readable testing guide.
Covers the current stack (Vitest 4 + jsdom default / Playwright
Chromium for SVG-heavy specs + v8 coverage), explains why
`fixture.detectChanges()` is the template-coverage switch, walks
through standard recipes (minimum-viable spec, `*ngIf` branches,
event handlers, stubbed services, `fakeAsync`), and ends with an
anti-patterns red list, a coverage troubleshooting checklist, and a
Karma → Vitest migration cheatsheet for back-ported specs.
- **`frontend/AGENTS.md`** — scoped, auto-loading rules for AI agents
working inside `frontend/`: stack one-liner, three golden rules,
copy-paste minimum-viable spec template, anti-patterns table,
jsdom-vs-browser-mode decision. Points to TESTING.md for depth so
the agent context stays small.
- **`frontend/README.md`** — replaces the default Angular-CLI stub
(which still referred to Karma). Lists prerequisites, common
commands, the project layout, and routes testing questions to
`TESTING.md` / `AGENTS.md` instead of duplicating their content.
### Any related issues, documentation, discussions?
Closes #5169. Builds on the Karma → Vitest migration in #5017 and
captures the conventions that PR introduced (`async () =>` in
`beforeEach`, standalone components in `imports:`, `vi.fn()` mocks,
the two-target jsdom / browser-mode split).
### How was this PR tested?
Documentation-only. `yarn prettier --check` passes on the three new
files. All inline code samples come from existing specs that ship in
this repo (`mini-map.component.spec.ts`, `workspace.component.spec.ts`,
`workflow-editor.component.spec.ts`), and the referenced helpers
(`commonTestProviders`, `StubOperatorMetadataService`,
`test-zone-setup.ts`) all exist on `main`.
### Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Opus 4.7
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]