diff --git a/src/fmg-components/cart/cart.spec.js b/src/fmg-components/cart/cart.spec.js index 4734143bf..6cec9ed3b 100644 --- a/src/fmg-components/cart/cart.spec.js +++ b/src/fmg-components/cart/cart.spec.js @@ -120,20 +120,20 @@ describe("cart.vue", () => { expect(found).toBe(true); }); - test("if there is Rain Defense on the order, a rain defense cart item should be added to the cart", () => { + test("if there is Rain Repel on the order, a rain repel cart item should be added to the cart", () => { // Arrange const lineItems = { glassParts: [], supportingItems: [], vaps: [ { - cartItemType: "RAIN DEFENSE", + cartItemType: "RAIN REPEL", description: null, kitPrice: 0, laborAmount: 0, listPrice: "44.99", - partNumber: "RAIN DEFENSE", - partType: "RAIN DEFENSE", + partNumber: "RAIN REPEL", + partType: "RAIN REPEL", salesTax: 3.37, sellingPrice: 44.99, }, @@ -152,13 +152,13 @@ describe("cart.vue", () => { }); // Assert - expect(wrapper.vm.rainDefenseCartItem).not.toBeNull(); - expect(wrapper.vm.rainDefenseCartItem.subTotal).toEqual(44.99); - expect(wrapper.vm.rainDefenseCartItem.salesTax).toEqual(3.37); + expect(wrapper.vm.rainRepelCartItem).not.toBeNull(); + expect(wrapper.vm.rainRepelCartItem.subTotal).toEqual(44.99); + expect(wrapper.vm.rainRepelCartItem.salesTax).toEqual(3.37); const found = wrapper.vm.cartItems.findIndex( - (cartItem) => cartItem == wrapper.vm.rainDefenseCartItem + (cartItem) => cartItem == wrapper.vm.rainRepelCartItem ) >= 0; expect(found).toBe(true); }); diff --git a/src/helpers/promotions-helper.spec.js b/src/helpers/promotions-helper.spec.js index 3e8a1d9aa..0ccc6958b 100644 --- a/src/helpers/promotions-helper.spec.js +++ b/src/helpers/promotions-helper.spec.js @@ -188,11 +188,11 @@ describe("promotions-helper.js", () => { expect(nullAvailableLineItemsReturn).toEqual([]); expect(emptyAvailableLineItemsReturn).toEqual([]); }); - it("returns provided front wiper and rain defense items from availableLineItems", () => { + it("returns provided front wiper and rain repel items from availableLineItems", () => { // Arrange - const availableLineItemsWithFrontWipersAndRainDefense = [ + const availableLineItemsWithFrontWipersAndRainRepel = [ { partType: partTypeStrings.FRONT_WIPER }, - { partType: partTypeStrings.RAIN_DEFENSE }, + { partType: partTypeStrings.RAIN_REPEL }, { partType: partTypeStrings.REAR_WIPER }, { partType: partTypeStrings.RECALIBRATION }, { partType: partTypeStrings.REPLACE_FEE }, @@ -202,19 +202,19 @@ describe("promotions-helper.js", () => { // Act const addableVapsFromAvailableLineItems = promotionsHelper.getAddableVapsFromAvailableLineItems( - availableLineItemsWithFrontWipersAndRainDefense + availableLineItemsWithFrontWipersAndRainRepel ); // Assert const frontWiperParts = addableVapsFromAvailableLineItems.filter( (lineItem) => lineItem.partType == partTypeStrings.FRONT_WIPER ); - const rainDefenseParts = addableVapsFromAvailableLineItems.filter( - (lineItem) => lineItem.partType == partTypeStrings.RAIN_DEFENSE + const rainRepelParts = addableVapsFromAvailableLineItems.filter( + (lineItem) => lineItem.partType == partTypeStrings.RAIN_REPEL ); expect(addableVapsFromAvailableLineItems.length).toEqual(2); expect(frontWiperParts.length).toEqual(1); - expect(rainDefenseParts.length).toEqual(1); + expect(rainRepelParts.length).toEqual(1); }); }); describe("removeVapsPromosFromPromoArray", () => { @@ -243,7 +243,7 @@ describe("promotions-helper.js", () => { { partNumber: promotionsHelper.promoPartNumberStrings - .RAIN_DEFENSE_DISCOUNT_PART_NUMBER, + .RAIN_REPEL_DISCOUNT_PART_NUMBER, }, { partNumber: diff --git a/src/helpers/service-package-helper.js b/src/helpers/service-package-helper.js index 3a0ad2e7b..4144c44e7 100644 --- a/src/helpers/service-package-helper.js +++ b/src/helpers/service-package-helper.js @@ -100,7 +100,7 @@ export function getPackageContents(glassToReplace, availableLineItems, isRepair, vaps.push(partTypeStrings.REAR_WIPER); } - if (shouldRainDefenseBeAvailable(glassToReplace, availableLineItems, isRepair, targetTier)) { + if (shouldRainRepelBeAvailable(glassToReplace, availableLineItems, isRepair, targetTier)) { vaps.push(partTypeStrings.RAIN_REPEL); } @@ -160,7 +160,7 @@ export function shouldRearWipersBeAvailable( } } -export function shouldRainDefenseBeAvailable( +export function shouldRainRepelBeAvailable( glassToReplace, availableLineItems, isRepair, diff --git a/src/helpers/service-package-helper.spec.js b/src/helpers/service-package-helper.spec.js index abcafd82c..4c3d6eedd 100644 --- a/src/helpers/service-package-helper.spec.js +++ b/src/helpers/service-package-helper.spec.js @@ -11,9 +11,9 @@ describe("service-package-helper.js", () => { recalLineItem, driverFrontWiperLineItem, passengerFrontWiperLineItem, - rainDefenseLineItem, + rainRepelLineItem, ]; - const partType = partTypeStrings.RAIN_DEFENSE; + const partType = partTypeStrings.RAIN_REPEL; // Act const result = servicePackageHelper.containsLineItemWithPartType(partType, lineItems); @@ -28,7 +28,7 @@ describe("service-package-helper.js", () => { recalLineItem, driverFrontWiperLineItem, passengerFrontWiperLineItem, - rainDefenseLineItem, + rainRepelLineItem, ]; const partType = partTypeStrings.FRONT_WIPER; @@ -46,7 +46,7 @@ describe("service-package-helper.js", () => { driverFrontWiperLineItem, passengerFrontWiperLineItem, ]; - const partType = partTypeStrings.RAIN_DEFENSE; + const partType = partTypeStrings.RAIN_REPEL; // Act const result = servicePackageHelper.containsLineItemWithPartType(partType, lineItems); @@ -58,7 +58,7 @@ describe("service-package-helper.js", () => { it("Returns false with empty array", () => { // Arrange const lineItems = []; - const partType = partTypeStrings.RAIN_DEFENSE; + const partType = partTypeStrings.RAIN_REPEL; // Act const result = servicePackageHelper.containsLineItemWithPartType(partType, lineItems); @@ -75,9 +75,9 @@ describe("service-package-helper.js", () => { recalLineItem, driverFrontWiperLineItem, passengerFrontWiperLineItem, - rainDefenseLineItem, + rainRepelLineItem, ]; - const partType = partTypeStrings.RAIN_DEFENSE; + const partType = partTypeStrings.RAIN_REPEL; // Act const result = servicePackageHelper.findLineItemsWithPartType(partType, lineItems); @@ -94,7 +94,7 @@ describe("service-package-helper.js", () => { passengerFrontWiperLineItem, driverFrontWiperLineItem, ]; - const partType = partTypeStrings.RAIN_DEFENSE; + const partType = partTypeStrings.RAIN_REPEL; // Act const result = servicePackageHelper.findLineItemsWithPartType(partType, lineItems); @@ -109,7 +109,7 @@ describe("service-package-helper.js", () => { recalLineItem, driverFrontWiperLineItem, passengerFrontWiperLineItem, - rainDefenseLineItem, + rainRepelLineItem, ]; const partType = partTypeStrings.FRONT_WIPER; @@ -129,16 +129,16 @@ describe("service-package-helper.js", () => { recalLineItem, driverFrontWiperLineItem, passengerFrontWiperLineItem, - rainDefenseLineItem, + rainRepelLineItem, ]; - const partType = "rAin DEfenSe"; + const partType = "rAin REpeL"; // Act const result = servicePackageHelper.findLineItemsWithPartType(partType, lineItems); // Assert expect(result.length).toBe(1); - expect(result[0].partType).toEqual(partTypeStrings.RAIN_DEFENSE); + expect(result[0].partType).toEqual(partTypeStrings.RAIN_REPEL); }); }); @@ -149,17 +149,17 @@ describe("service-package-helper.js", () => { recalLineItem, driverFrontWiperLineItem, passengerFrontWiperLineItem, - rainDefenseLineItem, + rainRepelLineItem, ]; - const vapTypes = [partTypeStrings.RAIN_DEFENSE]; + const vapTypes = [partTypeStrings.RAIN_REPEL]; // Act const result = servicePackageHelper.getVapsLineItems(lineItems, vapTypes); // Assert expect(result.length).toBe(1); - expect(result[0].partType).toEqual(partTypeStrings.RAIN_DEFENSE); + expect(result[0].partType).toEqual(partTypeStrings.RAIN_REPEL); }); it("Returns all matching line items, when multiple match a single type", () => { @@ -168,7 +168,7 @@ describe("service-package-helper.js", () => { recalLineItem, driverFrontWiperLineItem, passengerFrontWiperLineItem, - rainDefenseLineItem, + rainRepelLineItem, ]; const vapTypes = [partTypeStrings.FRONT_WIPER]; @@ -185,7 +185,7 @@ describe("service-package-helper.js", () => { it("Returns only line items in the given set", () => { // Arrange - const lineItems = [recalLineItem, passengerFrontWiperLineItem, rainDefenseLineItem]; + const lineItems = [recalLineItem, passengerFrontWiperLineItem, rainRepelLineItem]; const vapTypes = [partTypeStrings.FRONT_WIPER]; @@ -200,9 +200,9 @@ describe("service-package-helper.js", () => { it("Returns all matching items when multiple vap types are requested", () => { // Arrange - const lineItems = [recalLineItem, passengerFrontWiperLineItem, rainDefenseLineItem]; + const lineItems = [recalLineItem, passengerFrontWiperLineItem, rainRepelLineItem]; - const vapTypes = [partTypeStrings.FRONT_WIPER, partTypeStrings.RAIN_DEFENSE]; + const vapTypes = [partTypeStrings.FRONT_WIPER, partTypeStrings.RAIN_REPEL]; // Act const result = servicePackageHelper.getVapsLineItems(lineItems, vapTypes); @@ -300,7 +300,7 @@ describe("service-package-helper.js", () => { // Arrange const damageLocations = [sideGlass]; - const availableLineItems = [rainDefenseLineItem]; + const availableLineItems = [rainRepelLineItem]; // Act const results = servicePackageHelper.getAvailablePackages( @@ -322,7 +322,7 @@ describe("service-package-helper.js", () => { const availableLineItems = [ driverFrontWiperLineItem, rearWiperLineItem, - rainDefenseLineItem, + rainRepelLineItem, ]; // Act @@ -619,12 +619,12 @@ describe("service-package-helper.js", () => { }); }); - describe("shouldRainDefenseBeAvailable", () => { + describe("shouldRainRepelBeAvailable", () => { it("Should generally be available only in tier 3", () => { // Arrange const damageLocations = [frontWindshieldGlass]; const availableLineItems = [ - rainDefenseLineItem, + rainRepelLineItem, driverFrontWiperLineItem, rearWiperLineItem, recalLineItem, @@ -632,19 +632,19 @@ describe("service-package-helper.js", () => { const isRepair = false; // Act - const resultOne = servicePackageHelper.shouldRainDefenseBeAvailable( + const resultOne = servicePackageHelper.shouldRainRepelBeAvailable( damageLocations, availableLineItems, isRepair, packageNames.TIER_ONE ); - const resultTwo = servicePackageHelper.shouldRainDefenseBeAvailable( + const resultTwo = servicePackageHelper.shouldRainRepelBeAvailable( damageLocations, availableLineItems, isRepair, packageNames.TIER_TWO ); - const resultThree = servicePackageHelper.shouldRainDefenseBeAvailable( + const resultThree = servicePackageHelper.shouldRainRepelBeAvailable( damageLocations, availableLineItems, isRepair, @@ -662,7 +662,7 @@ describe("service-package-helper.js", () => { // SPECIFICALLY: no front windshield const damageLocations = [rearWindshieldGlass]; const availableLineItems = [ - rainDefenseLineItem, + rainRepelLineItem, driverFrontWiperLineItem, passengerFrontWiperLineItem, rearWiperLineItem, @@ -671,7 +671,7 @@ describe("service-package-helper.js", () => { const isRepair = false; // Act - const result = servicePackageHelper.shouldRainDefenseBeAvailable( + const result = servicePackageHelper.shouldRainRepelBeAvailable( damageLocations, availableLineItems, isRepair, @@ -692,7 +692,7 @@ describe("service-package-helper.js", () => { driverFrontWiperLineItem, passengerFrontWiperLineItem, rearWiperLineItem, - rainDefenseLineItem, + rainRepelLineItem, ]; const isRepair = false; @@ -702,7 +702,7 @@ describe("service-package-helper.js", () => { damageLocations, availableLineItems, isRepair, - partTypeStrings.RAIN_DEFENSE + partTypeStrings.RAIN_REPEL ); // Assert @@ -717,7 +717,7 @@ describe("service-package-helper.js", () => { driverFrontWiperLineItem, passengerFrontWiperLineItem, rearWiperLineItem, - rainDefenseLineItem, + rainRepelLineItem, ]; const isRepair = false; @@ -758,7 +758,7 @@ describe("service-package-helper.js", () => { damageLocations, availableLineItems, isRepair, - partTypeStrings.RAIN_DEFENSE + partTypeStrings.RAIN_REPEL ); // Assert @@ -774,13 +774,13 @@ describe("service-package-helper.js", () => { driverFrontWiperLineItem, passengerFrontWiperLineItem, rearWiperLineItem, - rainDefenseLineItem, + rainRepelLineItem, ]; const isRepair = false; const vaps = [ driverFrontWiperLineItem, passengerFrontWiperLineItem, - rainDefenseLineItem, + rainRepelLineItem, ]; // Act @@ -802,7 +802,7 @@ describe("service-package-helper.js", () => { driverFrontWiperLineItem, passengerFrontWiperLineItem, rearWiperLineItem, - rainDefenseLineItem, + rainRepelLineItem, ]; const isRepair = false; const vaps = [driverFrontWiperLineItem, passengerFrontWiperLineItem]; @@ -826,7 +826,7 @@ describe("service-package-helper.js", () => { driverFrontWiperLineItem, passengerFrontWiperLineItem, rearWiperLineItem, - rainDefenseLineItem, + rainRepelLineItem, ]; const isRepair = false; const vaps = []; @@ -850,7 +850,7 @@ describe("service-package-helper.js", () => { driverFrontWiperLineItem, passengerFrontWiperLineItem, rearWiperLineItem, - rainDefenseLineItem, + rainRepelLineItem, ]; const isRepair = false; const vaps = [recalLineItem]; @@ -876,13 +876,13 @@ describe("service-package-helper.js", () => { driverFrontWiperLineItem, passengerFrontWiperLineItem, rearWiperLineItem, - rainDefenseLineItem, + rainRepelLineItem, ]; const isRepair = false; const vaps = [ driverFrontWiperLineItem, passengerFrontWiperLineItem, - rainDefenseLineItem, + rainRepelLineItem, rearWiperLineItem, ]; @@ -905,7 +905,7 @@ describe("service-package-helper.js", () => { driverFrontWiperLineItem, passengerFrontWiperLineItem, rearWiperLineItem, - rainDefenseLineItem, + rainRepelLineItem, ]; const isRepair = false; const vaps = [driverFrontWiperLineItem, passengerFrontWiperLineItem]; @@ -929,10 +929,10 @@ describe("service-package-helper.js", () => { driverFrontWiperLineItem, passengerFrontWiperLineItem, rearWiperLineItem, - rainDefenseLineItem, + rainRepelLineItem, ]; const isRepair = false; - const vaps = [rainDefenseLineItem]; + const vaps = [rainRepelLineItem]; // Act const result = servicePackageHelper.getHighestFullySatisfiedTier( @@ -953,7 +953,7 @@ describe("service-package-helper.js", () => { driverFrontWiperLineItem, passengerFrontWiperLineItem, rearWiperLineItem, - rainDefenseLineItem, + rainRepelLineItem, ]; const isRepair = false; const vaps = []; @@ -1003,10 +1003,10 @@ const rearWiperLineItem = { price: 24.48, }; -const rainDefenseLineItem = { - partNumber: "RAIN DEFENSE", +const rainRepelLineItem = { + partNumber: "RAIN REPEL", description: null, - partType: "RAIN DEFENSE", + partType: "RAIN REPEL", price: 35.5, }; diff --git a/src/layouts/payment-method/review-dropdown/review-sections/service-package-review/service-package-review.spec.js b/src/layouts/payment-method/review-dropdown/review-sections/service-package-review/service-package-review.spec.js index 00fff34ee..ef2c15ef2 100644 --- a/src/layouts/payment-method/review-dropdown/review-sections/service-package-review/service-package-review.spec.js +++ b/src/layouts/payment-method/review-dropdown/review-sections/service-package-review/service-package-review.spec.js @@ -27,7 +27,7 @@ const testConstants = { vapsCopy: { frontWiperCopy: "Front Wiper copy", rearWiperCopy: "Rear Wiper copy", - rainDefenseCopy: "Rain defense copy", + RepelCopy: "Rain repel copy", }, parts: { frontWiperPart: { @@ -42,10 +42,10 @@ const testConstants = { partType: "REAR WIPER", price: 24.48, }, - rainDefensePart: { - partNumber: "RAIN DEFENSE", + rainRepelPart: { + partNumber: "RAIN REPEL", description: null, - partType: "RAIN DEFENSE", + partType: "RAIN REPEL", price: 35.5, }, recalPart: { @@ -78,7 +78,7 @@ const figmaScenarios = [ name: "05_01_CSR_Quote_Cash", params: { wiperResponse: [testConstants.parts.frontWiperPart, testConstants.parts.rearWiperPart], - rainDefenseResponse: testConstants.parts.rainDefensePart, + rainRepelResponse: testConstants.parts.rainRepelPart, damage: { isRepair: false, glassToReplace: [testConstants.damages.frontWindshield], @@ -109,7 +109,7 @@ const figmaScenarios = [ { name: "Premium", vapsCombo: [ - testConstants.parts.rainDefensePart, + testConstants.parts.rainRepelPart, testConstants.parts.frontWiperPart, ], expected: { @@ -117,7 +117,7 @@ const figmaScenarios = [ displayContent: [ ...testConstants.defaultItemCopy.defaultItemCopyArray, testConstants.vapsCopy.frontWiperCopy, - testConstants.vapsCopy.rainDefenseCopy, + testConstants.vapsCopy.rainRepelCopy, ], }, }, @@ -140,7 +140,7 @@ const figmaScenarios = [ name: "05_01_CSR_Quote_Standard_Repair", params: { wiperResponse: [testConstants.parts.frontWiperPart, testConstants.parts.rearWiperPart], - rainDefenseResponse: testConstants.parts.rainDefensePart, + rainRepelResponse: testConstants.parts.rainRepelPart, damage: { isRepair: true, glassToReplace: [], @@ -171,7 +171,7 @@ const figmaScenarios = [ { name: "Premium", vapsCombo: [ - testConstants.parts.rainDefensePart, + testConstants.parts.rainRepelPart, testConstants.parts.frontWiperPart, ], expected: { @@ -179,7 +179,7 @@ const figmaScenarios = [ displayContent: [ ...testConstants.defaultItemCopy.defaultItemCopyArray, testConstants.vapsCopy.frontWiperCopy, - testConstants.vapsCopy.rainDefenseCopy, + testConstants.vapsCopy.rainRepelCopy, ], }, }, @@ -201,7 +201,7 @@ const figmaScenarios = [ name: "05_01_CSR_Quote_Recal", params: { wiperResponse: [testConstants.parts.frontWiperPart, testConstants.parts.rearWiperPart], - rainDefenseResponse: testConstants.parts.rainDefensePart, + rainRepelResponse: testConstants.parts.rainRepelPart, damage: { isRepair: false, glassToReplace: [testConstants.damages.frontWindshield], @@ -232,7 +232,7 @@ const figmaScenarios = [ { name: "Premium", vapsCombo: [ - testConstants.parts.rainDefensePart, + testConstants.parts.rainRepelPart, testConstants.parts.frontWiperPart, ], expected: { @@ -240,7 +240,7 @@ const figmaScenarios = [ displayContent: [ ...testConstants.defaultItemCopy.defaultItemCopyArray, testConstants.vapsCopy.frontWiperCopy, - testConstants.vapsCopy.rainDefenseCopy, + testConstants.vapsCopy.rainRepelCopy, ], }, }, @@ -263,7 +263,7 @@ const figmaScenarios = [ name: "05_01_CSR_Quote_RearGlass+NonWindshield", params: { wiperResponse: [testConstants.parts.frontWiperPart, testConstants.parts.rearWiperPart], - rainDefenseResponse: testConstants.parts.rainDefensePart, + rainRepelResponse: testConstants.parts.rainRepelPart, damage: { isRepair: false, glassToReplace: [testConstants.damages.rearWindshield], @@ -303,14 +303,14 @@ const figmaScenarios = [ }, }, { - name: "Standard+RainDefense", - vapsCombo: [testConstants.parts.rearWiperPart, testConstants.parts.rainDefensePart], + name: "Standard+RainRepel", + vapsCombo: [testConstants.parts.rearWiperPart, testConstants.parts.rainRepelPart], expected: { packageNameWidget: testConstants.widgetNames.tierTwoTitle, displayContent: [ ...testConstants.defaultItemCopy.defaultItemCopyArray, testConstants.vapsCopy.rearWiperCopy, - testConstants.vapsCopy.rainDefenseCopy, + testConstants.vapsCopy.rainRepelCopy, ], }, }, @@ -332,7 +332,7 @@ const figmaScenarios = [ name: "05_01_CSR_Quote_RearGlass+Windshield", params: { wiperResponse: [testConstants.parts.frontWiperPart, testConstants.parts.rearWiperPart], - rainDefenseResponse: testConstants.parts.rainDefensePart, + rainRepelResponse: testConstants.parts.rainRepelPart, damage: { isRepair: false, glassToReplace: [ @@ -375,40 +375,40 @@ const figmaScenarios = [ }, }, { - name: "Economy+RainDefense", - vapsCombo: [testConstants.parts.rainDefensePart], + name: "Economy+RainRepel", + vapsCombo: [testConstants.parts.rainRepelPart], expected: { packageNameWidget: testConstants.widgetNames.tierOneTitle, displayContent: [ ...testConstants.defaultItemCopy.defaultItemCopyArray, - testConstants.vapsCopy.rainDefenseCopy, + testConstants.vapsCopy.rainRepelCopy, ], }, }, { - name: "Economy+Frontwiper+RainDefense", + name: "Economy+Frontwiper+RainRepel", vapsCombo: [ testConstants.parts.frontWiperPart, - testConstants.parts.rainDefensePart, + testConstants.parts.rainRepelPart, ], expected: { packageNameWidget: testConstants.widgetNames.tierOneTitle, displayContent: [ ...testConstants.defaultItemCopy.defaultItemCopyArray, testConstants.vapsCopy.frontWiperCopy, - testConstants.vapsCopy.rainDefenseCopy, + testConstants.vapsCopy.rainRepelCopy, ], }, }, { - name: "Economy+Rearwiper+RainDefense", - vapsCombo: [testConstants.parts.rearWiperPart, testConstants.parts.rainDefensePart], + name: "Economy+Rearwiper+RainRepel", + vapsCombo: [testConstants.parts.rearWiperPart, testConstants.parts.rainRepelPart], expected: { packageNameWidget: testConstants.widgetNames.tierOneTitle, displayContent: [ ...testConstants.defaultItemCopy.defaultItemCopyArray, testConstants.vapsCopy.rearWiperCopy, - testConstants.vapsCopy.rainDefenseCopy, + testConstants.vapsCopy.rainRepelCopy, ], }, }, @@ -429,7 +429,7 @@ const figmaScenarios = [ vapsCombo: [ testConstants.parts.rearWiperPart, testConstants.parts.frontWiperPart, - testConstants.parts.rainDefensePart, + testConstants.parts.rainRepelPart, ], expected: { packageNameWidget: testConstants.widgetNames.tierThreeTitle, @@ -437,7 +437,7 @@ const figmaScenarios = [ ...testConstants.defaultItemCopy.defaultItemCopyArray, testConstants.vapsCopy.frontWiperCopy, testConstants.vapsCopy.rearWiperCopy, - testConstants.vapsCopy.rainDefenseCopy, + testConstants.vapsCopy.rainRepelCopy, ], }, }, @@ -447,7 +447,7 @@ const figmaScenarios = [ name: "05_01_CSR_Quote_RearGlassNoFrontFit", params: { wiperResponse: [testConstants.parts.rearWiperPart], - rainDefenseResponse: testConstants.parts.rainDefensePart, + rainRepelResponse: testConstants.parts.rainRepelPart, damage: { isRepair: false, glassToReplace: [testConstants.damages.rearWindshield], @@ -465,13 +465,13 @@ const figmaScenarios = [ }, }, { - name: "Economy+Raindefense", - vapsCombo: [testConstants.parts.rainDefensePart], + name: "Economy+Rainrepel", + vapsCombo: [testConstants.parts.rainRepelPart], expected: { packageNameWidget: testConstants.widgetNames.tierOneTitle, displayContent: [ ...testConstants.defaultItemCopy.defaultItemCopyArray, - testConstants.vapsCopy.rainDefenseCopy, + testConstants.vapsCopy.rainRepelCopy, ], }, }, @@ -488,13 +488,13 @@ const figmaScenarios = [ }, { name: "Premium", - vapsCombo: [testConstants.parts.rearWiperPart, testConstants.parts.rainDefensePart], + vapsCombo: [testConstants.parts.rearWiperPart, testConstants.parts.rainRepelPart], expected: { packageNameWidget: testConstants.widgetNames.tierThreeTitle, displayContent: [ ...testConstants.defaultItemCopy.defaultItemCopyArray, testConstants.vapsCopy.rearWiperCopy, - testConstants.vapsCopy.rainDefenseCopy, + testConstants.vapsCopy.rainRepelCopy, ], }, }, @@ -505,7 +505,7 @@ const figmaScenarios = [ name: "05_01_CSR_Quote_Windshield+SideGlass", params: { wiperResponse: [testConstants.parts.frontWiperPart, testConstants.parts.rearWiperPart], - rainDefenseResponse: testConstants.parts.rainDefensePart, + rainRepelResponse: testConstants.parts.rainRepelPart, damage: { isRepair: false, glassToReplace: [ @@ -539,7 +539,7 @@ const figmaScenarios = [ { name: "Premium", vapsCombo: [ - testConstants.parts.rainDefensePart, + testConstants.parts.rainRepelPart, testConstants.parts.frontWiperPart, ], expected: { @@ -547,7 +547,7 @@ const figmaScenarios = [ displayContent: [ ...testConstants.defaultItemCopy.defaultItemCopyArray, testConstants.vapsCopy.frontWiperCopy, - testConstants.vapsCopy.rainDefenseCopy, + testConstants.vapsCopy.rainRepelCopy, ], }, }, @@ -570,7 +570,7 @@ const figmaScenarios = [ name: "05_01_CSR_Quote_SideGlass", params: { wiperResponse: [testConstants.parts.frontWiperPart, testConstants.parts.rearWiperPart], - rainDefenseResponse: testConstants.parts.rainDefensePart, + rainRepelResponse: testConstants.parts.rainRepelPart, damage: { isRepair: false, glassToReplace: [testConstants.damages.sideGlass], @@ -599,13 +599,13 @@ const figmaScenarios = [ }, }, { - name: "Economy+RainDefense", - vapsCombo: [testConstants.parts.rainDefensePart], + name: "Economy+RainRepel", + vapsCombo: [testConstants.parts.rainRepelPart], expected: { packageNameWidget: testConstants.widgetNames.tierOneTitle, displayContent: [ ...testConstants.defaultItemCopy.defaultItemCopyArray, - testConstants.vapsCopy.rainDefenseCopy, + testConstants.vapsCopy.rainRepelCopy, ], }, }, @@ -623,7 +623,7 @@ const figmaScenarios = [ { name: "Premium", vapsCombo: [ - testConstants.parts.rainDefensePart, + testConstants.parts.rainRepelPart, testConstants.parts.frontWiperPart, ], expected: { @@ -631,14 +631,14 @@ const figmaScenarios = [ displayContent: [ ...testConstants.defaultItemCopy.defaultItemCopyArray, testConstants.vapsCopy.frontWiperCopy, - testConstants.vapsCopy.rainDefenseCopy, + testConstants.vapsCopy.rainRepelCopy, ], }, }, { name: "Premium+Rearwiper", vapsCombo: [ - testConstants.parts.rainDefensePart, + testConstants.parts.rainRepelPart, testConstants.parts.frontWiperPart, testConstants.parts.rearWiperPart, ], @@ -648,7 +648,7 @@ const figmaScenarios = [ ...testConstants.defaultItemCopy.defaultItemCopyArray, testConstants.vapsCopy.frontWiperCopy, testConstants.vapsCopy.rearWiperCopy, - testConstants.vapsCopy.rainDefenseCopy, + testConstants.vapsCopy.rainRepelCopy, ], }, }, @@ -659,7 +659,7 @@ const figmaScenarios = [ name: "05_01_CSR_Quote_NoWiperFit", params: { wiperResponse: [], - rainDefenseResponse: testConstants.parts.rainDefensePart, + rainRepelResponse: testConstants.parts.rainRepelPart, damage: { isRepair: false, glassToReplace: [testConstants.damages.frontWindshield], @@ -678,12 +678,12 @@ const figmaScenarios = [ }, { name: "Premium", - vapsCombo: [testConstants.parts.rainDefensePart], + vapsCombo: [testConstants.parts.rainRepelPart], expected: { packageNameWidget: testConstants.widgetNames.tierThreeTitle, displayContent: [ ...testConstants.defaultItemCopy.defaultItemCopyArray, - testConstants.vapsCopy.rainDefenseCopy, + testConstants.vapsCopy.rainRepelCopy, ], }, }, @@ -771,8 +771,8 @@ describe("Service Package Review Block", () => { SubWidgetName: "", }, { - Name: partTypeStrings.RAIN_DEFENSE, - Text: testConstants.vapsCopy.rainDefenseCopy, + Name: partTypeStrings.RAIN_REPEL, + Text: testConstants.vapsCopy.rainRepelCopy, SubText: "", ImageId: testConstants.imageId, Image: "", @@ -783,20 +783,20 @@ describe("Service Package Review Block", () => { }; }); describe("General functionality", () => { - it('Should properly "Round Down" package tier', async () => { + it.only('Should properly "Round Down" package tier', async () => { // Slightly longer explanation: // Should only return the highest tier where *every* offered VAP is part of the order. // However, there may be vaps not offered in the qualifying tier. Hence rounding *down*. // - // I.e. Economy=[], Standard=[front wipers], Premium=[front wipers, rain defense]. - // Current vaps=[rain defense]. Though rain defense is in Premium, we don't satisfy it or standard. + // I.e. Economy=[], Standard=[front wipers], Premium=[front wipers, rain repel]. + // Current vaps=[rain repel]. Though rain repel is in Premium, we don't satisfy it or standard. // So our tier should still be Economy. // Should still display extra vaps. // Arrange let props = generateDefaultProps(); - props.lineItems.vaps = [testConstants.parts.rainDefensePart]; + props.lineItems.vaps = [testConstants.parts.rainRepelPart]; const { wrapper } = setupMocks({ propsData: props, @@ -810,10 +810,10 @@ describe("Service Package Review Block", () => { // Assert expect(wrapper.vm.packageNameWidget).toEqual(testConstants.widgetNames.tierOneTitle); - let containsRainDefenseCopy = wrapper.vm.displayContent.includes( - testConstants.vapsCopy.rainDefenseCopy + let containsRainRepelCopy = wrapper.vm.displayContent.includes( + testConstants.vapsCopy.rainRepelCopy ); - expect(containsRainDefenseCopy).toBe(true); + expect(containsRainRepelCopy).toBe(true); }); it("Should display all default items from cms", async () => { @@ -865,11 +865,11 @@ describe("Service Package Review Block", () => { const includesFrontWiperCopy = wrapper.vm.displayContent.includes( testConstants.vapsCopy.frontWiperCopy ); - const includesRainDefenseCopy = wrapper.vm.displayContent.includes( - testConstants.vapsCopy.rainDefenseCopy + const includesRainRepelCopy = wrapper.vm.displayContent.includes( + testConstants.vapsCopy.rainRepelCopy ); expect(includesFrontWiperCopy).toBe(true); - expect(includesRainDefenseCopy).toBe(false); + expect(includesRainRepelCopy).toBe(false); }); it("Should not error if cms content is missing (though may display poorly).", async () => { @@ -908,7 +908,7 @@ describe("Service Package Review Block", () => { wrapper.vm.initializeComponent({ wipers: scenario.params.wiperResponse, - rainDefense: scenario.params.rainDefenseResponse, + rainRepel: scenario.params.rainRepelResponse, }); // Act @@ -928,7 +928,7 @@ describe("Service Package Review Block", () => { function initializeWithDefault(wrapper) { wrapper.vm.initializeComponent({ wipers: [testConstants.parts.frontWiperPart], - rainDefense: testConstants.parts.rainDefensePart, + rainRepel: testConstants.parts.rainRepelPart, }); } diff --git a/src/layouts/payment/payment.spec.js b/src/layouts/payment/payment.spec.js index 18b082de4..76838b396 100644 --- a/src/layouts/payment/payment.spec.js +++ b/src/layouts/payment/payment.spec.js @@ -45,11 +45,11 @@ const parts = { partType: "REAR WIPER", price: 24.48, }, - rainDefense: { - name: "rain defense", - partNumber: "RAIN DEFENSE", + rainRepel: { + name: "rain repel", + partNumber: "RAIN REPEL", description: null, - partType: "RAIN DEFENSE", + partType: "RAIN REPEL", price: 35.5, }, }; @@ -76,8 +76,8 @@ const pricedParts = { salesTax: 0, sellingPrice: 24.48, }, - rainDefense: { - ...parts.rainDefense, + rainRepel: { + ...parts.rainRepel, kitPrice: 20, laborAmount: 0, salesTax: 0, @@ -101,8 +101,8 @@ const taxedParts = { salesTax: 6.0, subTotal: 100, }, - rainDefense: { - ...pricedParts.rainDefense, + rainRepel: { + ...pricedParts.rainRepel, salesTax: 1.0, subTotal: 100, }, @@ -229,7 +229,7 @@ describe("payment.vue", () => { startDate: "startDate", }, [storeActions.GET_WIPERS]: [parts.frontWipers, parts.rearWipers], - [storeActions.GET_RAIN_DEFENSE]: parts.rainDefense, + [storeActions.GET_RAIN_REPEL]: parts.rainRepel, [storeActions.PRICE_ORDER_ITEMS_AND_SAVE_SERVER_DATA]: [ pricedParts.windshield, pricedParts.frontWipers, @@ -407,7 +407,7 @@ describe("payment.vue", () => { const cartItems = [ taxedParts.windshield, taxedParts.frontWipers, - taxedParts.rainDefense, + taxedParts.rainRepel, ]; // Act @@ -423,7 +423,7 @@ describe("payment.vue", () => { store.getters.order.lineItems.glassParts = null; const wrapper = setupMocks({}); - const cartItems = [taxedParts.frontWipers, taxedParts.rainDefense]; + const cartItems = [taxedParts.frontWipers, taxedParts.rainRepel]; // Act wrapper.vm.getPiaLineItems(cartItems); @@ -447,7 +447,7 @@ describe("payment.vue", () => { const cartItems = [ taxedParts.windshield, taxedParts.frontWipers, - taxedParts.rainDefense, + taxedParts.rainRepel, ]; // Act diff --git a/src/layouts/quote/quote.spec.js b/src/layouts/quote/quote.spec.js index a3f3687f7..aea32211e 100644 --- a/src/layouts/quote/quote.spec.js +++ b/src/layouts/quote/quote.spec.js @@ -141,9 +141,9 @@ const mockStoreActionResults = {}; mockStoreActionResults[storeActions.GET_WIPERS] = Promise.resolve([ { partNumber: "SBB24", partType: "FRONT WIPER" }, ]); -mockStoreActionResults[storeActions.GET_RAIN_DEFENSE] = Promise.resolve({ - partNumber: "RAIN DEFENSE", - partType: "RAIN DEFENSE", +mockStoreActionResults[storeActions.GET_RAIN_REPEL] = Promise.resolve({ + partNumber: "RAIN REPEL", + partType: "RAIN REPEL", }); mockStoreActionResults[storeActions.GET_SUPPORTING_ITEMS] = Promise.resolve([ { partNumber: "WSREPAIR", partType: "WSREPAIR" }, diff --git a/src/layouts/quote/quote.vue b/src/layouts/quote/quote.vue index e80867ee3..8bab96d5f 100644 --- a/src/layouts/quote/quote.vue +++ b/src/layouts/quote/quote.vue @@ -71,7 +71,7 @@
- + diff --git a/src/layouts/quote/service-package-question/service-package-question-test-helper.js b/src/layouts/quote/service-package-question/service-package-question-test-helper.js index eb8e6784b..599520ea7 100644 --- a/src/layouts/quote/service-package-question/service-package-question-test-helper.js +++ b/src/layouts/quote/service-package-question/service-package-question-test-helper.js @@ -21,7 +21,7 @@ export const mockProcessedCmsContent = { HeaderText: "Premium service", SubheaderText: "", BodyText: - "
  • Expert windshield repair
  • Exclusive resin sealant
  • Nationwide lifetime guarantee
  • {if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}
  • {if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}
  • {if:custom:rainRepelApplicableForTierThree}{textLink:EstimateRainDefenseModal,Rain Repel}™ treatment{end}
", + "
  • Expert windshield repair
  • Exclusive resin sealant
  • Nationwide lifetime guarantee
  • {if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}
  • {if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}
  • {if:custom:rainRepelApplicableForTierThree}{textLink:EstimateRainRepelModal,Rain Repel}™ treatment{end}
", Image: "", FooterText: "", }, @@ -48,7 +48,7 @@ export const mockProcessedCmsContent = { HeaderText: "Premium service", SubheaderText: "", BodyText: - "
  • New replacement windshield
  • Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}
  • Nationwide lifetime warranty
  • {if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}
  • {if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}
  • {if:custom:rainRepelApplicableForTierThree}{textLink:EstimateRainDefenseModal,Rain Repel}™ treatment{end}
", + "
  • New replacement windshield
  • Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}
  • Nationwide lifetime warranty
  • {if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}
  • {if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}
  • {if:custom:rainRepelApplicableForTierThree}{textLink:EstimateRainRepelModal,Rain Repel}™ treatment{end}
", Image: "", FooterText: "", }, @@ -75,7 +75,7 @@ export const mockProcessedCmsContent = { HeaderText: "Premium service", SubheaderText: "", BodyText: - "
  • New replacement glass
  • Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}
  • Nationwide lifetime warranty
  • {if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}
  • {if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}
  • {if:custom:rainRepelApplicableForTierThree}{textLink:EstimateRainDefenseModal,Rain Repel}™ treatment{end}
", + "
  • New replacement glass
  • Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}
  • Nationwide lifetime warranty
  • {if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}
  • {if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}
  • {if:custom:rainRepelApplicableForTierThree}{textLink:EstimateRainRepelModal,Rain Repel}™ treatment{end}
", Image: "", FooterText: "", }, @@ -102,7 +102,7 @@ export const mockProcessedCmsContent = { HeaderText: "Premium service", SubheaderText: "", BodyText: - "
  • New replacement glass
  • Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}
  • Nationwide lifetime warranty
  • {if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}
  • {if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}
  • {if:custom:rainRepelApplicableForTierThree}{textLink:EstimateRainDefenseModal,Rain Repel}™ treatment{end}
