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(
|
||||
(lineItemsToKeep) => lineItemsToKeep.cartItemType != cartItemType
|
||||
);
|
||||
if (category == cartItemCategories.VAPS) {
|
||||
await this.dispatchStoreAction(storeActions.SAVE_VAPS, this.lineItems.vaps, false);
|
||||
if (category == cartItemCategories.VAPS || category == cartItemCategories.PROMOS) {
|
||||
this.saveVaps(this.lineItems);
|
||||
}
|
||||
if (category == cartItemCategories.SUPPORTING_ITEMS) {
|
||||
await this.dispatchStoreAction(
|
||||
|
|
@ -750,7 +750,8 @@ export default {
|
|||
return this.getCmsContent("RecycleFeeTextWidget", "Text");
|
||||
},
|
||||
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;
|
||||
} else {
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -19,6 +19,11 @@ jest.mock("@/mixins/base-mixin", () => ({
|
|||
return mockReturnsForStoreActions[action];
|
||||
}
|
||||
),
|
||||
dispatchStoreAction: jest.fn(
|
||||
(action, { promoCode, addableVaps }, pageNameToLog, someBool) => {
|
||||
return mockReturnsForStoreActions[action];
|
||||
}
|
||||
),
|
||||
},
|
||||
}));
|
||||
|
||||
|
|
@ -286,6 +291,13 @@ describe("promo-modal-question.vue", () => {
|
|||
(lineItemsToKeep) =>
|
||||
getPromoCodeWithoutBundleIdentifier(lineItemsToKeep.promoCode) != promo
|
||||
));
|
||||
await baseMixin.methods.dispatchStoreAction(
|
||||
storeActions.SAVE_ACTIVE_AND_OR_INACTIVE_PROMOS,
|
||||
{
|
||||
activePromos: lineItems.promos,
|
||||
},
|
||||
false
|
||||
);
|
||||
|
||||
//Assert
|
||||
expect(existingPromo).toEqual(lineItems.promos);
|
||||
|
|
|
|||
|
|
@ -230,6 +230,13 @@ export default {
|
|||
(lineItemsToKeep) =>
|
||||
getPromoCodeWithoutBundleIdentifier(lineItemsToKeep.promoCode) != promo
|
||||
);
|
||||
await baseMixin.methods.dispatchStoreAction(
|
||||
storeActions.SAVE_ACTIVE_AND_OR_INACTIVE_PROMOS,
|
||||
{
|
||||
activePromos: this.lineItems.promos,
|
||||
},
|
||||
false
|
||||
);
|
||||
},
|
||||
getErrorMessage(error, additionalInfo) {
|
||||
switch (error) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue