Add output navigation preserving viewer visibility

This commit is contained in:
Towsty
2026-09-10 07:09:52 -05:00
parent 9b1d8ae798
commit 7e4b69677f
2 changed files with 74 additions and 5 deletions
+25
View File
@@ -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)
})
}
}
}