Jasmin test fix

pull/1301/head
ShahanaFarooqui 7 months ago
parent 3b2f17873a
commit 89d8a44164

@ -1,5 +1,5 @@
import { HttpResponse } from '@angular/common/http';
import { BehaviorSubject, of, throwError } from 'rxjs';
import { BehaviorSubject, Observable, of, throwError } from 'rxjs';
import { API_URL, CLNActions } from '../services/consts-enums-functions';
import { mockResponseData } from './test-data';
@ -154,6 +154,7 @@ export class mockSessionService {
export class mockLoopService {
public swapsChanged = new BehaviorSubject<any[]>([]);
getLoopInfo() { return new Observable<any>(null); };
getSwapsList() { };
listSwaps() { };
loopOut(amount: number, chanId: string, targetConf: number, swapRoutingFee: number, minerFee: number, prepayRoutingFee: number, prepayAmt: number, swapFee: number, swapPublicationDeadline: number, destAddress: string) { };

@ -26,7 +26,7 @@ import { API_END_POINTS, APICallStatusEnum, RTLActions, UI_MESSAGES } from '../s
import { RTLEffects } from './rtl.effects';
import { RTLState } from './rtl.state';
import { updateRootAPICallStatus, openSpinner, closeSpinner, openAlert, resetRootStore } from './rtl.actions';
import { resetLNDStore, fetchInfoLND } from '../lnd/store/lnd.actions';
import { resetLNDStore, fetchInfoLND, fetchPageSettings as fetchPageSettingsLND } from '../lnd/store/lnd.actions';
import { resetCLNStore } from '../cln/store/cln.actions';
import { resetECLStore } from '../eclair/store/ecl.actions';
@ -91,8 +91,9 @@ describe('RTL Root Effects', () => {
expect(storeDispatchSpy.calls.all()[5].args[0]).toEqual(resetLNDStore({ payload: mockActionsData.resetChildrenStores }));
expect(storeDispatchSpy.calls.all()[6].args[0]).toEqual(resetCLNStore({ payload: mockActionsData.resetChildrenStores }));
expect(storeDispatchSpy.calls.all()[7].args[0]).toEqual(resetECLStore({ payload: mockActionsData.resetChildrenStores }));
expect(storeDispatchSpy.calls.all()[8].args[0]).toEqual(fetchInfoLND({ payload: { loadPage: 'HOME' } }));
expect(storeDispatchSpy).toHaveBeenCalledTimes(9);
expect(storeDispatchSpy.calls.all()[8].args[0]).toEqual(fetchPageSettingsLND());
expect(storeDispatchSpy.calls.all()[9].args[0]).toEqual(fetchInfoLND({ payload: { loadPage: 'HOME' } }));
expect(storeDispatchSpy).toHaveBeenCalledTimes(10);
done();
setTimeout(() => sub.unsubscribe());
});

Loading…
Cancel
Save