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

   ### Task Summary
   
   `UserProjectListItemComponent`'s **template** is at ~55% 
(`user-project-list-item.component.html`, 35 uncovered lines); the class file 
is ~87%. The colour-picker panel and its actions are never rendered by the 
spec. Bring the template to full coverage. Vitest/jsdom; see 
`frontend/TESTING.md`.
   
   ### Behavior to add
   
   Extend `user-project-list-item.component.spec.ts` so each template branch 
renders, then run the coverage report and cover the remaining red lines. The 
uncovered constructs are the `[(colorPicker)]` binding and its panel markup, 
`(click)` handlers (e.g. `removeProjectColor()`), and `*ngIf` branches.
   
   Approach:
   - `fixture.detectChanges()` after each state change.
   - Open the colour-picker panel (set the state / click the trigger) so its 
markup renders, then fire `removeProjectColor()` and the other actions through 
the DOM (`By.css` query + `triggerEventHandler("click", …)`) and assert the 
resulting state / service call.
   - Render the item in each state the template switches on: with and without a 
colour set, editing vs display, owned vs shared.
   
   Determinism constraint: the template renders a date through a `date` pipe. 
**Render it, but do not assert the formatted string** — a fixed epoch renders a 
different day/hour under a UTC CI runner; assert element presence or a 
timezone-stable substring instead. Never assert on layout/geometry (zeros under 
jsdom).
   
   ### 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to