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/25 06:42:09 UTC
[I] Render the search filters and list-item controls from the DOM [texera]
mengw15 opened a new issue, #7963:
URL: https://github.com/apache/texera/issues/7963
### Task Summary
Two dashboard templates each hold a block of markup that no test renders — **19 uncovered lines** between them. In every case the component class is already well covered; what is missing is that the spec calls the handlers directly instead of driving the DOM, so the `[(ngModel)]` bindings, the `(click)` handlers and one static guidance panel never execute.
Goal: render each block and bring both templates toward full coverage. Pure EXTEND of the existing specs. Vitest/jsdom; see `frontend/TESTING.md` and `frontend/AGENTS.md`.
Shared mechanics: `fixture.detectChanges()` after every state change; query with `fixture.debugElement.query(By.css(...))` and fire events with `.triggerEventHandler(...)`; seed the collections each `*ngFor` iterates so the rows render. Use the local coverage report to catch anything left.
### Behavior to add
**Search filters** (`frontend/src/app/dashboard/component/user/filters/filters.component.html`, codecov 83.07 %, 11 uncovered lines — EXTEND `filters.component.spec.ts`)
Every filter list is rendered from a collection that the spec leaves empty, so no row is ever produced:
- the date pickers `[(ngModel)]="selectedMtime"` (44) and `[(ngModel)]="selectedCtime"` (69) — set each and assert the binding round-trips;
- the four checkbox lists — owners (100–101), workflow IDs (134–135), operators (171–172) and projects (207–209). Seed each collection with at least two entries, toggle one checkbox, and assert the matching `updateSelectedOwners()` / `updateSelectedIDs()` / `updateSelectedOperators()` / `updateSelectedProjects()` ran and the selection changed. Line 209 also renders `{{project.name}}`, so assert the label text for the project rows.
**Dashboard list item controls** (`frontend/src/app/dashboard/component/user/list-item/list-item.component.html`, codecov 90.62 %, 8 uncovered lines — EXTEND `list-item.component.spec.ts`)
- the inline rename input (99–105) — `[(ngModel)]="entry.name"` with `confirmUpdateCustomName(entry.name)` bound to both `(blur)` and `(keydown.enter)`. Enter rename mode, change the value, and fire each of the two events, asserting the confirm handler ran with the new name.
- the action buttons — `openDetailModal(this.entry.id)` (192), `onClickOpenShareAccess()` (201), `onClickDownload()` (221), and the delete confirmation `(nzOnConfirm)="deleted.emit()"` (231). Fire each from the rendered control and assert the handler ran or the `deleted` output emitted.
- the download button's guard `*ngIf="entry.type === 'workflow' || entry.type === 'dataset'"` (219) — render with each of those types and with a third type so both sides of the `||` and the absent case are covered.
Determinism notes:
- **Clone the entry fixture per test** for the list item — the rename handler mutates `entry.name` in place, so a shared object leaks a renamed value into a later test.
- Stub the services each component injects and emit with `of(...)`; never a real backend.
- Do not assert on `DatePipe`-rendered text (a fixed epoch renders a different day under a UTC runner) — rendering a date is fine, asserting the string is not.
- No layout or geometry assertions — `getBoundingClientRect` / `scrollHeight` return zeros under jsdom.
- `fixture.destroy()` in `afterEach` so `@UntilDestroy` subscriptions stop, and `vi.restoreAllMocks()` in `afterEach`.
### 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] Render the dashboard list-item controls from the DOM [texera]
Posted by "mengw15 (via GitHub)" <gi...@apache.org>.
mengw15 commented on issue #7963:
URL: https://github.com/apache/texera/issues/7963#issuecomment-5406710444
Dropping the `filters.component.html` half of this issue: it is not reachable in this test environment, and part of it is being deleted anyway.
**Every target is inside a CDK overlay.** All nine uncovered statements the issue named (44, 69, 100-101, 134-135, 171-172, 207-209) sit inside `<nz-dropdown-menu>`. `NzDropdownMenuComponent`'s whole template is wrapped in an `<ng-template>` whose `<ng-content>` is only instantiated when the overlay attaches, and the overlay never attaches under jsdom. Probed two ways:
- seed the collection, `detectChanges()`, then click `.search-owners-button` — 0 checkboxes in view, and the injected `OverlayContainer` element stays empty (`innerHTML.length === 0`) through a microtask, a macrotask and a 300 ms real wait;
- resolve all six `NzDropdownDirective` instances, set `nzVisible = true` and call `ngOnChanges`, inside `fakeAsync` with `tick(0)` then `tick(500)` — the overlay container is still empty.
This is the same wall as #7651, #7655 and #7840. Forcing it would need an unbounded real wait, which is exactly the flake the CI matrix punishes.
**`filters.component.ts` is already at 100 %** — 215/215 statements, 84/84 branches, 62/62 functions. The gap is purely template lines that live behind the overlay.
**The project block is being removed.** #7463 deletes the `#projectSearchOptions` dropdown from `filters.component.html` (-34 lines), which is items 207-209 here, so covering them would be writing tests for markup on its way out.
The list-item half is done in the PR below; the issue body has been trimmed to that half.
--
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] Render the dashboard list-item controls from the DOM [texera]
Posted by "mengw15 (via GitHub)" <gi...@apache.org>.
mengw15 closed issue #7963: Render the dashboard list-item controls from the DOM
URL: https://github.com/apache/texera/issues/7963
--
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