Comfy-Org / Comfy-Org/ComfyUI_frontend

test: GraphCanvas.vue culling wiring has no harness, so five mutants survive

Open
#15,315 1 comment 1 reaction 1 assignee Claimed by @benjcooley View on GitHub
area:testing area:vue-migration
Dominant language
TypeScript
Stars
2k
Forks
699
Avg merge
1d 7h
Merged PRs (30d)
490

Description

## Summary

Several mechanisms wired up in `GraphCanvas.vue` during #15030 survive mutation because there is no unit-test harness for that component. The logic they call is well covered; the wiring is not.

## Mutants that survive at `76cca1d086`

Each of these leaves the whole suite green:

- Unwire the link-drag source from the pin set.
- Delete the 250ms backstop's `refreshMountedNodes()` call.
- Drop the pinned set from the backstop fingerprint.
- Delete the `pendingSlotSync` latch.
- Remove the backstop's drag skip.

None is a correctness defect today; all were verified correct by reading the code during review. The gap is that a future refactor can remove any of them and CI stays green.

## Why they are grouped

They share one cause: `GraphCanvas.vue` has no component test, so anything whose only call site is there is unreachable from unit tests. The composables themselves (`useViewportCulling`, `liveNodeState`, `nodeCullingIndex`) are well covered, which is why the mutants inside them die.

## Options

Either a focused component test for `GraphCanvas.vue` covering the culling wiring, or an E2E that exercises the observable behaviours (pan away and back with a link drag in flight, a node moved into view with a stationary camera, links present after a large workflow load). The E2E route is probably better value since these are all integration behaviours.

## Affected area

- `src/components/graph/GraphCanvas.vue`
- `browser_tests/` if the E2E route is chosen

Found by mutation testing during review of #15030.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.