", + "
  • New replacement glass
  • Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}
  • Nationwide lifetime warranty
  • {if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}
  • {if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}
  • {if:custom:rainRepelApplicableForTierThree}{textLink:EstimateRainRepelModal,Rain Repel}™ treatment{end}
", Image: "", FooterText: "", }, @@ -129,7 +129,7 @@ export const mockProcessedCmsContent = { HeaderText: "Premium service", SubheaderText: "", BodyText: - "
  • New replacement glass
  • Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}
  • Nationwide lifetime warranty
  • {if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}
  • {if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}
  • {if:custom:rainRepelApplicableForTierThree}{textLink:EstimateRainDefenseModal,Rain Repel}™ treatment{end}
", + "
  • New replacement glass
  • Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}
  • Nationwide lifetime warranty
  • {if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}
  • {if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}
  • {if:custom:rainRepelApplicableForTierThree}{textLink:EstimateRainRepelModal,Rain Repel}™ treatment{end}
", Image: "", FooterText: "", }, @@ -156,7 +156,7 @@ export const mockProcessedCmsContent = { HeaderText: "Premium service", SubheaderText: "", BodyText: - "
  • New replacement glass
  • Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}
  • Nationwide lifetime warranty
  • {if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}
  • {if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}
  • {if:custom:rainRepelApplicableForTierThree}{textLink:EstimateRainDefenseModal,Rain Repel}™ treatment{end}
