Skip to content

Commit

Permalink
feature/bundles-mooncake: fix ut error
Browse files Browse the repository at this point in the history
  • Loading branch information
leowangchao committed Oct 14, 2024
1 parent 03b32d3 commit 3e7e2ee
Showing 1 changed file with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
* SPDX-License-Identifier: Apache-2.0
*/

import { ErrorAction, StateUtils } from '@spartacus/core';
import { StateUtils } from '@spartacus/core';
import { OrderEntry } from '@spartacus/cart/base/root';
import { MULTI_CART_DATA } from '../multi-cart-state';
import { ErrorAction } from '@spartacus/core';

export const CART_REMOVE_ENTRYGROUP = '[Cart-entrygroup] Remove EntryGroup';
export const CART_REMOVE_ENTRYGROUP_SUCCESS = '[Cart-entrygroup] Remove EntryGroup Success';
Expand Down Expand Up @@ -41,7 +42,9 @@ export class CartRemoveEntryGroupFail extends StateUtils.EntityProcessesDecremen
) {
super(MULTI_CART_DATA, payload.cartId);
}
error: Object;
get error() {
return this.payload.error;
}
}

export class CartAddToEntryGroup extends StateUtils.EntityProcessesIncrementAction {
Expand Down Expand Up @@ -81,18 +84,13 @@ export class CartAddToEntryGroupSuccess extends StateUtils.EntityProcessesDecrem
export class CartAddToEntryGroupFail extends StateUtils.EntityProcessesDecrementAction implements ErrorAction {
readonly type = CART_ADD_TO_ENTRYGROUP_FAIL;
constructor(
public payload: {
error: any;
userId: string;
cartId: string;
entryGroupNumber: number;
productCode: string;
quantity: number;
}
public payload: { error: any; userId: string; cartId: string; entryGroupNumber: number; productCode: string; quantity: number }
) {
super(MULTI_CART_DATA, payload.cartId);
}
error: Object;
get error() {
return this.payload.error;
}
}

export type CartEntryGroupAction =
Expand Down

0 comments on commit 3e7e2ee

Please sign in to comment.