aglinxinyuan opened a new issue, #7404:
URL: https://github.com/apache/texera/issues/7404
### Task Summary
`VersionsListComponent` keeps its display rules in the template, and none of
them are rendered by the spec — the existing tests drive `collapse()` and
`getDisplayedVersionId()` directly. Locally the template sits at roughly 4% of
statements.
The rule worth pinning is the row predicate:
```html
<tr *ngIf="(!row.importance && row.expand) || row.importance">
```
A minor version stays folded away until its important parent is expanded —
that is the entire point of the collapse, and it lives only in the template.
Alongside it: the descending version number from `getDisplayedVersionId(i, l)`,
the `selected-row` highlight keyed to `selectedRowIndex === i`,
`[nzShowExpand]="row.importance"` so only important versions get an expand
control, the three arguments the timestamp button hands to `getVersion`, the
`MM/dd/yy HH:mm:ss` date format, and `*ngIf="versionsList"` hiding the table
until versions load.
The spec is already set up for this — it deliberately skips
`detectChanges()` in `beforeEach` and notes that "tests that need the rendered
template call detectChanges() locally".
One gotcha: `nz-table` renders its own expand-icon `<button>`, so
`querySelector("button")` finds that rather than the version link. Select
`button.version-link`.
### 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]