Comfy-Org / Comfy-Org/ComfyUI_frontend

Extract a deferred model-verification fixture for error-clearing tests

Open
#15,203 1 comment 1 reaction 1 assignee Claimed by @DrJKL View on GitHub
area:testing
Dominant language
TypeScript
Stars
2k
Forks
704
Avg merge
1d 8h
Merged PRs (30d)
512

Description

## Summary

Extract a shared deferred model-verification fixture for
`useErrorClearingHooks` tests.

## Required changes

Add a model-side fixture that is parallel to
`deferMediaVerification` in
`src/platform/missingMedia/__fixtures__/promotedMedia.ts`.

Update the affected tests in
`src/composables/graph/useErrorClearingHooks.test.ts` to use the
fixture for:

- `MissingModelCandidate` setup
- `scanNodeModelCandidates` mocking
- `scanNodeMediaCandidates` mocking
- deferred `verifyAssetSupportedCandidates` behavior

The fixture must preserve each test's ability to resolve verification
and set the candidate `isMissing` state when required.

## Rationale

Several tests duplicate the same deferred model-verification setup.
A shared fixture will centralize the verification signature and reduce
maintenance work when that signature changes.

## Affected areas

- `src/composables/graph/useErrorClearingHooks.test.ts`
- Model verification test fixtures near missing-model test support

## Acceptance criteria

- A reusable deferred model-verification fixture exists.
- The repeated model-verification test setup uses the fixture.
- The updated tests retain their current behavioral coverage.
- Changes are limited to test support and affected tests.

## Backlinks

- Pull request: https://github.com/Comfy-Org/ComfyUI_frontend/pull/15012
- Review comment: https://github.com/Comfy-Org/ComfyUI_frontend/pull/15012#discussion_r3771038268
- Requested by: @DrJKL

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.