Skip to content

Commit 3f445f0

Browse files
committed
test(signing-progress): enforce single-file docs use signer-based progress
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 1f4e004 commit 3f445f0

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

src/tests/components/validation/SigningProgress.spec.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,5 +473,27 @@ describe('SigningProgress', () => {
473473
pending: 1,
474474
})
475475
})
476+
477+
it('uses signer progress for single-file documents even when files array exists', () => {
478+
wrapper = createWrapper()
479+
480+
const progress = wrapper.vm.buildProgressFromValidation({
481+
nodeType: 'file',
482+
files: [
483+
{ id: 1, name: 'contract.pdf', status: 3 },
484+
],
485+
signers: [
486+
{ signed: true },
487+
{ signed: false },
488+
],
489+
})
490+
491+
expect(progress).toEqual({
492+
total: 2,
493+
signed: 1,
494+
inProgress: 0,
495+
pending: 1,
496+
})
497+
})
476498
})
477499
})

0 commit comments

Comments
 (0)