From d3d334f666fca47a01ca4521456345a7747175c6 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Mon, 6 Nov 2023 08:39:46 -0500 Subject: [PATCH] Fixed unit test and Prettified --- src/constants/part-type-strings.js | 2 +- src/fmg-components/cart/cart.spec.js | 2 +- src/fmg-components/cart/cart.vue | 15 ++++++++++++--- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/constants/part-type-strings.js b/src/constants/part-type-strings.js index d7cc11414..fd1f4e781 100644 --- a/src/constants/part-type-strings.js +++ b/src/constants/part-type-strings.js @@ -6,7 +6,7 @@ const partTypeStrings = { RECYCLE_FEE: "RECYCLE FEE", MOBILE_FEE: "MOBILE FEE", REPAIR_FEE: "REPAIR FEE", - EARLY_BIRD: "EARLY BIRD" + EARLY_BIRD: "EARLY BIRD", }; export { partTypeStrings }; diff --git a/src/fmg-components/cart/cart.spec.js b/src/fmg-components/cart/cart.spec.js index bfe1dbb55..ae84083e6 100644 --- a/src/fmg-components/cart/cart.spec.js +++ b/src/fmg-components/cart/cart.spec.js @@ -268,7 +268,7 @@ describe("cart.vue", () => { kitPrice: 0, laborAmount: 34.98, partNumber: "MOBILE FEE", - partType: "REPLACE FEE", + partType: "MOBILE FEE", salesTax: 2.62, sellingPrice: 0, }, diff --git a/src/fmg-components/cart/cart.vue b/src/fmg-components/cart/cart.vue index 169a3e0a9..55516010f 100644 --- a/src/fmg-components/cart/cart.vue +++ b/src/fmg-components/cart/cart.vue @@ -68,7 +68,12 @@ linkType="text" :text="removeLinkText" href="#!" - @click-event="removeItem(premiumAppointmentDiscountCartItem.cartItemType, 'supportingItems')" /> + @click-event=" + removeItem( + premiumAppointmentDiscountCartItem.cartItemType, + 'supportingItems' + ) + " /> {{ currencyFormatter.format(premiumAppointmentDiscountCartItem.subTotal) }} @@ -549,8 +554,12 @@ export default { otherSupportingItemsCartItem() { let cartItem = null; - let otherSupportingItemsLineItems = baseMixin.methods.filterOutFees(this.supportingItems); - otherSupportingItemsLineItems = otherSupportingItemsLineItems.filter(lineItem => lineItem.partType != partTypeStrings.EARLY_BIRD); + let otherSupportingItemsLineItems = baseMixin.methods.filterOutFees( + this.supportingItems + ); + otherSupportingItemsLineItems = otherSupportingItemsLineItems.filter( + (lineItem) => lineItem.partType != partTypeStrings.EARLY_BIRD + ); if (otherSupportingItemsLineItems.length > 0) { cartItem = {