feat: restore legacy named playlist workflows
This commit is contained in:
@@ -605,6 +605,24 @@ test("playlist entry has the complete standard operator metadata and native trus
|
||||
}, { id: "forged" }), /native-confirmed/);
|
||||
});
|
||||
|
||||
test("enabled replacement keeps native financial trust without mutating the frozen entry", () => {
|
||||
const snapshot = trustedSnapshot("sales");
|
||||
const stock = verifiedStock(snapshot.record);
|
||||
const selection = trustedSelection(snapshot, stock);
|
||||
const entry = workflow.createPlaylistEntry(snapshot, stock, selection, {
|
||||
id: "sales-toggle",
|
||||
fadeDuration: 6
|
||||
});
|
||||
const replacement = workflow.withEnabled(entry, false);
|
||||
|
||||
assert.notEqual(replacement, entry);
|
||||
assert.equal(Object.isFrozen(replacement), true);
|
||||
assert.equal(entry.enabled, true);
|
||||
assert.equal(replacement.enabled, false);
|
||||
assert.equal(workflow.isPlaylistEntryPlayable(replacement), true);
|
||||
assert.equal(workflow.withEnabled({ ...entry }, false), null);
|
||||
});
|
||||
|
||||
test("stored entries restore only as non-playable refresh-required descriptors", () => {
|
||||
const snapshot = trustedSnapshot("sales");
|
||||
const stock = verifiedStock(snapshot.record);
|
||||
|
||||
Reference in New Issue
Block a user