", + "
  • New replacement glass
  • Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}
  • Nationwide lifetime warranty
  • {if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}
  • {if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}
  • {if:custom:rainRepelApplicableForTierThree}{textLink:EstimateRainRepelModal,Rain Repel}™ treatment{end}
", Image: "", FooterText: "", }, @@ -183,7 +183,7 @@ export const mockProcessedCmsContent = { HeaderText: "Premium service", SubheaderText: "", BodyText: - "
  • New replacement glass
  • Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}
  • Nationwide lifetime warranty
  • {if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}
  • {if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}
  • {if:custom:rainRepelApplicableForTierThree}{textLink:EstimateRainDefenseModal,Rain Repel}™ treatment{end}
", + "
  • New replacement glass
  • Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}
  • Nationwide lifetime warranty
  • {if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}
  • {if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}
  • {if:custom:rainRepelApplicableForTierThree}{textLink:EstimateRainRepelModal,Rain Repel}™ treatment{end}
", Image: "", FooterText: "", }, @@ -210,7 +210,7 @@ export const mockProcessedCmsContent = { HeaderText: "Premium service", SubheaderText: "", BodyText: - "
  • New replacement glass
  • Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}
  • Nationwide lifetime warranty
  • {if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}
  • {if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}
  • {if:custom:rainRepelApplicableForTierThree}{textLink:EstimateRainDefenseModal,Rain Repel}™ treatment{end}
