Add output navigation preserving viewer visibility
This commit is contained in:
@@ -49,3 +49,28 @@ test('full input action restores the displayed image settings instead of the pre
|
||||
await action('useOutputWithSettings', f.scope)()
|
||||
assert.deepEqual(f.calls, ['displayed'])
|
||||
})
|
||||
|
||||
for (const from of ['edit', 'video']) {
|
||||
for (const kind of ['still', 'clip']) {
|
||||
for (const covered of [false, true]) {
|
||||
test(`output navigation carries ${covered ? 'covered' : 'revealed'} state from ${from} to ${kind}`, () => {
|
||||
const target = { id: 'next', hideInput: true, hideThumbnail: true }
|
||||
const ref = value => ({ value })
|
||||
const scope = {
|
||||
outputNavigationItems: ref([{ kind, item: { id: 'first' } }, { kind, item: target }]),
|
||||
outputNavigationIndex: ref(0), outputPreviewKind: ref(from),
|
||||
editAwaitingReveal: ref(covered), awaitingReveal: ref(covered),
|
||||
concealEditOutput: ref(false), concealOutput: ref(false),
|
||||
lastV2StillId: ref('first'), editBusy: ref(false), videoBusy: ref(false),
|
||||
editStatusMessage: ref(''), statusMessage: ref(''), player: ref({ pause() {} }),
|
||||
openStill(item) { assert.equal(item, target); scope.editAwaitingReveal.value = true },
|
||||
openClip(item) { assert.equal(item, target); scope.awaitingReveal.value = true }
|
||||
}
|
||||
action('stepOutput', scope)(-1)
|
||||
assert.equal(kind === 'still' ? scope.editAwaitingReveal.value : scope.awaitingReveal.value, covered)
|
||||
assert.equal(target.hideInput, true)
|
||||
assert.equal(target.hideThumbnail, true)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user