CSR-2416
This commit is contained in:
parent
73fc4d877f
commit
7ef8bc0b86
3 changed files with 23 additions and 3 deletions
|
|
@ -298,8 +298,8 @@ export default {
|
||||||
this.lineItems[category] = this.lineItems[category].filter(
|
this.lineItems[category] = this.lineItems[category].filter(
|
||||||
(lineItemsToKeep) => lineItemsToKeep.cartItemType != cartItemType
|
(lineItemsToKeep) => lineItemsToKeep.cartItemType != cartItemType
|
||||||
);
|
);
|
||||||
if (category == cartItemCategories.VAPS) {
|
if (category == cartItemCategories.VAPS || category == cartItemCategories.PROMOS) {
|
||||||
await this.dispatchStoreAction(storeActions.SAVE_VAPS, this.lineItems.vaps, false);
|
this.saveVaps(this.lineItems);
|
||||||
}
|
}
|
||||||
if (category == cartItemCategories.SUPPORTING_ITEMS) {
|
if (category == cartItemCategories.SUPPORTING_ITEMS) {
|
||||||
await this.dispatchStoreAction(
|
await this.dispatchStoreAction(
|
||||||
|
|
@ -750,7 +750,8 @@ export default {
|
||||||
return this.getCmsContent("RecycleFeeTextWidget", "Text");
|
return this.getCmsContent("RecycleFeeTextWidget", "Text");
|
||||||
},
|
},
|
||||||
showRecycleFeeCartItem() {
|
showRecycleFeeCartItem() {
|
||||||
if (!this.isInsurance || this.isItac || this.isNoComp) { // CASH, ITAC, NOCOMP ORDERS
|
if (!this.isInsurance || this.isItac || this.isNoComp) {
|
||||||
|
// CASH, ITAC, NOCOMP ORDERS
|
||||||
return !this.isRepair;
|
return !this.isRepair;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,11 @@ jest.mock("@/mixins/base-mixin", () => ({
|
||||||
return mockReturnsForStoreActions[action];
|
return mockReturnsForStoreActions[action];
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
|
dispatchStoreAction: jest.fn(
|
||||||
|
(action, { promoCode, addableVaps }, pageNameToLog, someBool) => {
|
||||||
|
return mockReturnsForStoreActions[action];
|
||||||
|
}
|
||||||
|
),
|
||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
@ -286,6 +291,13 @@ describe("promo-modal-question.vue", () => {
|
||||||
(lineItemsToKeep) =>
|
(lineItemsToKeep) =>
|
||||||
getPromoCodeWithoutBundleIdentifier(lineItemsToKeep.promoCode) != promo
|
getPromoCodeWithoutBundleIdentifier(lineItemsToKeep.promoCode) != promo
|
||||||
));
|
));
|
||||||
|
await baseMixin.methods.dispatchStoreAction(
|
||||||
|
storeActions.SAVE_ACTIVE_AND_OR_INACTIVE_PROMOS,
|
||||||
|
{
|
||||||
|
activePromos: lineItems.promos,
|
||||||
|
},
|
||||||
|
false
|
||||||
|
);
|
||||||
|
|
||||||
//Assert
|
//Assert
|
||||||
expect(existingPromo).toEqual(lineItems.promos);
|
expect(existingPromo).toEqual(lineItems.promos);
|
||||||
|
|
|
||||||
|
|
@ -230,6 +230,13 @@ export default {
|
||||||
(lineItemsToKeep) =>
|
(lineItemsToKeep) =>
|
||||||
getPromoCodeWithoutBundleIdentifier(lineItemsToKeep.promoCode) != promo
|
getPromoCodeWithoutBundleIdentifier(lineItemsToKeep.promoCode) != promo
|
||||||
);
|
);
|
||||||
|
await baseMixin.methods.dispatchStoreAction(
|
||||||
|
storeActions.SAVE_ACTIVE_AND_OR_INACTIVE_PROMOS,
|
||||||
|
{
|
||||||
|
activePromos: this.lineItems.promos,
|
||||||
|
},
|
||||||
|
false
|
||||||
|
);
|
||||||
},
|
},
|
||||||
getErrorMessage(error, additionalInfo) {
|
getErrorMessage(error, additionalInfo) {
|
||||||
switch (error) {
|
switch (error) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue