From 6ba3a55274fc14288a51b98810e342d7cc8747e6 Mon Sep 17 00:00:00 2001 From: Alex Humphries Date: Mon, 20 Jul 2026 11:44:17 -0400 Subject: [PATCH] INSR-10442: Remove debug logging, update some tests --- .../client-mappers/Client900040Coverage.js | 1 - src/helpers/coverage-helper.js | 6 +-- src/helpers/coverage-helper.spec.js | 46 ++++++++----------- 3 files changed, 19 insertions(+), 34 deletions(-) diff --git a/src/helpers/client-mappers/Client900040Coverage.js b/src/helpers/client-mappers/Client900040Coverage.js index b85ba1c0..bed99f42 100644 --- a/src/helpers/client-mappers/Client900040Coverage.js +++ b/src/helpers/client-mappers/Client900040Coverage.js @@ -1,7 +1,6 @@ import { useMainStore } from "@/store"; export function updateClaimRegistrationPayload(payload) { - console.log(`updating payload for USAA`) const mainStore = useMainStore(); payload.additionalInfo = { offeredItac: mainStore.isITAC ? 'true' : 'false', diff --git a/src/helpers/coverage-helper.js b/src/helpers/coverage-helper.js index 61177121..32d2b18e 100644 --- a/src/helpers/coverage-helper.js +++ b/src/helpers/coverage-helper.js @@ -3,12 +3,8 @@ import { useMainStore } from "@/store"; export async function updateClientSpecificFieldsForClaimRegistration(payload) { const mainStore = useMainStore(); try { - console.log(`Updating client-specific fields for claim registration for parent account number: ${mainStore.order.parentAccountNumber}`); const clientMapper = await import(`@/helpers/client-mappers/Client${mainStore.order.parentAccountNumber}Coverage.js`); - console.log(`Loaded client mapper: ${clientMapper}`); clientMapper.updateClaimRegistrationPayload(payload); } - catch (error) { - console.error('Error updating client-specific fields for claim registration:', error); - } + catch (error) { } } \ No newline at end of file diff --git a/src/helpers/coverage-helper.spec.js b/src/helpers/coverage-helper.spec.js index fd1fb2bc..4bdac1c5 100644 --- a/src/helpers/coverage-helper.spec.js +++ b/src/helpers/coverage-helper.spec.js @@ -18,36 +18,26 @@ 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 () => { + // Arrange + const payload = {}; + mockStore.order.parentAccountNumber = parentAccountNumber; + mockStore.isITAC = isITAC; - test('Sets additionalInfo fields when parent account is 900040 and isITAC is true', async () => { - // Arrange - const payload = {}; - mockStore.order.parentAccountNumber = 900040; - mockStore.isITAC = true; + // Act + await updateClientSpecificFieldsForClaimRegistration(payload); - // Act - await updateClientSpecificFieldsForClaimRegistration(payload); - - // Assert - expect(payload.additionalInfo).toEqual({ - offeredItac: 'true', - qualifiedForItac: 'true' - }); - }); - - test('Sets additionalInfo fields when parent account is 900040 and isITAC is false', async () => { - // Arrange - const payload = {}; - mockStore.order.parentAccountNumber = 900040; - mockStore.isITAC = false; - - // Act - await updateClientSpecificFieldsForClaimRegistration(payload); - - // Assert - expect(payload.additionalInfo).toEqual({ - offeredItac: 'false', - qualifiedForItac: 'false' + // Assert + expect(payload.additionalInfo).toEqual({ + offeredItac: isITAC.toString(), + qualifiedForItac: isITAC.toString() + }); }); });