INSR-10447: Add accountUserId to claim registration for client 900040

This commit is contained in:
Alex Humphries 2026-07-21 11:27:32 -04:00
parent 5d76cbc57d
commit e046298446
2 changed files with 35 additions and 7 deletions

View file

@ -7,4 +7,6 @@ export function updateClaimRegistrationPayload(payload, order) {
offeredItac: isITAC.toString(),
qualifiedForItac: isITAC.toString()
};
payload.accountUserId = '0000001';
}

View file

@ -21,13 +21,13 @@ describe('coverage-helper.js', () => {
jest.clearAllMocks();
});
describe.each([
[900040, true],
[900040, false],
['900040', true],
['900040', false]
])('custom claim registration for client 900040', (parentAccountNumber, isITAC) => {
test(`Sets additionalInfo fields when parent account is ${parentAccountNumber} and isITAC is ${isITAC}`, async () => {
describe('custom claim registration for client 900040', () => {
test.each([
[900040, true],
[900040, false],
['900040', true],
['900040', false]
])(`Sets additionalInfo fields when parent account is %s and isITAC is %s`, async (parentAccountNumber, isITAC) => {
// Arrange
const payload = {};
mockStore.order.parentAccountNumber = parentAccountNumber;
@ -42,6 +42,19 @@ describe('coverage-helper.js', () => {
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 () => {
@ -56,5 +69,18 @@ describe('coverage-helper.js', () => {
// Assert
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();
});
});
});