", + "
  • New replacement glass
  • Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}
  • Nationwide lifetime warranty
  • {if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}
  • {if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}
  • {if:custom:rainRepelApplicableForTierThree}{textLink:EstimateRainRepelModal,Rain Repel}™ treatment{end}
", Image: "", FooterText: "", }, @@ -237,7 +237,7 @@ export const mockProcessedCmsContent = { HeaderText: "Premium service", SubheaderText: "", BodyText: - "
  • New replacement windshield
  • Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}
  • Nationwide lifetime warranty
  • {if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}
  • {if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}
  • {if:custom:rainRepelApplicableForTierThree}{textLink:EstimateRainDefenseModal,Rain Repel}™ treatment{end}
", + "
  • New replacement windshield
  • Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}
  • Nationwide lifetime warranty
  • {if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}
  • {if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}
  • {if:custom:rainRepelApplicableForTierThree}{textLink:EstimateRainRepelModal,Rain Repel}™ treatment{end}
", Image: "", FooterText: "", }, @@ -264,7 +264,7 @@ export const mockProcessedCmsContent = { HeaderText: "Premium service", SubheaderText: "", BodyText: - "
  • {if:custom:badCustomValue}DO NOT SHOW{end}New replacement windshield
  • Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}
  • Nationwide lifetime warranty
  • {if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}
  • {if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}
  • {if:custom:rainRepelApplicableForTierThree}{textLink:EstimateRainDefenseModal,Rain Repel}™ treatment{end}
