mengw15 opened a new pull request, #6539:
URL: https://github.com/apache/texera/pull/6539

   ### What changes were proposed in this PR?
   
   Extends the existing `ConsoleFrameComponent` spec (which only asserted
   `should create`) to cover its previously untested helpers, rendering, and 
debug
   controls
   
(`frontend/src/app/workspace/component/result-panel/console-frame/console-frame.component.ts`,
   ~38% coverage). The five collaborating services (`ExecuteWorkflowService`,
   `WorkflowConsoleService`, `WorkflowWebsocketService`, `NotificationService`,
   `UdfDebugService`) are stubbed, with the execution-state and console-update
   streams driven by test `Subject`s.
   
   18 new tests cover:
   
   - **Pure helpers** — `getWorkerIndex` (trailing numeric token), 
`workerIdToAbbr` (`W<index>`), `getWorkerColor` (deterministic hex color), and 
`getMessageLabel` (message-type → tag color, with the unknown-type fallback).
   - **Rendering** — `clearConsole` empties the list; `displayConsoleMessages` 
loads the operator's messages; `renderConsole` loads worker ids + messages when 
an operator is set and is a no-op otherwise.
   - **Debug controls** — `onClickContinue` / `onClickStep` dispatch per 
worker; `onClickSkipTuples` / `onClickRetryTuples` forward the worker ids and 
surface failures via the notification service; `submitDebugCommand` targets all 
workers or a single worker and clears the input, and is a no-op without an 
operator id.
   - **`registerAutoConsoleRerender`** — clears the console on an 
Initializing→Running transition, re-renders on any other state change, and 
re-renders on a console-message update.
   
   No production code was changed.
   
   ### Any related issues, documentation, discussions?
   
   Closes #6531
   
   ### How was this PR tested?
   
   Extended unit tests, run locally in `frontend/` (all green; the failure path 
was
   verified by deliberately breaking a subscription 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 19 passed (19)
   prettier --write <spec>   # unchanged
   eslint  <spec>            # clean
   ```
   
   All collaborating services are stubbed, so the suite makes no 
network/WebSocket
   calls (see `frontend/TESTING.md`).
   
   ### 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]

Reply via email to