Skip to content

Commit

Permalink
Jasmin test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ShahanaFarooqui committed Oct 4, 2023
1 parent 3b2f178 commit 89d8a44
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/app/shared/test-helpers/mock-services.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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) { };
Expand Down
7 changes: 4 additions & 3 deletions src/app/store/rtl.effects.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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());
});
Expand Down

0 comments on commit 89d8a44

Please sign in to comment.