fix: advance NEXT past unplayable cuts
This commit is contained in:
@@ -116,6 +116,7 @@ test("program keeps cut append available while structural playlist edits stay lo
|
||||
playout: {
|
||||
phase: "program",
|
||||
currentCueIndexZeroBased: 0,
|
||||
onAirCueIndexZeroBased: 0,
|
||||
isBusy: false,
|
||||
outcomeUnknown: false,
|
||||
isPlayCompletionPending: false,
|
||||
@@ -211,6 +212,8 @@ test("playlist keeps candidate, selection, and pink on-air states independent",
|
||||
phase: "program",
|
||||
currentEntryId: "row-current",
|
||||
currentCueIndexZeroBased: 1,
|
||||
onAirEntryId: "row-current",
|
||||
onAirCueIndexZeroBased: 1,
|
||||
pageIndexZeroBased: 1,
|
||||
pageCount: 3
|
||||
}
|
||||
@@ -237,6 +240,34 @@ test("playlist keeps candidate, selection, and pink on-air states independent",
|
||||
assert.equal(presentation({
|
||||
playout: { ...state.playout, currentEntryId: null }
|
||||
}, { rowId: "row-fallback", isSelected: false, pageText: "1/3" }, 1).isCurrent, true);
|
||||
|
||||
const failedNextState = {
|
||||
playout: {
|
||||
...state.playout,
|
||||
currentEntryId: "row-unplayable",
|
||||
currentCueIndexZeroBased: 2,
|
||||
onAirEntryId: "row-current",
|
||||
onAirCueIndexZeroBased: 1
|
||||
}
|
||||
};
|
||||
assert.deepEqual(presentation(failedNextState, {
|
||||
rowId: "row-unplayable", isSelected: false, pageText: "1/1"
|
||||
}, 2), {
|
||||
isSelected: false,
|
||||
isCurrent: true,
|
||||
isOnAir: false,
|
||||
pageText: "1/1",
|
||||
focusKey: "program:row-unplayable:-1:0"
|
||||
});
|
||||
assert.deepEqual(presentation(failedNextState, {
|
||||
rowId: "row-current", isSelected: false, pageText: "1/3"
|
||||
}, 1), {
|
||||
isSelected: false,
|
||||
isCurrent: false,
|
||||
isOnAir: true,
|
||||
pageText: "2/3",
|
||||
focusKey: ""
|
||||
});
|
||||
assert.match(app, /presentation\.isOnAir \? " on-air"/);
|
||||
assert.match(app, /presentation\.isSelected \|\| isCandidate \? " selected"/);
|
||||
assert.match(app, /presentation\.pageText/);
|
||||
|
||||
Reference in New Issue
Block a user