File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1047,5 +1047,39 @@ describe('Validation.vue - Business Logic', () => {
10471047 expect ( wrapper . vm . document ) . toBe ( null )
10481048 expect ( wrapper . vm . validationErrorMessage ) . toBe ( 'Failed to validate document' )
10491049 } )
1050+
1051+ it ( 'rejects document payload when metadata dimensions are malformed' , ( ) => {
1052+ wrapper . vm . handleValidationSuccess ( createLoadedValidationDocument ( {
1053+ metadata : {
1054+ extension : 'pdf' ,
1055+ p : 1 ,
1056+ d : [ { w : '100' , h : 200 } ] ,
1057+ } ,
1058+ } ) )
1059+
1060+ expect ( wrapper . vm . document ) . toBe ( null )
1061+ expect ( wrapper . vm . validationErrorMessage ) . toBe ( 'Failed to validate document' )
1062+ } )
1063+
1064+ it ( 'rejects document payload when signer extended validation fields have invalid types' , ( ) => {
1065+ wrapper . vm . handleValidationSuccess ( createLoadedValidationDocument ( {
1066+ signers : [ {
1067+ signRequestId : 1 ,
1068+ displayName : 'Signer' ,
1069+ email : 'signer@example.com' ,
1070+ signed : null ,
1071+ status : 1 ,
1072+ statusText : 'Pending' ,
1073+ description : null ,
1074+ request_sign_date : '2026-01-01T00:00:00Z' ,
1075+ me : false ,
1076+ visibleElements : [ ] ,
1077+ signature_validation : { id : '1' , label : 'Valid' } ,
1078+ } ] ,
1079+ } ) )
1080+
1081+ expect ( wrapper . vm . document ) . toBe ( null )
1082+ expect ( wrapper . vm . validationErrorMessage ) . toBe ( 'Failed to validate document' )
1083+ } )
10501084 } )
10511085} )
You can’t perform that action at this time.
0 commit comments