The GitHub Actions job "Build and push images" on texera.git/main has succeeded. Run started by GitHub user bobbai00 (triggered by bobbai00).
Head commit for run: c35bdb134cab4126b25c39974be3e29a0a17a672 / Xinyuan Lin <[email protected]> test(frontend): cover the workflow editor's remaining event handlers (#7590) ### What changes were proposed in this PR? `workflow-editor.component.ts` sat at **79.9% of lines and 59.0% of branches**. The branch number was the real gap: almost half its conditions had only ever been taken one way. Adds 42 tests as a new appended block — appended rather than interleaved so the diff stays off the region PR #6927 touches. | | Before | After | |---|---|---| | Lines | 449/562 (79.9%) | **562/562 (100%)** | | Branches | 138/234 (59.0%) | **203/234 (86.8%)** | Nothing needs a browser, which is worth saying because it looks like it should. The component is almost entirely an event-wiring layer, and both seams were already established in this spec: triggering paper events against a real `CellView`, and pushing directly onto the services' subjects. Covered: the magnet and connection validators, the read-only paper lock, the recovering-state overrides and the transitions out of recovery, region reshape and recolour, blank-canvas panning and window resize, the repaint streams for view-result / reuse-cache / renamed operators and ports, shift-multiselect over links and comment boxes, port highlighting, the link hover tools, cursor presence, and the agent hover labels. ### Verification 49 mutations applied and reverted, production diff confirmed empty each time. Two survived during the build and were dealt with before this was raised — one test was vacuous because the un-guarded path throws inside an rxjs subscriber (reported asynchronously, so the assertion on the unchanged popover still held), and it was rewritten; the other is disclosed below. Three further mutations were then run independently, chosen for failure modes the build had not targeted rather than repeating its list: | Mutation | Result | |---|---| | the recovering override reports `Paused` instead of `Recovering` | red | | a highlighted port keeps the unhighlighted radius | red | | a blank-canvas click no longer clears the selection | red | One of my own probes was a **bad mutation rather than a finding**: rewriting `currentOpenedOperatorID = null` as `= null as any` is semantically identical, so its survival meant nothing. Re-run properly, the handler is pinned. ### Deliberately not included - **Line 354's `throw`** on an unknown transition out of recovering. It fires inside a subscriber, so rxjs reports it via `reportUnhandledError` asynchronously and `expect(...).toThrow()` does not catch it. Chasing one line with a test that leaves a stray unhandled error in the run is not worth it. - **The false arms at lines 726 and 1116** are **dead, not untested**: the stream is pre-filtered to `hasOperator || hasCommentBox`, so inside the non-shift `else` a false `hasOperator` implies `hasCommentBox`. This is why branch coverage stops at 86.8% rather than higher. - **`handleRegionEvents`' position filter** — one mutation on it survives and is genuinely unpinnable from this spec; the test that would have claimed it was removed rather than left overclaiming. No production file is touched. ### Any related issues, documentation, discussions? Closes #7589 ### How was this PR tested? ``` npx ng test --watch=false --include="**/workflow-editor.component.spec.ts" ``` ``` Test Files 1 passed (1) Tests 104 passed (104) ``` 42 new on top of the existing 62. The whole workflow-editor folder (5 spec files, 167 tests) also stays green, so there is no cross-test leakage. `yarn format:ci` passes. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 5) Report URL: https://github.com/apache/texera/actions/runs/31662186783 With regards, GitHub Actions via GitBox
