All files / CustomProperties/Edit testResources.js

100% Statements 15/15
100% Branches 0/0
100% Functions 11/11
100% Lines 13/13

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63    26x 14x   2x           6x 4x         6x 8x               12x               14x               16x             4x 20x       2x                
import { customProperties, refdata } from '../../../../test/jest';
 
const agreementStatusRefdata = refdata?.find(rdc => rdc.desc === 'SubscriptionAgreement.AgreementStatus');
const licenseAmendmentStatusRefdata = refdata?.find(rdc => rdc.desc === 'LicenseAmendmentStatus.Status');
 
const value = {
  AuthorIdentification: [{
    id: 2,
    internal: true,
    publicNote: 'this is a public note',
    note: 'this is an internal note',
    value: agreementStatusRefdata?.values?.find(rdv => rdv.value === 'active'),
    type: customProperties?.find(cp => cp.name === 'AuthorIdentification')
  }],
  Test: [{
    id: 4,
    internal: true,
    value: agreementStatusRefdata?.values?.find(rdv => rdv.value === 'active'),
    type: customProperties?.find(cp => cp.name === 'Test')
  }],
  decimal: [{
    id: 8,
    publicNote: 'decimal',
    note: 'decimal',
    internal: true,
    value: 1,
    type: customProperties?.find(cp => cp.name === 'decimal')
  }],
  integer: [{
    id: 6,
    publicNote: 'Integer',
    note: 'Integer',
    internal: true,
    value: 1,
    type: customProperties?.find(cp => cp.name === 'integer')
  }],
  text: [{
    id: 7,
    publicNote: 'text',
    note: 'text',
    internal: true,
    value: 'text',
    type: customProperties?.find(cp => cp.name === 'text')
  }],
  Refdata: [{
    id: 5,
    publicNote: 'refdata',
    note: 'refdata',
    internal: true,
    value: licenseAmendmentStatusRefdata?.values?.find(rdv => rdv.value === 'current'),
    type: customProperties?.find(cp => cp.name === 'Refdata')
  }]
};
 
const initialValues = {
  customProperties: value
};
 
export {
  value,
  initialValues
};