Merge pull request #1308 from Safelite/feature/humphries/INSR-10447

INSR-10447: Add accountUserId to claim registration for client 900040
This commit is contained in:
AHumphriesSL 2026-07-21 13:17:32 -04:00 committed by GitHub
commit 46cef5c9ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 35 additions and 7 deletions

View file

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

View file

@ -21,13 +21,13 @@ describe('coverage-helper.js', () => {
jest.clearAllMocks(); jest.clearAllMocks();
}); });
describe.each([ describe('custom claim registration for client 900040', () => {
test.each([
[900040, true], [900040, true],
[900040, false], [900040, false],
['900040', true], ['900040', true],
['900040', false] ['900040', false]
])('custom claim registration for client 900040', (parentAccountNumber, isITAC) => { ])(`Sets additionalInfo fields when parent account is %s and isITAC is %s`, async (parentAccountNumber, isITAC) => {
test(`Sets additionalInfo fields when parent account is ${parentAccountNumber} and isITAC is ${isITAC}`, async () => {
// 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.each([900040, '900040'])('Sets accountUserId when parent account is %s', async (parentAccountNumber) => {
// Arrange
const payload = {};
mockStore.order.parentAccountNumber = parentAccountNumber;
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.each([123456, '123456'])('Does not set accountUserId when parent account is not 900040 (parentAccountNumber=%s)', async (parentAccountNumber) => {
// Arrange
const payload = {};
mockStore.order.parentAccountNumber = parentAccountNumber;
mockStore.order.insuranceCoverage.coverageType = coverageType.ITAC;
// Act
await updateClientSpecificFieldsForClaimRegistration(payload, mockStore.order);
// Assert
expect(payload.accountUserId).toBeUndefined();
});
}); });
}); });