How to use the @spartacus/core.StateEntityLoaderActions.entityLoadMeta function in @spartacus/core

To help you get started, we’ve selected a few @spartacus/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SAP / cloud-commerce-spartacus-storefront / projects / core / src / checkout / store / actions / checkout.action.spec.ts View on Github external
it('should create the action', () => {
        const payload = {
          userId,
          cartId,
          selectedModeId: selectedModeId,
        };

        const action = new CheckoutActions.SetDeliveryMode(payload);
        expect({ ...action }).toEqual({
          type: CheckoutActions.SET_DELIVERY_MODE,
          payload,
          meta: StateEntityLoaderActions.entityLoadMeta(
            PROCESS_FEATURE,
            SET_DELIVERY_MODE_PROCESS_ID
          ),
        });
      });
    });
github SAP / cloud-commerce-spartacus-storefront / projects / core / src / checkout / store / actions / checkout.action.spec.ts View on Github external
it('should create the action', () => {
      const payload = {
        userId,
        cartId,
        address,
      };

      const action = new CheckoutActions.SetDeliveryAddress(payload);
      expect({ ...action }).toEqual({
        type: CheckoutActions.SET_DELIVERY_ADDRESS,
        payload,
        meta: StateEntityLoaderActions.entityLoadMeta(
          PROCESS_FEATURE,
          SET_DELIVERY_ADDRESS_PROCESS_ID
        ),
      });
    });
  });
github SAP / cloud-commerce-spartacus-storefront / projects / core / src / checkout / store / actions / checkout.action.spec.ts View on Github external
it('should create the action', () => {
        const payload = {
          userId,
          cartId,
          paymentDetails: paymentDetails,
        };

        const action = new CheckoutActions.SetPaymentDetails(payload);
        expect({ ...action }).toEqual({
          type: CheckoutActions.SET_PAYMENT_DETAILS,
          payload,
          meta: StateEntityLoaderActions.entityLoadMeta(
            PROCESS_FEATURE,
            SET_PAYMENT_DETAILS_PROCESS_ID
          ),
        });
      });
    });
github SAP / cloud-commerce-spartacus-storefront / projects / core / src / checkout / store / actions / checkout.action.spec.ts View on Github external
it('should create the action', () => {
        const payload = {
          userId,
          cartId,
        };

        const action = new CheckoutActions.LoadSupportedDeliveryModes(payload);
        expect({ ...action }).toEqual({
          type: CheckoutActions.LOAD_SUPPORTED_DELIVERY_MODES,
          payload,
          meta: StateEntityLoaderActions.entityLoadMeta(
            PROCESS_FEATURE,
            SET_SUPPORTED_DELIVERY_MODE_PROCESS_ID
          ),
        });
      });
    });