feat: make assistant-last-signer check signing-group aware

This commit is contained in:
David Nguyen
2026-08-04 17:25:37 +10:00
parent 74c1752853
commit d52000f648
2 changed files with 42 additions and 3 deletions
+18
View File
@@ -51,6 +51,24 @@ describe('recipient signing order helpers', () => {
]);
});
it('detects an assistant anywhere in the last signing step (groups)', () => {
expect(
isAssistantLastSigner([
{ role: RecipientRole.SIGNER, signingOrder: 1 },
{ role: RecipientRole.ASSISTANT, signingOrder: 2 },
{ role: RecipientRole.SIGNER, signingOrder: 2 },
]),
).toBe(true);
expect(
isAssistantLastSigner([
{ role: RecipientRole.ASSISTANT, signingOrder: 1 },
{ role: RecipientRole.SIGNER, signingOrder: 1 },
{ role: RecipientRole.SIGNER, signingOrder: 2 },
]),
).toBe(false);
});
it('checks whether the last non-CC recipient is an assistant', () => {
expect(
isAssistantLastSigner([