- New nodes: Image Resize plus the Utility group (Text, Integer, Float, Show Text, Math Expression, Select Every Nth, Split Batch, Merge Batches, Free Memory) - the dependency-free gaps that let shared workflows drop heavy packs. - Replace with AusBoss nodes (prototype): preview-then-confirm graph rewrite swapping known third-party nodes for pack equivalents, with a tested translation map, per-node opt-out, and refuse-with-reason for nodes the pack cannot stand in for. - Load Video: single-frame FRAME picker, an honest "what will load" label from the probed source rate, drop-a-video-to-restore. Save Video: format-aware widgets and a file_path output. Stitch Inpaint gained a blend_mask output, Select Frame negative from-the-end indexing, Image Size a batch count - all appended, saved workflows load unchanged. - LoRA Loader: drag-to-reorder rows, hover thumbnails on rows, file size and date in the info card. - Appearance: flagship scheme deepened to slate-teal; the retired bright-teal pair upgrades automatically via LEGACY_SCHEME_PAIRS. Optional queue-completion chime, off by default. - Image Resize invariant: pixels are only invented on an explicit width+height pad request - scale-derived modes resolve divisible_by snaps with a sub-half-step resize, never bars. - Docs refreshed for six stale pages, stale text and metadata fixed across the pack, the panel-height rule codified in AGENTS.md and the brand skill, and ausboss_node_tour.json added - a model-free example exercising 17 node types in one graph. Validated: scripts/validate_nodes.py (24 files), 300 JS tests, all Python suites under the ComfyUI embedded interpreter.
34 lines
1.3 KiB
JavaScript
34 lines
1.3 KiB
JavaScript
import assert from "node:assert/strict";
|
|
import test from "node:test";
|
|
|
|
import { queueRemaining, shouldChime } from "../js/shared/notify.mjs";
|
|
|
|
test("queue remaining reads both status event shapes", () => {
|
|
assert.equal(queueRemaining({ exec_info: { queue_remaining: 3 } }), 3);
|
|
assert.equal(queueRemaining({ status: { exec_info: { queue_remaining: 0 } } }), 0);
|
|
});
|
|
|
|
test("unknown shapes resolve to null, never to an empty queue", () => {
|
|
assert.equal(queueRemaining(null), null);
|
|
assert.equal(queueRemaining(undefined), null);
|
|
assert.equal(queueRemaining({}), null);
|
|
assert.equal(queueRemaining({ exec_info: {} }), null);
|
|
assert.equal(queueRemaining({ exec_info: { queue_remaining: "soon" } }), null);
|
|
});
|
|
|
|
test("the chime marks the busy-to-idle transition only", () => {
|
|
assert.equal(shouldChime(true, 1, 0), true);
|
|
assert.equal(shouldChime(true, 5, 0), true);
|
|
// Page opened onto an idle queue: no transition, no chime.
|
|
assert.equal(shouldChime(true, 0, 0), false);
|
|
// Mid-run ticks stay silent.
|
|
assert.equal(shouldChime(true, 3, 2), false);
|
|
// Queue refilling is not completion.
|
|
assert.equal(shouldChime(true, 0, 2), false);
|
|
});
|
|
|
|
test("the setting gates the chime entirely", () => {
|
|
assert.equal(shouldChime(false, 1, 0), false);
|
|
assert.equal(shouldChime(undefined, 1, 0), false);
|
|
});
|