CSR-2395
This commit is contained in:
parent
da9bc044ed
commit
44abc67fb3
2 changed files with 17 additions and 8 deletions
|
|
@ -341,12 +341,6 @@ describe("cart.vue", () => {
|
||||||
expect(wrapper.vm.servicePackageDiscountCartItem).not.toBeNull();
|
expect(wrapper.vm.servicePackageDiscountCartItem).not.toBeNull();
|
||||||
expect(wrapper.vm.servicePackageDiscountCartItem.subTotal).toEqual(-70);
|
expect(wrapper.vm.servicePackageDiscountCartItem.subTotal).toEqual(-70);
|
||||||
expect(wrapper.vm.servicePackageDiscountCartItem.salesTax).toEqual(0);
|
expect(wrapper.vm.servicePackageDiscountCartItem.salesTax).toEqual(0);
|
||||||
|
|
||||||
const found =
|
|
||||||
wrapper.vm.cartItems.findIndex(
|
|
||||||
(cartItem) => cartItem == wrapper.vm.servicePackageDiscountCartItem
|
|
||||||
) >= 0;
|
|
||||||
expect(found).toBe(true);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Other Supporting Items Cart Item
|
// Other Supporting Items Cart Item
|
||||||
|
|
|
||||||
|
|
@ -162,10 +162,15 @@ import promoModalQuestion from "@/fmg-components/promo-modal-question/promo-moda
|
||||||
|
|
||||||
// Mixins
|
// Mixins
|
||||||
import baseMixin from "@/mixins/base-mixin.js";
|
import baseMixin from "@/mixins/base-mixin.js";
|
||||||
|
import experimentMixin from "@/mixins/experiment-mixin.js";
|
||||||
|
|
||||||
// Helpers
|
// Helpers
|
||||||
import { deepClone } from "@/helpers/object-helper";
|
import { deepClone } from "@/helpers/object-helper";
|
||||||
import { getHighestFullySatisfiedTier, getPackageContents } from "@/helpers/service-package-helper";
|
import {
|
||||||
|
getHighestFullySatisfiedTier,
|
||||||
|
getPackageContents,
|
||||||
|
getDiscountPackageName,
|
||||||
|
} from "@/helpers/service-package-helper";
|
||||||
import { getPromoCodeWithoutBundleIdentifier } from "@/helpers/promotions-helper";
|
import { getPromoCodeWithoutBundleIdentifier } from "@/helpers/promotions-helper";
|
||||||
import { storeActions } from "@/constants/store-actions";
|
import { storeActions } from "@/constants/store-actions";
|
||||||
|
|
||||||
|
|
@ -174,6 +179,7 @@ import { partTypeStrings } from "@/constants/part-type-strings";
|
||||||
import { cartItemCategories } from "@/constants/cart-item-categories";
|
import { cartItemCategories } from "@/constants/cart-item-categories";
|
||||||
import { cartItemTypes } from "@/constants/cart-item-types";
|
import { cartItemTypes } from "@/constants/cart-item-types";
|
||||||
import { coverageStatus, cartItemTypesCoveredByInsurance } from "@/constants/insurance";
|
import { coverageStatus, cartItemTypesCoveredByInsurance } from "@/constants/insurance";
|
||||||
|
import { experimentSettings } from "@/constants/experiments";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "cart",
|
name: "cart",
|
||||||
|
|
@ -424,7 +430,10 @@ export default {
|
||||||
cartItems.push(this.mobileFeeCartItem);
|
cartItems.push(this.mobileFeeCartItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.servicePackageDiscountCartItem) {
|
if (
|
||||||
|
this.servicePackageDiscountCartItem &&
|
||||||
|
this.discountPackageNames == this.packageLevel
|
||||||
|
) {
|
||||||
cartItems.push(this.servicePackageDiscountCartItem);
|
cartItems.push(this.servicePackageDiscountCartItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -441,6 +450,12 @@ export default {
|
||||||
return cartItems;
|
return cartItems;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
discountPackageNames() {
|
||||||
|
const discountServicePackage = experimentMixin.methods.getSettingValue(
|
||||||
|
experimentSettings.PROMO_ON_PACKAGE
|
||||||
|
);
|
||||||
|
return getDiscountPackageName(discountServicePackage);
|
||||||
|
},
|
||||||
servicePackageTitleWidget() {
|
servicePackageTitleWidget() {
|
||||||
const servicePackageNames = this.getCmsContent(
|
const servicePackageNames = this.getCmsContent(
|
||||||
this.servicePackageOptionsCmsName,
|
this.servicePackageOptionsCmsName,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue