You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "Yicong-Huang (via GitHub)" <gi...@apache.org> on 2026/05/24 22:07:51 UTC

[I] Frontend specs replace the parent template at test time, hiding it from coverage [texera]

Yicong-Huang opened a new issue, #5188:
URL: https://github.com/apache/texera/issues/5188

   ### Task Summary
   
   Several frontend component specs replace the parent component's template at test time — either with `overrideComponent({ set: { template: "" } })`, with a stripped stub markup string, or with the broader `overrideComponent({ set: { imports: [], schemas: [CUSTOM_ELEMENTS_SCHEMA] } })` form. The intent in each case is to keep heavy child components or directives out of the test build, but the side effect is that `fixture.detectChanges()` renders an empty or stub DOM, the real `.component.html` never executes, and v8 coverage records 0% for it — even though the specs themselves report green.
   
   A handful of specs also carry `schemas: [NO_ERRORS_SCHEMA]`, which Angular's own docs warn against because it hides real template typos and missing bindings. For Angular 19 standalone components the schema is usually unnecessary anyway: the parent's `imports:` array pulls the child graph in transitively, so unknown-element errors no longer fire.
   
   Refactor the affected specs to render the real template, document the right approach in `frontend/TESTING.md`, and add ESLint rules so the patterns can't grow back.
   
   ### Task Type
   
   - [x] Testing / QA
   - [x] Documentation


-- 
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: notifications-unsubscribe@texera.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Frontend specs replace the parent template at test time, hiding it from coverage [texera]

Posted by "Yicong-Huang (via GitHub)" <gi...@apache.org>.
Yicong-Huang closed issue #5188: Frontend specs replace the parent template at test time, hiding it from coverage
URL: https://github.com/apache/texera/issues/5188


-- 
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: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org