PG1204 opened a new pull request, #8629: URL: https://github.com/apache/texera/pull/8629
### What changes were proposed in this PR? The heat-map overlay's pure logic is well covered, but the editor-side wiring shipped without specs in #6213. This adds them. Test-only: no production code changes, so no behaviour change and nothing to screenshot. 22 tests covering `handleHeatmapOverlay`, `repaintHeatmapColors`, `restoreAllOperatorFills` and `handleHeatmapHover`, in four groups: | Group | Covers | | --- | --- | | Painting | Spread on view select, repaint on new metrics, inert while off, no-metrics and not-measurable-for-view operators painted as no-data, operators added while the overlay is on and off | | Turning off | Fills restored respecting each operator's disabled state, `.heatmap-active` toggled, an open tooltip cleared | | Disable/enable repaint | The #6213 regression, both directions, plus the overlay-off case | | Hover tooltip | Metric and score, inert while off, non-operator cells ignored, em dash for missing metrics and for an unmeasurable view, position relative to the editor, mouseleave clearing, both change-detection skips | The tests drive the real paper and the real `JointUIService` and assert actual `rect.body/fill` values against `scoreToColor` and `HEATMAP_NO_DATA_COLOR`. A spy on `applyHeatmapColor` would pass even when `changeOperatorDisableStatus` overwrites the fill afterwards, which is the exact failure the disable/enable regression exists to catch. Metrics are published through `statisticsSubject` rather than pushed onto the derived stream, so the scoring under test is the one the service actually derives. The `ngOnDestroy` view reset already has a spec and is not duplicated here. ### Any related issues, documentation, discussions? Closes #7491. Follow-up from #6213. Part of umbrella #5772. ### How was this PR tested? The specs are the change. Each one was verified to fail for its own reason by deleting the behaviour it covers and re-running: | Deleted from `workflow-editor.component.ts` | Tests that failed | | --- | --- | | The `getDisabledOperatorsChangedStream` repaint | 2 | | The operator-add repaint | 1 | | `restoreAllOperatorFills()` on overlay off | 1 | | The `.heatmap-active` class toggle | 1 | | The hover `hasOperator` guard | 1 | | The tooltip clear on overlay off | 1 | ``` cd frontend && ng test --watch=false --include "**/workflow-editor.component.spec.ts" ``` 139 passing, up from 117. Statement coverage of the wiring (lines 429-564) is 46/46, and the file overall is 626/627. Full frontend suite: 6203 passing, 1 skipped. `tsc --noEmit` (strict), `eslint ./src` and Prettier are clean. ### Was this PR authored or co-authored using generative AI tooling? This PR was co-authored by Claude, in compliance with ASF. -- 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]
