How to use the @spartacus/core.StateEntityLoaderActions.entityFailMeta 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 error = 'anError';
        const action = new CheckoutActions.LoadSupportedDeliveryModesFail(
          error
        );

        expect({ ...action }).toEqual({
          type: CheckoutActions.LOAD_SUPPORTED_DELIVERY_MODES_FAIL,
          payload: error,
          meta: StateEntityLoaderActions.entityFailMeta(
            PROCESS_FEATURE,
            SET_SUPPORTED_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 error = 'anError';
        const action = new CheckoutActions.SetPaymentDetailsFail(error);

        expect({ ...action }).toEqual({
          type: CheckoutActions.SET_PAYMENT_DETAILS_FAIL,
          payload: error,
          meta: StateEntityLoaderActions.entityFailMeta(
            PROCESS_FEATURE,
            SET_PAYMENT_DETAILS_PROCESS_ID,
            error
          ),
        });
      });
    });
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 error = 'anError';
        const action = new CheckoutActions.SetDeliveryModeFail(error);

        expect({ ...action }).toEqual({
          type: CheckoutActions.SET_DELIVERY_MODE_FAIL,
          payload: error,
          meta: StateEntityLoaderActions.entityFailMeta(
            PROCESS_FEATURE,
            SET_DELIVERY_MODE_PROCESS_ID,
            error
          ),
        });
      });
    });
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 error = 'anError';
      const action = new CheckoutActions.SetDeliveryAddressFail(error);

      expect({ ...action }).toEqual({
        type: CheckoutActions.SET_DELIVERY_ADDRESS_FAIL,
        payload: error,
        meta: StateEntityLoaderActions.entityFailMeta(
          PROCESS_FEATURE,
          SET_DELIVERY_ADDRESS_PROCESS_ID,
          error
        ),
      });
    });
  });