", + "
  • {if:custom:badCustomValue}DO NOT SHOW{end}New replacement windshield
  • Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}
  • Nationwide lifetime warranty
  • {if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}
  • {if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}
  • {if:custom:rainRepelApplicableForTierThree}{textLink:EstimateRainRepelModal,Rain Repel}™ treatment{end}
", Image: "", FooterText: "", }, @@ -332,7 +332,7 @@ export const expectedModifiedAnswers = { buttonLabel: "Premium service", buttonLabelSubCopy: "", buttonBodyCopy: - "
  • Expert windshield repair
  • Exclusive resin sealant
  • Nationwide lifetime guarantee
  • New {textLink:EstimateFrontWiperModal,wiper blades}
  • {textLink:EstimateRainDefenseModal,Rain Repel}™ treatment
", + "
  • Expert windshield repair
  • Exclusive resin sealant
  • Nationwide lifetime guarantee
  • New {textLink:EstimateFrontWiperModal,wiper blades}
  • {textLink:EstimateRainRepelModal,Rain Repel}™ treatment
", buttonAuxillaryCopy: "$621.40", buttonFooterCopy: "", }, @@ -362,7 +362,7 @@ export const expectedModifiedAnswers = { buttonLabel: "Premium service", buttonLabelSubCopy: "", buttonBodyCopy: - "
  • New replacement windshield
  • Expert installation and {textLink:EstimateRecalModal,recalibration}
  • Nationwide lifetime warranty
  • New {textLink:EstimateFrontWiperModal,wiper blades}
  • {textLink:EstimateRainDefenseModal,Rain Repel}™ treatment
