diff --git a/src/layouts/quote/service-package-question/service-package-question.spec.js b/src/layouts/quote/service-package-question/service-package-question.spec.js index 043037995..a9d8e6938 100644 --- a/src/layouts/quote/service-package-question/service-package-question.spec.js +++ b/src/layouts/quote/service-package-question/service-package-question.spec.js @@ -49,14 +49,14 @@ describe("service-package-question.vue", () => { const packageNameKey = "05_01_CSR_Quote_Standard_Repair"; Object.assign(processedCmsContent, mockProcessedCmsContent[packageNameKey]); }); - it("should emit captured value", () => { + it("should emit relevant VAPS items in an array", () => { // Arrange const wrapper = setupMocks({}); // Act - wrapper.componentVM.selectedValues = "newValue"; + wrapper.componentVM.selectedValues = "TierThree"; // Assert - expect(wrapper.emitted()["update:modelValue"][0][0]).toEqual("newValue"); + expect(wrapper.emitted()["update:modelValue"][0][0]).toEqual([{"description": null, "partNumber": "RAIN DEFENSE", "partType": "RAIN DEFENSE", "price": 35.5}]); }); it("should have the correct insurance pricing text when insurance is selected", () => { // Arrange diff --git a/src/store/index.js b/src/store/index.js index 825ad75be..fc7c02402 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -451,7 +451,11 @@ export const getters = { "partNumber" ), ...getNonFalseValuesOfPropertyInArrayOfObjects( - state.order.lineItems.otherParts, + state.order.lineItems.supportingItems, + "partNumber" + ), + ...getNonFalseValuesOfPropertyInArrayOfObjects( + state.order.lineItems.vaps, "partNumber" ), ], @@ -461,10 +465,6 @@ export const getters = { state.order.lineItems.glassParts, "recalibrationType" ), - ...getNonFalseValuesOfPropertyInArrayOfObjects( - state.order.lineItems.otherParts, - "recalibrationType" - ), ], }; }, diff --git a/src/store/store.spec.js b/src/store/store.spec.js index 7ca65cc74..0a7c97c29 100644 --- a/src/store/store.spec.js +++ b/src/store/store.spec.js @@ -476,21 +476,6 @@ describe("Actions", () => { expect(response.data).toEqual("43201"); }); - it("resetVehicleAndDependencies action", async () => { - // Arrange - const context = state; - const commit = jest.fn(); - - context.commit = commit; - - // Act - await actions.resetVehicleAndDependencies(context); - - expect(commit).toBeCalledWith(storeMutations.RESET_VEHICLE_STATE); - expect(commit).toBeCalledWith(storeMutations.RESET_DAMAGE_STATE); - expect(commit).toBeCalledWith(storeMutations.RESET_REGISTRATION_STATE); - }); - it("resetDamageAndDependencies action", async () => { // Arrange const context = state; @@ -2409,7 +2394,8 @@ describe("Getters", () => { funnelParentAccountNumber: "999999", funnelIsCoverageVerified: true, funnelGlassParts: null, - funnelOtherParts: null, + funnelSupportingItems: null, + funnelVaps: null, funnelGlassToReplace: null, }; @@ -2432,7 +2418,8 @@ describe("Getters", () => { mockStateValues.funnelIsCoverageVerified ); mutations.updateGlassParts(storeState, mockStateValues.funnelGlassParts); - mutations.updateOtherParts(storeState, mockStateValues.funnelOtherParts); + mutations.updateSupportingItems(storeState, mockStateValues.funnelSupportingItems); + mutations.updateVaps(storeState, mockStateValues.funnelVaps); mutations.updateGlassToReplace(storeState, mockStateValues.funnelGlassToReplace); //Assert @@ -2500,7 +2487,8 @@ describe("Getters", () => { mockStateValues.funnelIsCoverageVerified ); mutations.updateGlassParts(storeState, mockStateValues.funnelGlassParts); - mutations.updateOtherParts(storeState, mockStateValues.funnelOtherParts); + mutations.updateSupportingItems(storeState, mockStateValues.funnelSupportingItems); + mutations.updateVaps(storeState, mockStateValues.funnelVaps); mutations.updateGlassToReplace(storeState, mockStateValues.funnelGlassToReplace); //Assert @@ -2578,7 +2566,8 @@ describe("Getters", () => { mutations.updateParentAcctNumber(storeState, mockStateValues.parentAccountNumber); mutations.updateInsuranceVerifiedStatus(storeState, mockStateValues.isCoverageVerified); mutations.updateGlassParts(storeState, mockStateValues.glassParts); - mutations.updateOtherParts(storeState, mockStateValues.otherParts); + mutations.updateSupportingItems(storeState, mockStateValues.funnelSupportingItems); + mutations.updateVaps(storeState, mockStateValues.funnelVaps); mutations.updateGlassToReplace(storeState, mockStateValues.glassToReplace); //Assert @@ -2682,7 +2671,8 @@ describe("Getters", () => { mutations.updateParentAcctNumber(storeState, mockStateValues.parentAccountNumber); mutations.updateInsuranceVerifiedStatus(storeState, mockStateValues.isCoverageVerified); mutations.updateGlassParts(storeState, mockStateValues.glassParts); - mutations.updateOtherParts(storeState, mockStateValues.otherParts); + mutations.updateSupportingItems(storeState, mockStateValues.funnelSupportingItems); + mutations.updateVaps(storeState, mockStateValues.funnelVaps); mutations.updateGlassToReplace(storeState, mockStateValues.glassToReplace); //Assert