feat: restore legacy named playlist workflows
This commit is contained in:
@@ -361,6 +361,29 @@ test("only entries bound to a correlated fresh read are playable", () => {
|
||||
viRead)), false);
|
||||
});
|
||||
|
||||
test("enabled replacement transfers only the correlated manual-list read capability", () => {
|
||||
const netRead = workflow.normalizeNetSellDataResponse({
|
||||
requestId,
|
||||
audience: "FOREIGN",
|
||||
rows: rows()
|
||||
}, { requestId, audience: "FOREIGN" });
|
||||
const entry = workflow.createNetSellPlaylistEntry("FOREIGN", {
|
||||
id: "entry_net_toggle",
|
||||
fadeDuration: 6
|
||||
}, netRead);
|
||||
const replacement = workflow.withEnabled(entry, false);
|
||||
|
||||
assert.notEqual(replacement, entry);
|
||||
assert.equal(entry.enabled, true);
|
||||
assert.equal(replacement.enabled, false);
|
||||
assert.equal(workflow.isPlaylistEntryPlayable(replacement), true);
|
||||
assert.equal(workflow.withEnabled({ ...entry }, false), null);
|
||||
assert.equal(workflow.withEnabled(workflow.createNetSellPlaylistEntry("FOREIGN", {
|
||||
id: "entry_net_toggle_untrusted",
|
||||
fadeDuration: 6
|
||||
}), false), null);
|
||||
});
|
||||
|
||||
test("request identifiers and option bounds are strict", () => {
|
||||
assert.throws(() => workflow.createStatusRequest("bad id"));
|
||||
assert.throws(() => workflow.createNetSellPlaylistEntry("FOREIGN", {
|
||||
|
||||
Reference in New Issue
Block a user