aglinxinyuan opened a new issue, #7414:
URL: https://github.com/apache/texera/issues/7414
### Task Summary
`UserDatasetComponent`'s spec constructs the component directly with `new`,
so the template has never been rendered and sits at 0% coverage — the 0% is
simply "never mounted", not a tooling problem.
What the template owns:
- the card/list toggle, and which button carries the `primary` highlight
(`[nzType]="viewType === 'list' ? 'primary' : 'default'"`) — the highlight is
the only way the user can tell which view they are in
- the view mode, `editable` and `isPrivateSearch` flags handed down to
`texera-search-results`
- `(sortMethodChange)="sortMethod = $event; search()"` — an inline statement
doing two things, where dropping either leaves the list in the previous order
- `[showEditTime]="false"` / `[showExecutionTime]="false"`, withholding sort
options that make no sense for entries which never execute
Worth knowing before starting:
- `viewType` defaults to **card**, not list, and is seeded from
`localStorage` at construction. Clear it per test or a view chosen by one test
leaks into the next. That persistence is itself worth a test: a freshly created
component should pick the stored preference back up.
- The sort button renders its own `<button>` into the same
`nz-space-compact`, so a positional selector finds that first. Select the view
buttons by their `title` attribute.
- ng-zorro defaults to `zh-cn` and throws `NG0701` without locale data;
provide `{ provide: NZ_I18N, useValue: en_US }` as the sibling dashboard specs
do.
### 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]