", + "
  • New replacement windshield
  • Expert installation and {textLink:EstimateRecalModal,recalibration}
  • Nationwide lifetime warranty
  • New {textLink:EstimateFrontWiperModal,wiper blades}
  • {textLink:EstimateRainRepelModal,Rain Repel}™ treatment
", buttonAuxillaryCopy: "$621.40", buttonFooterCopy: "", }, @@ -452,7 +452,7 @@ export const expectedModifiedAnswers = { buttonLabel: "Premium service", buttonLabelSubCopy: "", buttonBodyCopy: - "
  • New replacement glass
  • Expert installation
  • Nationwide lifetime warranty
  • New {textLink:EstimateFrontWiperModal,front wiper blades}
  • New {textLink:EstimateRearWiperModal,rear wiper blade}
  • {textLink:EstimateRainDefenseModal,Rain Repel}™ treatment
", + "
  • New replacement glass
  • Expert installation
  • Nationwide lifetime warranty
  • New {textLink:EstimateFrontWiperModal,front wiper blades}
  • New {textLink:EstimateRearWiperModal,rear wiper blade}
  • {textLink:EstimateRainRepelModal,Rain Repel}™ treatment
", buttonAuxillaryCopy: "$495.88", buttonFooterCopy: "", }, @@ -482,7 +482,7 @@ export const expectedModifiedAnswers = { buttonLabel: "Premium service", buttonLabelSubCopy: "", buttonBodyCopy: - "
  • New replacement glass
  • Expert installation
  • Nationwide lifetime warranty
  • New {textLink:EstimateRearWiperModal,rear wiper blade}
  • {textLink:EstimateRainDefenseModal,Rain Repel}™ treatment
