mengw15 opened a new pull request, #7333:
URL: https://github.com/apache/texera/pull/7333
### What changes were proposed in this PR?
Extends the `ConsoleFrameComponent` spec so its **template** actually
renders,
covering the `.component.html` branches the class-level tests never exercised
(`frontend/src/app/workspace/component/result-panel/console-frame/`). The
class
was already well covered; only the template was low. No production code
changed.
> Path note: the component lives under `result-panel/console-frame/`, not the
> `console-frame/` path the issue lists.
+4 tests, each seeding component state then calling `detectChanges()` so the
template executes:
- One row per console message — the `*ngFor` list, the collapse panel
(non-empty
message) vs the plain-title branch (empty message), and the source /
timestamp /
worker tags. Only the message that carries a `workerId` renders the worker
tag.
- The source and timestamp tags disappear when `showSource` /
`showTimestamp` are
toggled off (the `*ngIf` false arms).
- The debug input group is absent when `consoleInputEnabled` is false and
present
when true; clicking each of the four action buttons reaches its handler,
and
pressing enter in the command input submits the command through the
websocket.
Per the component's determinism constraints:
- the timestamp cell is rendered through the `| date` pipe but its formatted
string is **not** asserted (it is timezone-dependent under a UTC CI
runner) —
the assertions check the tag's presence and other cell text instead;
- no fake timers are introduced for the `ngAfterViewChecked` auto-scroll
`setTimeout` (a synchronous test body never lets it fire), and nothing
asserts
on layout/geometry (`scrollHeight` etc., which are zero under jsdom).
### Any related issues, documentation, discussions?
Closes #7329
### How was this PR tested?
Extended unit tests, run locally in `frontend/` (all green; the failure path
was
verified by breaking an assertion to confirm the suite goes red):
```
ng test --watch=false --include
src/app/workspace/component/result-panel/console-frame/console-frame.component.spec.ts
# Test Files 1 passed (1) | Tests 23 passed (23)
prettier --write <spec> # clean
eslint <spec> # clean
```
### Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 4.8 [1M context])
--
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]