You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "mengw15 (via GitHub)" <gi...@apache.org> on 2026/08/05 10:56:18 UTC

[I] extend CardItemComponent template coverage [texera]

mengw15 opened a new issue, #7330:
URL: https://github.com/apache/texera/issues/7330

   ### Task Summary
   
   `CardItemComponent`'s **template** is at ~50% (`card-item.component.html`, 51 uncovered lines) while its class file is already ~96%. The spec exercises the class but leaves half the template unrendered. Bring the template to full coverage. Vitest/jsdom; see `frontend/TESTING.md`.
   
   ### Behavior to add
   
   Extend `card-item.component.spec.ts` so each template branch renders, then run the coverage report and cover the remaining red lines. The uncovered constructs are `*ngIf` branches, `(click)` handlers and `[(ngModel)]` bindings — for example the selection checkbox (`entry.checked`) and its `$event.stopPropagation()` wrapper, and the per-entity-type blocks.
   
   Approach:
   - `fixture.detectChanges()` after each state change (the template-coverage switch).
   - Trigger the bindings through the DOM — `fixture.debugElement.query(By.css("..."))` + `.triggerEventHandler("click", ...)` — instead of calling the handler methods directly.
   - Feed a `DashboardEntry` of each supported type (workflow / project / dataset / …) plus the flag combinations the template switches on (owned vs shared, liked vs not, editing vs display) so every `*ngIf` arm renders.
   
   Determinism constraint: `onEditName` / `onEditDescription` queue a `setTimeout` that focuses the input (component L338 / L351). **Do not add `vi.useFakeTimers()` just to suppress it** — a synchronous test body never runs the callback, and layering fake timers over zone.js's patched timers is Node-version dependent and has caused CI-only failures. Assert `editingName` / the rendered input, not the focus.
   
   Do not assert on layout/geometry under jsdom; assert on rendered text, element presence, and the state the binding writes.
   
   ### Task Type
   
   - [ ] Refactor / Cleanup
   - [ ] DevOps / Deployment / CI
   - [x] Testing / QA
   - [ ] Documentation
   - [ ] Performance
   - [ ] Other
   


-- 
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] extend CardItemComponent template coverage [texera]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #7330:
URL: https://github.com/apache/texera/issues/7330#issuecomment-5191222251

   <!-- texera:template-compliance -->
   👋 Thanks for opening this issue, @mengw15!
   
   It looks like the issue description doesn't quite follow our template yet:
   
   - This issue doesn't appear to use one of our templates (Bug, Feature, or Task). Please open it using a template so the required details are captured.
   
   Filling out the template helps reviewers understand and triage your contribution faster. Please edit the description to complete it. This message will disappear automatically once the template is followed.
   
   You can find the template prompts by editing the description, or see [CONTRIBUTING.md](https://github.com/apache/texera/blob/main/CONTRIBUTING.md) for the full contribution flow.
   


-- 
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


Re: [I] extend CardItemComponent template coverage [texera]

Posted by "mengw15 (via GitHub)" <gi...@apache.org>.
mengw15 closed issue #7330: extend CardItemComponent template coverage
URL: https://github.com/apache/texera/issues/7330


-- 
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