", + "
  • New replacement glass
  • Expert installation
  • Nationwide lifetime warranty
  • New {textLink:EstimateRearWiperModal,rear wiper blade}
  • {textLink:EstimateRainRepelModal,Rain Repel}™ treatment
", buttonAuxillaryCopy: "$410.20", buttonFooterCopy: "", }, @@ -512,7 +512,7 @@ export const expectedModifiedAnswers = { buttonLabel: "Premium service", buttonLabelSubCopy: "", buttonBodyCopy: - "
  • New replacement glass
  • Expert installation
  • Nationwide lifetime warranty
  • New {textLink:EstimateFrontWiperModal,wiper blades}
  • {textLink:EstimateRainDefenseModal,Rain Repel}™ treatment
", + "
  • New replacement glass
  • Expert installation
  • Nationwide lifetime warranty
  • New {textLink:EstimateFrontWiperModal,wiper blades}
  • {textLink:EstimateRainRepelModal,Rain Repel}™ treatment
", buttonAuxillaryCopy: "$471.40", buttonFooterCopy: "", }, @@ -532,7 +532,7 @@ export const expectedModifiedAnswers = { buttonLabel: "Premium service", buttonLabelSubCopy: "", buttonBodyCopy: - "
  • New replacement glass
  • Expert installation
  • Nationwide lifetime warranty
  • New {textLink:EstimateFrontWiperModal,wiper blades}
  • {textLink:EstimateRainDefenseModal,Rain Repel}™ treatment
