Merge pull request #2877 from Safelite/nation/CASH-1462

CASH-1426
This commit is contained in:
CarlNation 2025-10-03 13:55:02 -04:00 committed by GitHub
commit 39f9fb9cc4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 244 additions and 277 deletions

View file

@ -3,7 +3,7 @@ const cartItemTypes = {
REAR_WIPERS: "REAR WIPERS",
SUPPORTING_ITEMS: "SUPPORTING ITEMS",
GLASS_PARTS: "GLASS PARTS",
RAIN_DEFENSE: "RAIN DEFENSE",
RAIN_REPEL: "RAIN REPEL",
RECYCLE_FEE: "RECYCLE FEE",
REPLACE_FEE: "REPLACE FEE",
MOBILE_FEE: "MOBILE FEE",

View file

@ -64,8 +64,8 @@ const endpoints = {
url: "/parts/api/v1/parts/wipers",
method: "GET",
},
GetRainDefense: {
url: "/parts/api/v1/parts/rain-defense",
GetRainRepel: {
url: "/parts/api/v1/parts/rain-repel",
method: "GET",
},
GetMobileFeePart: {

View file

@ -1,7 +1,7 @@
const partTypeStrings = {
FRONT_WIPER: "FRONT WIPER",
REAR_WIPER: "REAR WIPER",
RAIN_DEFENSE: "RAIN DEFENSE",
RAIN_REPEL: "RAIN REPEL",
ADAS_RECALIBRATION: "ADAS RECALIBRATION",
RECALIBRATION: "RECALIBRATION",
REPLACE_FEE: "REPLACE FEE",

View file

@ -24,7 +24,7 @@ const storeActions = {
GET_PARTS_OR_QUESTIONS: "getPartsOrQuestions",
GET_PARTS: "getParts",
GET_WIPERS: "getWipers",
GET_RAIN_DEFENSE: "getRainDefense",
GET_RAIN_REPEL: "getRainRepel",
GET_SUPPORTING_ITEMS: "getSupportingItems",
GET_CAPABILITY_QUESTIONS: "getCapabilityQuestions",
SUBMIT_DONATION_PART_TO_SV2: "submitDonationPartToSV2",

View file

@ -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);
});

View file

@ -444,8 +444,8 @@ export default {
cartItems.push(this.rearWipersCartItem);
}
if (this.rainDefenseCartItem) {
cartItems.push(this.rainDefenseCartItem);
if (this.rainRepelCartItem) {
cartItems.push(this.rainRepelCartItem);
}
if (this.glassPartCartItems) {
@ -701,40 +701,40 @@ export default {
return cartItem;
},
rainDefenseCartItemName() {
return this.getCmsContentForVapsType(partTypeStrings.RAIN_DEFENSE);
rainRepelCartItemName() {
return this.getCmsContentForVapsType(partTypeStrings.RAIN_REPEL);
},
rainDefenseCartItem() {
rainRepelCartItem() {
let cartItem = null;
const rainDefenseLineItem = this.vaps.find(
(vapsLineItem) => vapsLineItem.partType == partTypeStrings.RAIN_DEFENSE
const rainRepelLineItem = this.vaps.find(
(vapsLineItem) => vapsLineItem.partType == partTypeStrings.RAIN_REPEL
);
if (rainDefenseLineItem) {
if (rainRepelLineItem) {
cartItem = {
name: this.getCmsContentForVapsType(partTypeStrings.RAIN_DEFENSE),
name: this.getCmsContentForVapsType(partTypeStrings.RAIN_REPEL),
category: cartItemCategories.VAPS,
cartItemType: cartItemTypes.RAIN_DEFENSE,
cartItemType: cartItemTypes.RAIN_REPEL,
isDisplayed: true,
isRemovable: true,
subTotal: 0,
salesTax: 0,
lineItems: [],
isCoveredByInsurance: cartItemTypesCoveredByInsurance.includes(
cartItemTypes.RAIN_DEFENSE
cartItemTypes.RAIN_REPEL
),
};
rainDefenseLineItem.cartItemType = cartItem.cartItemType;
cartItem.lineItems.push(rainDefenseLineItem);
rainRepelLineItem.cartItemType = cartItem.cartItemType;
cartItem.lineItems.push(rainRepelLineItem);
cartItem.subTotal +=
(rainDefenseLineItem.kitPrice ?? 0) +
(rainDefenseLineItem.laborAmount ?? 0) +
(rainDefenseLineItem.sellingPrice ?? 0);
(rainRepelLineItem.kitPrice ?? 0) +
(rainRepelLineItem.laborAmount ?? 0) +
(rainRepelLineItem.sellingPrice ?? 0);
cartItem.salesTax += rainDefenseLineItem.salesTax ?? 0;
cartItem.salesTax += rainRepelLineItem.salesTax ?? 0;
}
return cartItem;

View file

@ -6,13 +6,13 @@ import baseMixin from "@/mixins/base-mixin.js";
export const promoPartNumberStrings = {
WIPER_DISCOUNT_PART_NUMBER: "WIPER DISCOUNT",
RAIN_DEFENSE_DISCOUNT_PART_NUMBER: "DISC RAIN DEFEN",
RAIN_REPEL_DISCOUNT_PART_NUMBER: "DISC RAIN REPEL",
GLASS_DISCOUNT_PART_NUMBER: "DISCOUNT",
GLASS_CLEANER_DISCOUNT_PART_NUMBER: "DISC GLASS CLN",
};
export const addableVapsPromoPartNumbers = [
promoPartNumberStrings.RAIN_DEFENSE_DISCOUNT_PART_NUMBER,
promoPartNumberStrings.RAIN_REPEL_DISCOUNT_PART_NUMBER,
promoPartNumberStrings.WIPER_DISCOUNT_PART_NUMBER,
];
@ -75,9 +75,7 @@ export function getLineItemsThatMatchPromos(promos, availableLineItems) {
export function getAddableVapsFromAvailableLineItems(availableLineItems) {
const addableVaps = [];
addableVaps.push(...findLineItemsWithPartType(partTypeStrings.FRONT_WIPER, availableLineItems));
addableVaps.push(
...findLineItemsWithPartType(partTypeStrings.RAIN_DEFENSE, availableLineItems)
);
addableVaps.push(...findLineItemsWithPartType(partTypeStrings.RAIN_REPEL, availableLineItems));
return addableVaps;
}
@ -88,7 +86,7 @@ export function removeVapsPromosFromPromoArray(promoArray) {
const filteredPromoArray = promoArray.filter((promo) => {
return (
promo.partNumber != promoPartNumberStrings.WIPER_DISCOUNT_PART_NUMBER &&
promo.partNumber != promoPartNumberStrings.RAIN_DEFENSE_DISCOUNT_PART_NUMBER &&
promo.partNumber != promoPartNumberStrings.RAIN_REPEL_DISCOUNT_PART_NUMBER &&
promo.partNumber != promoPartNumberStrings.GLASS_CLEANER_DISCOUNT_PART_NUMBER
);
});

View file

@ -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", () => {
@ -242,8 +242,7 @@ describe("promotions-helper.js", () => {
},
{
partNumber:
promotionsHelper.promoPartNumberStrings
.RAIN_DEFENSE_DISCOUNT_PART_NUMBER,
promotionsHelper.promoPartNumberStrings.RAIN_REPEL_DISCOUNT_PART_NUMBER,
},
{
partNumber:

View file

@ -100,8 +100,8 @@ export function getPackageContents(glassToReplace, availableLineItems, isRepair,
vaps.push(partTypeStrings.REAR_WIPER);
}
if (shouldRainDefenseBeAvailable(glassToReplace, availableLineItems, isRepair, targetTier)) {
vaps.push(partTypeStrings.RAIN_DEFENSE);
if (shouldRainRepelBeAvailable(glassToReplace, availableLineItems, isRepair, targetTier)) {
vaps.push(partTypeStrings.RAIN_REPEL);
}
return vaps;
@ -160,7 +160,7 @@ export function shouldRearWipersBeAvailable(
}
}
export function shouldRainDefenseBeAvailable(
export function shouldRainRepelBeAvailable(
glassToReplace,
availableLineItems,
isRepair,

View file

@ -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,14 +774,10 @@ describe("service-package-helper.js", () => {
driverFrontWiperLineItem,
passengerFrontWiperLineItem,
rearWiperLineItem,
rainDefenseLineItem,
rainRepelLineItem,
];
const isRepair = false;
const vaps = [
driverFrontWiperLineItem,
passengerFrontWiperLineItem,
rainDefenseLineItem,
];
const vaps = [driverFrontWiperLineItem, passengerFrontWiperLineItem, rainRepelLineItem];
// Act
const result = servicePackageHelper.getHighestRequiredTier(
@ -802,7 +798,7 @@ describe("service-package-helper.js", () => {
driverFrontWiperLineItem,
passengerFrontWiperLineItem,
rearWiperLineItem,
rainDefenseLineItem,
rainRepelLineItem,
];
const isRepair = false;
const vaps = [driverFrontWiperLineItem, passengerFrontWiperLineItem];
@ -826,7 +822,7 @@ describe("service-package-helper.js", () => {
driverFrontWiperLineItem,
passengerFrontWiperLineItem,
rearWiperLineItem,
rainDefenseLineItem,
rainRepelLineItem,
];
const isRepair = false;
const vaps = [];
@ -850,7 +846,7 @@ describe("service-package-helper.js", () => {
driverFrontWiperLineItem,
passengerFrontWiperLineItem,
rearWiperLineItem,
rainDefenseLineItem,
rainRepelLineItem,
];
const isRepair = false;
const vaps = [recalLineItem];
@ -876,13 +872,13 @@ describe("service-package-helper.js", () => {
driverFrontWiperLineItem,
passengerFrontWiperLineItem,
rearWiperLineItem,
rainDefenseLineItem,
rainRepelLineItem,
];
const isRepair = false;
const vaps = [
driverFrontWiperLineItem,
passengerFrontWiperLineItem,
rainDefenseLineItem,
rainRepelLineItem,
rearWiperLineItem,
];
@ -905,7 +901,7 @@ describe("service-package-helper.js", () => {
driverFrontWiperLineItem,
passengerFrontWiperLineItem,
rearWiperLineItem,
rainDefenseLineItem,
rainRepelLineItem,
];
const isRepair = false;
const vaps = [driverFrontWiperLineItem, passengerFrontWiperLineItem];
@ -929,10 +925,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 +949,7 @@ describe("service-package-helper.js", () => {
driverFrontWiperLineItem,
passengerFrontWiperLineItem,
rearWiperLineItem,
rainDefenseLineItem,
rainRepelLineItem,
];
const isRepair = false;
const vaps = [];
@ -1003,10 +999,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,
};

View file

@ -173,8 +173,8 @@ export default {
"confirmation"
);
const rainDefensePromise = baseMixin.methods.dispatchStoreActionWithLogging(
storeActions.GET_RAIN_DEFENSE,
const rainRepelPromise = baseMixin.methods.dispatchStoreActionWithLogging(
storeActions.GET_RAIN_REPEL,
null,
"confirmation"
);
@ -190,13 +190,13 @@ export default {
promise: wipersPromise,
},
{
resultKey: "rainDefense",
promise: rainDefensePromise,
resultKey: "rainRepel",
promise: rainRepelPromise,
},
];
const resultMap = await settleAllPromises(promiseResultMap);
const availableVaps = [resultMap.rainDefense, ...resultMap.wipers];
const availableVaps = [resultMap.rainRepel, ...resultMap.wipers];
const lineItemsFromSubmittedOrder = deepClone(submittedOrder.lineItems);
const isNoComp = submittedOrder?.policy?.isNoComp;

View file

@ -201,8 +201,8 @@ export default {
"payment-method"
);
const rainDefensePromise = baseMixin.methods.dispatchStoreActionWithLogging(
storeActions.GET_RAIN_DEFENSE,
const rainRepelPromise = baseMixin.methods.dispatchStoreActionWithLogging(
storeActions.GET_RAIN_REPEL,
null,
"payment-method"
);
@ -217,8 +217,8 @@ export default {
promise: wipersPromise,
},
{
resultKey: "rainDefense",
promise: rainDefensePromise,
resultKey: "rainRepel",
promise: rainRepelPromise,
},
];
@ -229,7 +229,7 @@ export default {
const supportingItems = lineItemsFromStore.supportingItems ?? [];
const vaps = lineItemsFromStore.vaps ?? [];
const availableVaps = [resultMap.rainDefense, ...resultMap.wipers];
const availableVaps = [resultMap.rainRepel, ...resultMap.wipers];
const pricedAvailableVaps = await baseMixin.methods.dispatchStoreActionWithLogging(
storeActions.PRICE_ORDER_ITEMS_AND_SAVE_SERVER_DATA,

View file

@ -27,7 +27,7 @@ const testConstants = {
vapsCopy: {
frontWiperCopy: "Front Wiper copy",
rearWiperCopy: "Rear Wiper copy",
rainDefenseCopy: "Rain defense copy",
rainRepelCopy: "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],
@ -108,16 +108,13 @@ const figmaScenarios = [
},
{
name: "Premium",
vapsCombo: [
testConstants.parts.rainDefensePart,
testConstants.parts.frontWiperPart,
],
vapsCombo: [testConstants.parts.rainRepelPart, testConstants.parts.frontWiperPart],
expected: {
packageNameWidget: testConstants.widgetNames.tierThreeTitle,
displayContent: [
...testConstants.defaultItemCopy.defaultItemCopyArray,
testConstants.vapsCopy.frontWiperCopy,
testConstants.vapsCopy.rainDefenseCopy,
testConstants.vapsCopy.rainRepelCopy,
],
},
},
@ -140,7 +137,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: [],
@ -170,16 +167,13 @@ const figmaScenarios = [
},
{
name: "Premium",
vapsCombo: [
testConstants.parts.rainDefensePart,
testConstants.parts.frontWiperPart,
],
vapsCombo: [testConstants.parts.rainRepelPart, testConstants.parts.frontWiperPart],
expected: {
packageNameWidget: testConstants.widgetNames.tierThreeTitle,
displayContent: [
...testConstants.defaultItemCopy.defaultItemCopyArray,
testConstants.vapsCopy.frontWiperCopy,
testConstants.vapsCopy.rainDefenseCopy,
testConstants.vapsCopy.rainRepelCopy,
],
},
},
@ -201,7 +195,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],
@ -231,16 +225,13 @@ const figmaScenarios = [
},
{
name: "Premium",
vapsCombo: [
testConstants.parts.rainDefensePart,
testConstants.parts.frontWiperPart,
],
vapsCombo: [testConstants.parts.rainRepelPart, testConstants.parts.frontWiperPart],
expected: {
packageNameWidget: testConstants.widgetNames.tierThreeTitle,
displayContent: [
...testConstants.defaultItemCopy.defaultItemCopyArray,
testConstants.vapsCopy.frontWiperCopy,
testConstants.vapsCopy.rainDefenseCopy,
testConstants.vapsCopy.rainRepelCopy,
],
},
},
@ -263,7 +254,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 +294,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 +323,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 +366,37 @@ 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",
vapsCombo: [
testConstants.parts.frontWiperPart,
testConstants.parts.rainDefensePart,
],
name: "Economy+Frontwiper+RainRepel",
vapsCombo: [testConstants.parts.frontWiperPart, 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 +417,7 @@ const figmaScenarios = [
vapsCombo: [
testConstants.parts.rearWiperPart,
testConstants.parts.frontWiperPart,
testConstants.parts.rainDefensePart,
testConstants.parts.rainRepelPart,
],
expected: {
packageNameWidget: testConstants.widgetNames.tierThreeTitle,
@ -437,7 +425,7 @@ const figmaScenarios = [
...testConstants.defaultItemCopy.defaultItemCopyArray,
testConstants.vapsCopy.frontWiperCopy,
testConstants.vapsCopy.rearWiperCopy,
testConstants.vapsCopy.rainDefenseCopy,
testConstants.vapsCopy.rainRepelCopy,
],
},
},
@ -447,7 +435,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 +453,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 +476,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 +493,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: [
@ -538,16 +526,13 @@ const figmaScenarios = [
},
{
name: "Premium",
vapsCombo: [
testConstants.parts.rainDefensePart,
testConstants.parts.frontWiperPart,
],
vapsCombo: [testConstants.parts.rainRepelPart, testConstants.parts.frontWiperPart],
expected: {
packageNameWidget: testConstants.widgetNames.tierThreeTitle,
displayContent: [
...testConstants.defaultItemCopy.defaultItemCopyArray,
testConstants.vapsCopy.frontWiperCopy,
testConstants.vapsCopy.rainDefenseCopy,
testConstants.vapsCopy.rainRepelCopy,
],
},
},
@ -570,7 +555,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 +584,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,
],
},
},
@ -622,23 +607,20 @@ const figmaScenarios = [
},
{
name: "Premium",
vapsCombo: [
testConstants.parts.rainDefensePart,
testConstants.parts.frontWiperPart,
],
vapsCombo: [testConstants.parts.rainRepelPart, testConstants.parts.frontWiperPart],
expected: {
packageNameWidget: testConstants.widgetNames.tierThreeTitle,
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 +630,7 @@ const figmaScenarios = [
...testConstants.defaultItemCopy.defaultItemCopyArray,
testConstants.vapsCopy.frontWiperCopy,
testConstants.vapsCopy.rearWiperCopy,
testConstants.vapsCopy.rainDefenseCopy,
testConstants.vapsCopy.rainRepelCopy,
],
},
},
@ -659,7 +641,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 +660,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 +753,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: "",
@ -788,15 +770,15 @@ describe("Service Package Review Block", () => {
// 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 +792,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 +847,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 +890,7 @@ describe("Service Package Review Block", () => {
wrapper.vm.initializeComponent({
wipers: scenario.params.wiperResponse,
rainDefense: scenario.params.rainDefenseResponse,
rainRepel: scenario.params.rainRepelResponse,
});
// Act
@ -928,7 +910,7 @@ describe("Service Package Review Block", () => {
function initializeWithDefault(wrapper) {
wrapper.vm.initializeComponent({
wipers: [testConstants.parts.frontWiperPart],
rainDefense: testConstants.parts.rainDefensePart,
rainRepel: testConstants.parts.rainRepelPart,
});
}

View file

@ -40,8 +40,8 @@ export default {
},
"review"
);
const rainDefensePromise = baseMixin.methods.dispatchStoreActionWithLogging(
storeActions.GET_RAIN_DEFENSE,
const rainRepelPromise = baseMixin.methods.dispatchStoreActionWithLogging(
storeActions.GET_RAIN_REPEL,
null,
"review"
);
@ -52,15 +52,15 @@ export default {
promise: wipersPromise,
},
{
resultKey: "rainDefense",
promise: rainDefensePromise,
resultKey: "rainRepel",
promise: rainRepelPromise,
},
];
return settleAllPromises(promiseResultMap);
},
initializeComponent(apiResponses) {
const vapsFromApi = [...apiResponses.wipers, apiResponses.rainDefense];
const vapsFromApi = [...apiResponses.wipers, apiResponses.rainRepel];
this.availableVaps = vapsFromApi;
},

View file

@ -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,
@ -404,11 +404,7 @@ describe("payment.vue", () => {
test("Properly formatted output", () => {
// Arrange
const wrapper = setupMocks({});
const cartItems = [
taxedParts.windshield,
taxedParts.frontWipers,
taxedParts.rainDefense,
];
const cartItems = [taxedParts.windshield, taxedParts.frontWipers, taxedParts.rainRepel];
// Act
wrapper.vm.getPiaLineItems(cartItems);
@ -423,7 +419,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);
@ -444,11 +440,7 @@ describe("payment.vue", () => {
];
const wrapper = setupMocks({});
const cartItems = [
taxedParts.windshield,
taxedParts.frontWipers,
taxedParts.rainDefense,
];
const cartItems = [taxedParts.windshield, taxedParts.frontWipers, taxedParts.rainRepel];
// Act
wrapper.vm.getPiaLineItems(cartItems);

View file

@ -330,8 +330,8 @@ export default {
"payment"
);
const rainDefensePromise = baseMixin.methods.dispatchStoreActionWithLogging(
storeActions.GET_RAIN_DEFENSE,
const rainRepelPromise = baseMixin.methods.dispatchStoreActionWithLogging(
storeActions.GET_RAIN_REPEL,
null,
"payment"
);
@ -350,8 +350,8 @@ export default {
promise: wipersPromise,
},
{
resultKey: "rainDefense",
promise: rainDefensePromise,
resultKey: "rainRepel",
promise: rainRepelPromise,
},
];
@ -361,12 +361,12 @@ export default {
const supportingItems = lineItemsFromStore.supportingItems ?? [];
const lineItemsToTax = [
resultMap.rainDefense,
resultMap.rainRepel,
...supportingItems,
...resultMap.wipers,
...glassParts,
];
const availableVaps = [resultMap.rainDefense, ...resultMap.wipers];
const availableVaps = [resultMap.rainRepel, ...resultMap.wipers];
const pricedLineItemsToTax = await baseMixin.methods.dispatchStoreActionWithLogging(
storeActions.PRICE_ORDER_ITEMS_AND_SAVE_SERVER_DATA,

View file

@ -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" },

View file

@ -71,7 +71,7 @@
</div>
<div class="row justify-content-center">
<div class="col-md-8 col-xl-6">
<contentGroupModal ref="RainDefenseModal" cmsWidgetName="RainDefenseModal" />
<contentGroupModal ref="RainRepelModal" cmsWidgetName="RainRepelModal" />
<contentGroupModal ref="FrontWiperModal" cmsWidgetName="FrontWiperModal" />
<contentGroupModal ref="RearWiperModal" cmsWidgetName="RearWiperModal" />
<contentGroupModal ref="RecalModal" cmsWidgetName="RecalModal" />
@ -199,8 +199,8 @@ export default {
},
"quote"
);
const rainDefensePromise = baseMixin.methods.dispatchStoreActionWithLogging(
storeActions.GET_RAIN_DEFENSE,
const rainRepelPromise = baseMixin.methods.dispatchStoreActionWithLogging(
storeActions.GET_RAIN_REPEL,
null,
"quote"
);
@ -275,8 +275,8 @@ export default {
promise: wipersPromise,
},
{
resultKey: "rainDefense",
promise: rainDefensePromise,
resultKey: "rainRepel",
promise: rainRepelPromise,
},
{
resultKey: "supportingItems",
@ -320,7 +320,7 @@ export default {
}
}
const availableLineItems = [
resultMap.rainDefense,
resultMap.rainRepel,
...resultMap.supportingItems,
...resultMap.wipers,
...nullSafeGlassParts,
@ -358,7 +358,7 @@ export default {
false
);
lineItems.supportingItems = resultMap.supportingItems;
const addableVaps = [...resultMap.wipers, resultMap.rainDefense];
const addableVaps = [...resultMap.wipers, resultMap.rainRepel];
// Promo logic
// Populate the previous state of promos for toast message usage in "next()"

View file

@ -21,7 +21,7 @@ export const mockProcessedCmsContent = {
HeaderText: "Premium service",
SubheaderText: "",
BodyText:
"<ul><li>Expert windshield repair</li><li>Exclusive resin sealant</li><li>Nationwide lifetime guarantee</li><li>{if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}</li><li>{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}</li><li>{if:custom:rainDefenseApplicableForTierThree}{textLink:EstimateRainDefenseModal,Rain Defense}&trade; treatment{end}</li></ul>",
"<ul><li>Expert windshield repair</li><li>Exclusive resin sealant</li><li>Nationwide lifetime guarantee</li><li>{if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}</li><li>{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}</li><li>{if:custom:rainRepelApplicableForTierThree}{textLink:EstimateRainRepelModal,Rain Repel}&trade; treatment{end}</li></ul>",
Image: "",
FooterText: "",
},
@ -48,7 +48,7 @@ export const mockProcessedCmsContent = {
HeaderText: "Premium service",
SubheaderText: "",
BodyText:
"<ul><li>New replacement windshield</li><li>Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}</li><li>Nationwide lifetime warranty</li><li>{if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}</li><li>{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}</li><li>{if:custom:rainDefenseApplicableForTierThree}{textLink:EstimateRainDefenseModal,Rain Defense}&trade; treatment{end}</li></ul>",
"<ul><li>New replacement windshield</li><li>Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}</li><li>Nationwide lifetime warranty</li><li>{if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}</li><li>{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}</li><li>{if:custom:rainRepelApplicableForTierThree}{textLink:EstimateRainRepelModal,Rain Repel}&trade; treatment{end}</li></ul>",
Image: "",
FooterText: "",
},
@ -75,7 +75,7 @@ export const mockProcessedCmsContent = {
HeaderText: "Premium service",
SubheaderText: "",
BodyText:
"<ul><li>New replacement glass</li><li>Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}</li><li>Nationwide lifetime warranty</li><li>{if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}</li><li>{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}</li><li>{if:custom:rainDefenseApplicableForTierThree}{textLink:EstimateRainDefenseModal,Rain Defense}&trade; treatment{end}</li></ul>",
"<ul><li>New replacement glass</li><li>Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}</li><li>Nationwide lifetime warranty</li><li>{if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}</li><li>{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}</li><li>{if:custom:rainRepelApplicableForTierThree}{textLink:EstimateRainRepelModal,Rain Repel}&trade; treatment{end}</li></ul>",
Image: "",
FooterText: "",
},
@ -102,7 +102,7 @@ export const mockProcessedCmsContent = {
HeaderText: "Premium service",
SubheaderText: "",
BodyText:
"<ul><li>New replacement glass</li><li>Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}</li><li>Nationwide lifetime warranty</li><li>{if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}</li><li>{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}</li><li>{if:custom:rainDefenseApplicableForTierThree}{textLink:EstimateRainDefenseModal,Rain Defense}&trade; treatment{end}</li></ul>",
"<ul><li>New replacement glass</li><li>Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}</li><li>Nationwide lifetime warranty</li><li>{if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}</li><li>{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}</li><li>{if:custom:rainRepelApplicableForTierThree}{textLink:EstimateRainRepelModal,Rain Repel}&trade; treatment{end}</li></ul>",
Image: "",
FooterText: "",
},
@ -129,7 +129,7 @@ export const mockProcessedCmsContent = {
HeaderText: "Premium service",
SubheaderText: "",
BodyText:
"<ul><li>New replacement glass</li><li>Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}</li><li>Nationwide lifetime warranty</li><li>{if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}</li><li>{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}</li><li>{if:custom:rainDefenseApplicableForTierThree}{textLink:EstimateRainDefenseModal,Rain Defense}&trade; treatment{end}</li></ul>",
"<ul><li>New replacement glass</li><li>Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}</li><li>Nationwide lifetime warranty</li><li>{if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}</li><li>{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}</li><li>{if:custom:rainRepelApplicableForTierThree}{textLink:EstimateRainRepelModal,Rain Repel}&trade; treatment{end}</li></ul>",
Image: "",
FooterText: "",
},
@ -156,7 +156,7 @@ export const mockProcessedCmsContent = {
HeaderText: "Premium service",
SubheaderText: "",
BodyText:
"<ul><li>New replacement glass</li><li>Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}</li><li>Nationwide lifetime warranty</li><li>{if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}</li><li>{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}</li><li>{if:custom:rainDefenseApplicableForTierThree}{textLink:EstimateRainDefenseModal,Rain Defense}&trade; treatment{end}</li></ul>",
"<ul><li>New replacement glass</li><li>Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}</li><li>Nationwide lifetime warranty</li><li>{if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}</li><li>{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}</li><li>{if:custom:rainRepelApplicableForTierThree}{textLink:EstimateRainRepelModal,Rain Repel}&trade; treatment{end}</li></ul>",
Image: "",
FooterText: "",
},
@ -183,7 +183,7 @@ export const mockProcessedCmsContent = {
HeaderText: "Premium service",
SubheaderText: "",
BodyText:
"<ul><li>New replacement glass</li><li>Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}</li><li>Nationwide lifetime warranty</li><li>{if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}</li><li>{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}</li><li>{if:custom:rainDefenseApplicableForTierThree}{textLink:EstimateRainDefenseModal,Rain Defense}&trade; treatment{end}</li></ul>",
"<ul><li>New replacement glass</li><li>Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}</li><li>Nationwide lifetime warranty</li><li>{if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}</li><li>{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}</li><li>{if:custom:rainRepelApplicableForTierThree}{textLink:EstimateRainRepelModal,Rain Repel}&trade; treatment{end}</li></ul>",
Image: "",
FooterText: "",
},
@ -210,7 +210,7 @@ export const mockProcessedCmsContent = {
HeaderText: "Premium service",
SubheaderText: "",
BodyText:
"<ul><li>New replacement glass</li><li>Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}</li><li>Nationwide lifetime warranty</li><li>{if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}</li><li>{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}</li><li>{if:custom:rainDefenseApplicableForTierThree}{textLink:EstimateRainDefenseModal,Rain Defense}&trade; treatment{end}</li></ul>",
"<ul><li>New replacement glass</li><li>Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}</li><li>Nationwide lifetime warranty</li><li>{if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}</li><li>{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}</li><li>{if:custom:rainRepelApplicableForTierThree}{textLink:EstimateRainRepelModal,Rain Repel}&trade; treatment{end}</li></ul>",
Image: "",
FooterText: "",
},
@ -237,7 +237,7 @@ export const mockProcessedCmsContent = {
HeaderText: "Premium service",
SubheaderText: "",
BodyText:
"<ul><li>New replacement windshield</li><li>Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}</li><li>Nationwide lifetime warranty</li><li>{if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}</li><li>{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}</li><li>{if:custom:rainDefenseApplicableForTierThree}{textLink:EstimateRainDefenseModal,Rain Defense}&trade; treatment{end}</li></ul>",
"<ul><li>New replacement windshield</li><li>Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}</li><li>Nationwide lifetime warranty</li><li>{if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}</li><li>{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}</li><li>{if:custom:rainRepelApplicableForTierThree}{textLink:EstimateRainRepelModal,Rain Repel}&trade; treatment{end}</li></ul>",
Image: "",
FooterText: "",
},
@ -264,7 +264,7 @@ export const mockProcessedCmsContent = {
HeaderText: "Premium service",
SubheaderText: "",
BodyText:
"<ul><li>{if:custom:badCustomValue}DO NOT SHOW{end}New replacement windshield</li><li>Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}</li><li>Nationwide lifetime warranty</li><li>{if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}</li><li>{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}</li><li>{if:custom:rainDefenseApplicableForTierThree}{textLink:EstimateRainDefenseModal,Rain Defense}&trade; treatment{end}</li></ul>",
"<ul><li>{if:custom:badCustomValue}DO NOT SHOW{end}New replacement windshield</li><li>Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}</li><li>Nationwide lifetime warranty</li><li>{if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}</li><li>{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}</li><li>{if:custom:rainRepelApplicableForTierThree}{textLink:EstimateRainRepelModal,Rain Repel}&trade; treatment{end}</li></ul>",
Image: "",
FooterText: "",
},
@ -332,7 +332,7 @@ export const expectedModifiedAnswers = {
buttonLabel: "Premium service",
buttonLabelSubCopy: "",
buttonBodyCopy:
"<ul><li>Expert windshield repair</li><li>Exclusive resin sealant</li><li>Nationwide lifetime guarantee</li><li>New {textLink:EstimateFrontWiperModal,wiper blades}</li><li></li><li>{textLink:EstimateRainDefenseModal,Rain Defense}&trade; treatment</li></ul>",
"<ul><li>Expert windshield repair</li><li>Exclusive resin sealant</li><li>Nationwide lifetime guarantee</li><li>New {textLink:EstimateFrontWiperModal,wiper blades}</li><li></li><li>{textLink:EstimateRainRepelModal,Rain Repel}&trade; treatment</li></ul>",
buttonAuxillaryCopy: "$621.40",
buttonFooterCopy: "",
},
@ -362,7 +362,7 @@ export const expectedModifiedAnswers = {
buttonLabel: "Premium service",
buttonLabelSubCopy: "",
buttonBodyCopy:
"<ul><li>New replacement windshield</li><li>Expert installation and {textLink:EstimateRecalModal,recalibration}</li><li>Nationwide lifetime warranty</li><li>New {textLink:EstimateFrontWiperModal,wiper blades}</li><li></li><li>{textLink:EstimateRainDefenseModal,Rain Defense}&trade; treatment</li></ul>",
"<ul><li>New replacement windshield</li><li>Expert installation and {textLink:EstimateRecalModal,recalibration}</li><li>Nationwide lifetime warranty</li><li>New {textLink:EstimateFrontWiperModal,wiper blades}</li><li></li><li>{textLink:EstimateRainRepelModal,Rain Repel}&trade; treatment</li></ul>",
buttonAuxillaryCopy: "$621.40",
buttonFooterCopy: "",
},
@ -452,7 +452,7 @@ export const expectedModifiedAnswers = {
buttonLabel: "Premium service",
buttonLabelSubCopy: "",
buttonBodyCopy:
"<ul><li>New replacement glass</li><li>Expert installation</li><li>Nationwide lifetime warranty</li><li>New {textLink:EstimateFrontWiperModal,front wiper blades}</li><li>New {textLink:EstimateRearWiperModal,rear wiper blade}</li><li>{textLink:EstimateRainDefenseModal,Rain Defense}&trade; treatment</li></ul>",
"<ul><li>New replacement glass</li><li>Expert installation</li><li>Nationwide lifetime warranty</li><li>New {textLink:EstimateFrontWiperModal,front wiper blades}</li><li>New {textLink:EstimateRearWiperModal,rear wiper blade}</li><li>{textLink:EstimateRainRepelModal,Rain Repel}&trade; treatment</li></ul>",
buttonAuxillaryCopy: "$495.88",
buttonFooterCopy: "",
},
@ -482,7 +482,7 @@ export const expectedModifiedAnswers = {
buttonLabel: "Premium service",
buttonLabelSubCopy: "",
buttonBodyCopy:
"<ul><li>New replacement glass</li><li>Expert installation</li><li>Nationwide lifetime warranty</li><li></li><li>New {textLink:EstimateRearWiperModal,rear wiper blade}</li><li>{textLink:EstimateRainDefenseModal,Rain Defense}&trade; treatment</li></ul>",
"<ul><li>New replacement glass</li><li>Expert installation</li><li>Nationwide lifetime warranty</li><li></li><li>New {textLink:EstimateRearWiperModal,rear wiper blade}</li><li>{textLink:EstimateRainRepelModal,Rain Repel}&trade; treatment</li></ul>",
buttonAuxillaryCopy: "$410.20",
buttonFooterCopy: "",
},
@ -512,7 +512,7 @@ export const expectedModifiedAnswers = {
buttonLabel: "Premium service",
buttonLabelSubCopy: "",
buttonBodyCopy:
"<ul><li>New replacement glass</li><li>Expert installation</li><li>Nationwide lifetime warranty</li><li>New {textLink:EstimateFrontWiperModal,wiper blades}</li><li></li><li>{textLink:EstimateRainDefenseModal,Rain Defense}&trade; treatment</li></ul>",
"<ul><li>New replacement glass</li><li>Expert installation</li><li>Nationwide lifetime warranty</li><li>New {textLink:EstimateFrontWiperModal,wiper blades}</li><li></li><li>{textLink:EstimateRainRepelModal,Rain Repel}&trade; treatment</li></ul>",
buttonAuxillaryCopy: "$471.40",
buttonFooterCopy: "",
},
@ -532,7 +532,7 @@ export const expectedModifiedAnswers = {
buttonLabel: "Premium service",
buttonLabelSubCopy: "",
buttonBodyCopy:
"<ul><li>New replacement glass</li><li>Expert installation</li><li>Nationwide lifetime warranty</li><li>New {textLink:EstimateFrontWiperModal,wiper blades}</li><li></li><li>{textLink:EstimateRainDefenseModal,Rain Defense}&trade; treatment</li></ul>",
"<ul><li>New replacement glass</li><li>Expert installation</li><li>Nationwide lifetime warranty</li><li>New {textLink:EstimateFrontWiperModal,wiper blades}</li><li></li><li>{textLink:EstimateRainRepelModal,Rain Repel}&trade; treatment</li></ul>",
buttonAuxillaryCopy: "$471.40",
buttonFooterCopy: "",
},
@ -552,7 +552,7 @@ export const expectedModifiedAnswers = {
buttonLabel: "Premium service",
buttonLabelSubCopy: "",
buttonBodyCopy:
"<ul><li>New replacement windshield</li><li>Expert installation</li><li>Nationwide lifetime warranty</li><li></li><li></li><li>{textLink:EstimateRainDefenseModal,Rain Defense}&trade; treatment</li></ul>",
"<ul><li>New replacement windshield</li><li>Expert installation</li><li>Nationwide lifetime warranty</li><li></li><li></li><li>{textLink:EstimateRainRepelModal,Rain Repel}&trade; treatment</li></ul>",
buttonAuxillaryCopy: "$385.72",
buttonFooterCopy: "",
},
@ -572,7 +572,7 @@ export const expectedModifiedAnswers = {
buttonLabel: "Premium service",
buttonLabelSubCopy: "",
buttonBodyCopy:
"<ul><li>New replacement windshield</li><li>Expert installation</li><li>Nationwide lifetime warranty</li><li></li><li></li><li>{textLink:EstimateRainDefenseModal,Rain Defense}&trade; treatment</li></ul>",
"<ul><li>New replacement windshield</li><li>Expert installation</li><li>Nationwide lifetime warranty</li><li></li><li></li><li>{textLink:EstimateRainRepelModal,Rain Repel}&trade; treatment</li></ul>",
buttonAuxillaryCopy: "$385.72",
buttonFooterCopy: "",
},

View file

@ -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,
},
],

View file

@ -26,7 +26,7 @@ import { storeMutations } from "@/constants/store-mutations";
import {
shouldFrontWipersBeAvailable,
shouldRearWipersBeAvailable,
shouldRainDefenseBeAvailable,
shouldRainRepelBeAvailable,
getAvailablePackages,
getHighestRequiredTier,
getPackageContents,
@ -212,8 +212,8 @@ export default {
packageNames.TIER_THREE
);
},
rainDefenseApplicableForTierThree() {
return shouldRainDefenseBeAvailable(
rainRepelApplicableForTierThree() {
return shouldRainRepelBeAvailable(
this.glassToReplace,
this.nullSafeAvailableLineItems,
this.isRepair,
@ -429,8 +429,8 @@ export default {
return this.frontWipersApplicableForTierThree;
case "rearWiperApplicableForTierThree":
return this.rearWiperApplicableForTierThree;
case "rainDefenseApplicableForTierThree":
return this.rainDefenseApplicableForTierThree;
case "rainRepelApplicableForTierThree":
return this.rainRepelApplicableForTierThree;
default:
return null;
}

View file

@ -576,8 +576,8 @@ export default {
lineItem.partType.indexOf("REAR WIPER") !== -1
);
});
var rainDefense = vaps.filter(function (lineItem) {
return lineItem.partType.indexOf("RAIN DEFENSE") !== -1;
var rainRepel = vaps.filter(function (lineItem) {
return lineItem.partType.indexOf("RAIN REPEL") !== -1;
});
// Combine line items
@ -600,8 +600,8 @@ export default {
if (wipers) {
combinedLineItems = combinedLineItems.concat(wipers);
}
if (rainDefense) {
combinedLineItems = combinedLineItems.concat(rainDefense);
if (rainRepel) {
combinedLineItems = combinedLineItems.concat(rainRepel);
}
//Remove child Parts if any

View file

@ -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,

View file

@ -89,7 +89,7 @@ export default {
return (
lineItem.partType != partTypeStrings.FRONT_WIPER &&
lineItem.partType != partTypeStrings.REAR_WIPER &&
lineItem.partType != partTypeStrings.RAIN_DEFENSE
lineItem.partType != partTypeStrings.RAIN_REPEL
);
});

View file

@ -1746,10 +1746,10 @@ export const actions = {
return response;
},
async getRainDefense(context, { pageNameToLog }) {
async getRainRepel(context, { pageNameToLog }) {
const response = await globalMethods.callHttpClient({
method: endpoints.GetRainDefense.method,
endpoint: endpoints.GetRainDefense.url,
method: endpoints.GetRainRepel.method,
endpoint: endpoints.GetRainRepel.url,
logApiCall: true,
pageNameToLog: pageNameToLog,
});
@ -3024,7 +3024,7 @@ export const actions = {
return pricedLineItems;
},
// The <addableVaps> parameter is an array of ALL available front wipers and rain defense
// The <addableVaps> parameter is an array of ALL available front wipers and Rain Repel
// for the vehicle. There is no need to confirm an addableVap is not already on the order
// <lineItemsToUse> is an optional parameter if the lineItems in the store may not be up to date
async validateOrderPromoAndSaveServerData(

View file

@ -123,8 +123,8 @@ $body-color: $gray-600;
//Fonts
$font-family-sans-serif: UrbanistRegular, Arial, Helvetica, sans-serif;
$font-family-monospace:
UrbanistRegular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
$font-family-monospace: UrbanistRegular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
monospace;
// stylelint-enable value-keyword-case
$font-family-base: $font-family-sans-serif;
$font-family-code: $font-family-monospace;