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/22 08:13:53 UTC

[I] Render the search-instructions and agent settings panels so their templates are covered [texera]

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

   ### Task Summary
   
   Two Angular templates hold panels that no test ever opens, so their markup never executes: **35 uncovered template lines** between them. Both component classes are already well covered (one at 100 %), which is the signature of a spec that drives the class but not the DOM. Goal: render each panel and bring both templates toward full coverage.
   
   Vitest/jsdom; see `frontend/TESTING.md` and `frontend/AGENTS.md`.
   
   The mechanics apply to both: call `fixture.detectChanges()` after each state change, query with `fixture.debugElement.query(By.css(...))` and fire events with `.triggerEventHandler(...)` instead of calling handlers on the instance, and set the flag each panel is gated on so its arm renders. Use the local coverage report to catch anything left over.
   
   ### Behavior to add
   
   **Search-instructions panel** (`frontend/src/app/dashboard/component/user/filters-instructions/filters-instructions.component.html`, codecov 15.0 %, 17 uncovered lines — EXTEND; the spec has a single `it()` block)
   
   The component class is already at **100 %**, so the entire gap is markup that never renders. Lines 30–48 are one contiguous help block that only appears when the instructions panel is open: the "We support the following search criteria" list (workflowName, `ctime:`, `mtime:`, `owner:`, `id:`, `operator:`, `project:`), the "You can change search parameters by" list, and the worked example line. Open the panel, render, and assert the criteria list is present with the expected number of `<li>` entries and that the example text renders. This is static markup — no async, no services.
   
   **Agent settings and operator-filter panels** (`frontend/src/app/workspace/component/agent/agent-panel/agent-chat/agent-chat.component.html`, codecov 90.1 %, 18 uncovered lines — EXTEND `agent-chat.component.spec.ts`)
   
   The remaining red lines are all inside modals and panels that stay closed:
   
   - **Settings modal** (lines 234, 241, 280–374) — the `[(ngModel)]` bindings and save buttons for `settingsMaxCharLimit` / `saveMaxCharLimit()`, `settingsMaxCellCharLimit` / `saveMaxCellCharLimit()`, `settingsToolTimeoutSeconds` / `saveToolTimeout()`, `settingsExecutionTimeoutMinutes` / `saveExecutionTimeout()`, and `settingsMaxSteps` / `saveMaxSteps()`. Set `isSystemInfoModalVisible` (and `isDetailsModalVisible` for line 234), render, change each bound input and click its save button, asserting the handler ran with the new value.
   - **Operator-type filter** (lines 409–436) — the `operatorTypeSearchQuery` input, `enableAllOperatorTypes()`, `deselectAllOperatorTypes()`, and the per-row `(ngModelChange)="toggleOperatorType(op.type, $event)"`. Seed the operator-type list so the `*ngFor` expands, then exercise select-all, deselect-all, and a single toggle.
   - **Tool-call summary** (lines 124, 133) — the `Execute {{ response.toolCalls.length }} tool{{ … > 1 ? 's' : '' }}` pluralisation and the `showResponseDetails(response)` click. Feed a response with one tool call and another with two so both sides of the ternary render.
   - **Message input** (line 189) — the `[(ngModel)]="currentMessage"` binding, exercised by typing into the rendered textarea.
   
   Determinism constraints for both files:
   - No layout or geometry assertions — `getBoundingClientRect` / `scrollHeight` return zeros under jsdom.
   - No assertions on `DatePipe`-rendered text (a fixed epoch renders a different day under a UTC runner).
   - `fixture.destroy()` in `afterEach` so any `@UntilDestroy` subscription stops between tests, and `vi.restoreAllMocks()` so spies do not leak.
   - Stub the agent service with `of(...)` or `HttpClientTestingModule` and flush synchronously; never hit a real backend.
   
   Out of scope: the streaming/websocket paths of the agent panel — cover the panel markup, not live transport.
   
   ### 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 search-instructions and agent settings panels so their templates are covered [texera]

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

   <!-- 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] Render the search-instructions and agent settings panels so their templates are covered [texera]

Posted by "mengw15 (via GitHub)" <gi...@apache.org>.
mengw15 closed issue #7838: Render the search-instructions and agent settings panels so their templates are covered
URL: https://github.com/apache/texera/issues/7838


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