Yicong-Huang opened a new pull request, #5189:
URL: https://github.com/apache/texera/pull/5189
### What changes were proposed in this PR?
Closes #5188. Three coordinated passes against the "specs that replace the
parent template at test time" anti-pattern:
1. **`frontend/TESTING.md`**: anti-patterns 2 and 3 are rewritten to
describe what actually goes wrong (the real `.component.html` never executes,
so v8 coverage stays at 0%), and a new Recipe F + anti-pattern 8 cover the
right way to handle a heavy child component when one truly cannot be
instantiated — additive `overrideComponent({ remove, add })` with a minimal
stub child.
2. **Spec cleanups**: every spec that carried `template: ""`, a stub-markup
template substitute, `NO_ERRORS_SCHEMA`, or the broader `set: { imports: [],
schemas: [...] }` override is migrated to render the real template. Two specs
(Formly-driven and the full WorkspaceComponent) keep the old shape behind a
scoped `eslint-disable` with a TODO; both need a more thorough redesign that
isn't in scope here.
3. **ESLint guardrail**: an `*.spec.ts` override in `.eslintrc.json` blocks
the patterns going forward — `NO_ERRORS_SCHEMA` imports from `@angular/core`,
any `template` or `imports` key inside `overrideComponent({ set: ... })`. Each
rule's message points at the right replacement.
### Any related issues, documentation, discussions?
Closes #5188. Builds on the testing guide introduced in #5170 and the
lint-guardrail pattern from #5185.
### How was this PR tested?
`yarn ng test --watch=false --include=…` over the touched specs runs 13
files / 108 tests, all green. `yarn lint` and `yarn format:ci` both clean. The
three template files that originally pinned at 0% —
`preset-wrapper.component.html`, `operator-menu.component.html`,
`menu.component.html` — now report 44 / 79 / 59% line coverage under the new
shape.
### 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]