", + "
  • New replacement glass
  • Expert installation
  • Nationwide lifetime warranty
  • New {textLink:EstimateFrontWiperModal,wiper blades}
  • {textLink:EstimateRainRepelModal,Rain Repel}™ treatment
", buttonAuxillaryCopy: "$471.40", buttonFooterCopy: "", }, @@ -552,7 +552,7 @@ export const expectedModifiedAnswers = { buttonLabel: "Premium service", buttonLabelSubCopy: "", buttonBodyCopy: - "
  • New replacement windshield
  • Expert installation
  • Nationwide lifetime warranty
  • {textLink:EstimateRainDefenseModal,Rain Repel}™ treatment
", + "
  • New replacement windshield
  • Expert installation
  • Nationwide lifetime warranty
  • {textLink:EstimateRainRepelModal,Rain Repel}™ treatment
", buttonAuxillaryCopy: "$385.72", buttonFooterCopy: "", }, @@ -572,7 +572,7 @@ export const expectedModifiedAnswers = { buttonLabel: "Premium service", buttonLabelSubCopy: "", buttonBodyCopy: - "
  • New replacement windshield
  • Expert installation
  • Nationwide lifetime warranty
  • {textLink:EstimateRainDefenseModal,Rain Repel}™ treatment
", + "
  • New replacement windshield
  • Expert installation
  • Nationwide lifetime warranty
  • {textLink:EstimateRainRepelModal,Rain Repel}™ treatment
", buttonAuxillaryCopy: "$385.72", buttonFooterCopy: "", }, 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 f55b33ab7..523c0edce 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 @@ -67,9 +67,9 @@ describe("service-package-question.vue", () => { price: 350.22, }, { - partNumber: "RAIN DEFENSE", + partNumber: "RAIN REPEL", description: null, - partType: "RAIN DEFENSE", + partType: "RAIN REPEL", price: 35.5, }, { @@ -128,8 +128,8 @@ describe("service-package-question.vue", () => { expect(wrapper.emitted()["vapsItemsSelected"][0][0]).toEqual([ { description: null, - partNumber: "RAIN DEFENSE", - partType: "RAIN DEFENSE", + partNumber: "RAIN REPEL", + partType: "RAIN REPEL", price: 35.5, }, ]); @@ -296,9 +296,9 @@ describe("service-package-question.vue", () => { // Assert expect(wrapper.vm.selectedPackageName).toBe("TierOne"); }); - it("should select TierThree default package if Rain Defense is on order", async () => { + it("should select TierThree default package if Rain Repel is on order", async () => { // This tests the business intent that when returning to the page, the selected package is the lowest package that contains all VAPs on the order. - // In this case Rain Defense is only in Premium so Tier Three should be defaulted to + // In this case Rain Repel is only in Premium so Tier Three should be defaulted to const wrapper = setupMocks({ mountOptionsMockData: { store: { @@ -320,8 +320,8 @@ describe("service-package-question.vue", () => { ], vaps: [ { - partNumber: "RAIN DEFENSE", - partType: "RAIN DEFENSE", + partNumber: "RAIN REPEL", + partType: "RAIN REPEL", }, ], supportingItems: [ @@ -455,9 +455,9 @@ describe("service-package-question.vue, matching business rules for package disp price: 350.22, }, { - partNumber: "RAIN DEFENSE", + partNumber: "RAIN REPEL", description: null, - partType: "RAIN DEFENSE", + partType: "RAIN REPEL", price: 35.5, }, ], diff --git a/src/layouts/quote/service-package-question/service-package-question.vue b/src/layouts/quote/service-package-question/service-package-question.vue index 7c123fefc..d1a99da08 100644 --- a/src/layouts/quote/service-package-question/service-package-question.vue +++ b/src/layouts/quote/service-package-question/service-package-question.vue @@ -26,7 +26,7 @@ import { storeMutations } from "@/constants/store-mutations"; import { shouldFrontWipersBeAvailable, shouldRearWipersBeAvailable, - shouldRainDefenseBeAvailable, + shouldRainRepelBeAvailable, getAvailablePackages, getHighestRequiredTier, getPackageContents, @@ -213,7 +213,7 @@ export default { ); }, rainRepelApplicableForTierThree() { - return shouldRainDefenseBeAvailable( + return shouldRainRepelBeAvailable( this.glassToReplace, this.nullSafeAvailableLineItems, this.isRepair, diff --git a/src/mixins/analytics-mixin.spec.js b/src/mixins/analytics-mixin.spec.js index 9121140e0..650403935 100644 --- a/src/mixins/analytics-mixin.spec.js +++ b/src/mixins/analytics-mixin.spec.js @@ -62,11 +62,11 @@ const parts = { laborAmount: 0, salesTax: 2, }, - rainDefense: { - name: "rain defense", - partNumber: "RAIN DEFENSE", + rainRepel: { + name: "rain repel", + partNumber: "RAIN REPEL", description: null, - partType: "RAIN DEFENSE", + partType: "RAIN REPEL", sellingPrice: 35.5, kitPrice: 0, laborAmount: 0,