mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-07-11 17:52:19 +00:00
Coverage-gap audit after the mount-fidelity miss (assertions silently narrower than their claim). Fixes: - save/reload now runs under BOTH renderers with staged evaluates and frame yields, so Vue component mount/configure effects actually flush before each serialize - the one renderer-dependent value path a LiteGraph-only pass could not see. Console errors are now collected during the tier too (configure-time pack JS noise was uncovered). - queuePrompt is wrapped in-page: pack JS that THROWS mid-graphToPrompt (VHS applyToGraph crashed CI's whole VHS tier) now classifies as VALIDATION_FAIL carrying the exception text, so the offender self-identifies instead of aborting the tier. VHS_SelectLatest excluded with that mechanism: its applyToGraph assumes downstream inputs have widgets and hard-crashes when its output feeds a pure socket while the input dir has matching files (upstream-report candidate). - pack-owned-value nodes (ROUNDTRIP_VALUE_ALLOWLIST) no longer receive set-and-stick probe writes - writing `_cn` markers into editor JSON widgets just made pack JS choke on our own probes. - deliberate scopes are now stated where the assertion lives: auto-run runs single-renderer because execution is a backend contract and values flow through the same store in both renderers; it deliberately skips the zero-visible-errors check because it provokes expected failures; the connectivity breadth sweep is renderer-independent with the curated drag test covering both renderers; combo vocabulary matching is deliberately order-sensitive (option order defines the default). Local verification: full customNodes suite 67/67 under CI parity, plus lint, format:check, knip, and both typechecks clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Mock Data Fixtures
Deterministic mock data for browser (Playwright) tests. Each fixture
exports typed objects that conform to generated types from
packages/ingest-types or Zod schemas in src/schemas/.
Usage with page.route()
Note:
comfyPageFixturenavigates to the app duringsetup(), before the test body runs. Routes must be registered before navigation to intercept initial page-load requests. Set up routes in a custom fixture ortest.beforeEachthat runs beforecomfyPage.setup().
import { createMockNodeDefinitions } from '../fixtures/data/nodeDefinitions'
import { mockSystemStats } from '../fixtures/data/systemStats'
// Extend the base set with test-specific nodes
const nodeDefs = createMockNodeDefinitions({
MyCustomNode: {
/* ... */
}
})
await page.route('**/api/object_info', (route) =>
route.fulfill({ json: nodeDefs })
)
await page.route('**/api/system_stats', (route) =>
route.fulfill({ json: mockSystemStats })
)
Adding new fixtures
- Locate the generated type in
packages/ingest-typesor Zod schema insrc/schemas/for the endpoint you need. - Create a new
.tsfile here that imports and satisfies the corresponding TypeScript type. - Keep values realistic but stable — avoid dates, random IDs, or values that would cause test flakiness.