INSR-10447: Add accountUserId to claim registration for client 900040
This commit is contained in:
parent
5d76cbc57d
commit
e046298446
2 changed files with 35 additions and 7 deletions
|
|
@ -7,4 +7,6 @@ export function updateClaimRegistrationPayload(payload, order) {
|
||||||
offeredItac: isITAC.toString(),
|
offeredItac: isITAC.toString(),
|
||||||
qualifiedForItac: isITAC.toString()
|
qualifiedForItac: isITAC.toString()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
payload.accountUserId = '0000001';
|
||||||
}
|
}
|
||||||
|
|
@ -21,13 +21,13 @@ describe('coverage-helper.js', () => {
|
||||||
|
|
||||||
jest.clearAllMocks();
|
jest.clearAllMocks();
|
||||||
});
|
});
|
||||||
describe.each([
|
describe('custom claim registration for client 900040', () => {
|
||||||
[900040, true],
|
test.each([
|
||||||
[900040, false],
|
[900040, true],
|
||||||
['900040', true],
|
[900040, false],
|
||||||
['900040', false]
|
['900040', true],
|
||||||
])('custom claim registration for client 900040', (parentAccountNumber, isITAC) => {
|
['900040', false]
|
||||||
test(`Sets additionalInfo fields when parent account is ${parentAccountNumber} and isITAC is ${isITAC}`, async () => {
|
])(`Sets additionalInfo fields when parent account is %s and isITAC is %s`, async (parentAccountNumber, isITAC) => {
|
||||||
// Arrange
|
// Arrange
|
||||||
const payload = {};
|
const payload = {};
|
||||||
mockStore.order.parentAccountNumber = parentAccountNumber;
|
mockStore.order.parentAccountNumber = parentAccountNumber;
|
||||||
|
|
@ -42,6 +42,19 @@ describe('coverage-helper.js', () => {
|
||||||
qualifiedForItac: isITAC.toString()
|
qualifiedForItac: isITAC.toString()
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('Sets accountUserId when parent account is 900040', async () => {
|
||||||
|
// Arrange
|
||||||
|
const payload = {};
|
||||||
|
mockStore.order.parentAccountNumber = 900040;
|
||||||
|
mockStore.order.insuranceCoverage.coverageType = coverageType.ITAC;
|
||||||
|
|
||||||
|
// Act
|
||||||
|
await updateClientSpecificFieldsForClaimRegistration(payload, mockStore.order);
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
expect(payload.accountUserId).toBe('0000001');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test('Does not set additionalInfo when parent account is not 900040', async () => {
|
test('Does not set additionalInfo when parent account is not 900040', async () => {
|
||||||
|
|
@ -56,5 +69,18 @@ describe('coverage-helper.js', () => {
|
||||||
// Assert
|
// Assert
|
||||||
expect(payload.additionalInfo).toBeUndefined();
|
expect(payload.additionalInfo).toBeUndefined();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('Does not set accountUserId when parent account is not 900040', async () => {
|
||||||
|
// Arrange
|
||||||
|
const payload = {};
|
||||||
|
mockStore.order.parentAccountNumber = 123456;
|
||||||
|
mockStore.order.insuranceCoverage.coverageType = coverageType.ITAC;
|
||||||
|
|
||||||
|
// Act
|
||||||
|
await updateClientSpecificFieldsForClaimRegistration(payload, mockStore.order);
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
expect(payload.accountUserId).toBeUndefined();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue