Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Fix tests related to newer imports #3412

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 40 additions & 2 deletions src/app/auth/switch-org/switch-org.page.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ import { DeepLinkService } from 'src/app/core/services/deep-link.service';
import { platformExpenseData } from 'src/app/core/mock-data/platform/v1/expense.data';
import { transformedExpenseData } from 'src/app/core/mock-data/transformed-expense.data';
import { LaunchDarklyService } from 'src/app/core/services/launch-darkly.service';
import { OrgSettingsService } from 'src/app/core/services/org-settings.service';
import { orgSettingsData } from 'src/app/core/test-data/org-settings.service.spec.data';
import { SpenderOnboardingService } from 'src/app/core/services/spender-onboarding.service';
import { onboardingStatusData } from 'src/app/core/mock-data/onboarding-status.data';
import { OnboardingState } from 'src/app/core/models/onboarding-state.enum';

const roles = ['OWNER', 'USER', 'FYLER'];
const email = 'ajain@fyle.in';
Expand Down Expand Up @@ -73,6 +78,8 @@ describe('SwitchOrgPage', () => {
let transactionService: jasmine.SpyObj<TransactionService>;
let expensesService: jasmine.SpyObj<ExpensesService>;
let deepLinkService: jasmine.SpyObj<DeepLinkService>;
let orgSettingsService: jasmine.SpyObj<OrgSettingsService>;
let spenderOnboardingService: jasmine.SpyObj<SpenderOnboardingService>;

beforeEach(waitForAsync(() => {
const platformSpy = jasmine.createSpyObj('Platform', ['is']);
Expand Down Expand Up @@ -110,6 +117,8 @@ describe('SwitchOrgPage', () => {
const expensesServiceSpy = jasmine.createSpyObj('ExpensesService', ['getExpenseById']);
const deepLinkServiceSpy = jasmine.createSpyObj('DeepLinkService', ['getExpenseRoute']);
const ldSpy = jasmine.createSpyObj('LaunchDarklyService', ['initializeUser']);
const orgSettingsServiceSpy = jasmine.createSpyObj('OrgSettingsService', ['get']);
const spenderOnboardingServiceSpy = jasmine.createSpyObj('SpenderOnboardingSettings', ['getOnboardingSettings']);

TestBed.configureTestingModule({
declarations: [SwitchOrgPage, ActiveOrgCardComponent, OrgCardComponent, FyZeroStateComponent],
Expand Down Expand Up @@ -150,6 +159,14 @@ describe('SwitchOrgPage', () => {
provide: LoaderService,
useValue: loaderServiceSpy,
},
{
provide: OrgSettingsService,
useValue: orgSettingsServiceSpy,
},
{
provide: SpenderOnboardingService,
useValue: spenderOnboardingServiceSpy,
},
{
provide: UserService,
useValue: userServiceSpy,
Expand Down Expand Up @@ -256,11 +273,14 @@ describe('SwitchOrgPage', () => {
deepLinkService = TestBed.inject(DeepLinkService) as jasmine.SpyObj<DeepLinkService>;
transactionService = TestBed.inject(TransactionService) as jasmine.SpyObj<TransactionService>;
expensesService = TestBed.inject(ExpensesService) as jasmine.SpyObj<ExpensesService>;
spenderOnboardingService = TestBed.inject(SpenderOnboardingService) as jasmine.SpyObj<SpenderOnboardingService>;
orgSettingsService = TestBed.inject(OrgSettingsService) as jasmine.SpyObj<OrgSettingsService>;

component.searchRef = fixture.debugElement.query(By.css('#search'));
component.searchOrgsInput = fixture.debugElement.query(By.css('.smartlook-show'));
component.contentRef = fixture.debugElement.query(By.css('.switch-org__content-container__content-block'));
fixture.detectChanges();
spyOn(component, 'navigateToDashboard').and.callThrough();
}));

it('should create', () => {
Expand Down Expand Up @@ -642,16 +662,34 @@ describe('SwitchOrgPage', () => {
});

describe('navigateBasedOnUserStatus(): ', () => {
it('should navigate to dashboard if status is active', (done) => {
it('should navigate to dashboard if status is active', fakeAsync(() => {
const config = {
isPendingDetails: false,
roles,
eou: apiEouRes,
};

orgSettingsService.get.and.returnValue(of(orgSettingsData));
spenderOnboardingService.getOnboardingStatus.and.returnValue(
of({ ...onboardingStatusData, state: OnboardingState.COMPLETED })
);
tick();
component.navigateBasedOnUserStatus(config).subscribe((res) => {
expect(res).toBeNull();
expect(router.navigate).toHaveBeenCalledOnceWith(['/', 'enterprise', 'my_dashboard']);
});
}));
Comment on lines +665 to +680
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Mind it! The test case looks solid, but let's add more assertions!

The test case properly verifies navigation when status is active, but we can make it even more robust by adding assertions for the service calls.

Add these assertions to verify service interactions:

 it('should navigate to dashboard if status is active', fakeAsync(() => {
   const config = {
     isPendingDetails: false,
     roles,
     eou: apiEouRes,
   };
   orgSettingsService.get.and.returnValue(of(orgSettingsData));
   spenderOnboardingService.getOnboardingStatus.and.returnValue(
     of({ ...onboardingStatusData, state: OnboardingState.COMPLETED })
   );
   tick();
   component.navigateBasedOnUserStatus(config).subscribe((res) => {
     expect(res).toBeNull();
     expect(router.navigate).toHaveBeenCalledOnceWith(['/', 'enterprise', 'my_dashboard']);
+    expect(orgSettingsService.get).toHaveBeenCalledTimes(1);
+    expect(spenderOnboardingService.getOnboardingStatus).toHaveBeenCalledTimes(1);
   });
 }));
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
it('should navigate to dashboard if status is active', fakeAsync(() => {
const config = {
isPendingDetails: false,
roles,
eou: apiEouRes,
};
orgSettingsService.get.and.returnValue(of(orgSettingsData));
spenderOnboardingService.getOnboardingStatus.and.returnValue(
of({ ...onboardingStatusData, state: OnboardingState.COMPLETED })
);
tick();
component.navigateBasedOnUserStatus(config).subscribe((res) => {
expect(res).toBeNull();
expect(router.navigate).toHaveBeenCalledOnceWith(['/', 'enterprise', 'my_dashboard']);
});
}));
it('should navigate to dashboard if status is active', fakeAsync(() => {
const config = {
isPendingDetails: false,
roles,
eou: apiEouRes,
};
orgSettingsService.get.and.returnValue(of(orgSettingsData));
spenderOnboardingService.getOnboardingStatus.and.returnValue(
of({ ...onboardingStatusData, state: OnboardingState.COMPLETED })
);
tick();
component.navigateBasedOnUserStatus(config).subscribe((res) => {
expect(res).toBeNull();
expect(router.navigate).toHaveBeenCalledOnceWith(['/', 'enterprise', 'my_dashboard']);
expect(orgSettingsService.get).toHaveBeenCalledTimes(1);
expect(spenderOnboardingService.getOnboardingStatus).toHaveBeenCalledTimes(1);
});
}));


it('should navigate to spender onboarding if status not COMPLETE', (done) => {
const config = {
isPendingDetails: false,
roles,
eou: apiEouRes,
};
orgSettingsService.get.and.returnValue(of(orgSettingsData));
spenderOnboardingService.getOnboardingStatus.and.returnValue(of(onboardingStatusData));
component.navigateBasedOnUserStatus(config).subscribe((res) => {
expect(res).toBeNull();
expect(router.navigate).toHaveBeenCalledOnceWith(['/', 'enterprise', 'spender_onboarding']);
done();
Comment on lines +682 to 693
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

The test is powerful, but let's make it legendary!

Consider adding a test case for when some enrollment settings are enabled but others aren't.

it('should navigate to dashboard when no enrollment settings are enabled', (done) => {
  const config = {
    isPendingDetails: false,
    roles,
    eou: apiEouRes,
  };
  orgSettingsService.get.and.returnValue(of({
    ...orgSettingsData,
    visa_enrollment_settings: { enabled: false },
    mastercard_enrollment_settings: { enabled: false },
    amex_feed_enrollment_settings: { enabled: false }
  }));
  spenderOnboardingService.getOnboardingStatus.and.returnValue(of(onboardingStatusData));
  component.navigateBasedOnUserStatus(config).subscribe((res) => {
    expect(res).toBeNull();
    expect(router.navigate).toHaveBeenCalledWith(['/', 'enterprise', 'my_dashboard']);
    done();
  });
});

Comment on lines +682 to 693
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Superstar! The test is good, but let's make it even better!

The test case verifies navigation to spender onboarding, but we can enhance it with more assertions and proper async handling.

Transform the test to use fakeAsync for better async control:

-it('should navigate to spender onboarding if status not COMPLETE', (done) => {
+it('should navigate to spender onboarding if status not COMPLETE', fakeAsync(() => {
   const config = {
     isPendingDetails: false,
     roles,
     eou: apiEouRes,
   };
   orgSettingsService.get.and.returnValue(of(orgSettingsData));
   spenderOnboardingService.getOnboardingStatus.and.returnValue(of(onboardingStatusData));
+  tick();
   component.navigateBasedOnUserStatus(config).subscribe((res) => {
     expect(res).toBeNull();
     expect(router.navigate).toHaveBeenCalledOnceWith(['/', 'enterprise', 'spender_onboarding']);
+    expect(orgSettingsService.get).toHaveBeenCalledTimes(1);
+    expect(spenderOnboardingService.getOnboardingStatus).toHaveBeenCalledTimes(1);
-    done();
   });
+  tick();
 }));
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
it('should navigate to spender onboarding if status not COMPLETE', (done) => {
const config = {
isPendingDetails: false,
roles,
eou: apiEouRes,
};
orgSettingsService.get.and.returnValue(of(orgSettingsData));
spenderOnboardingService.getOnboardingStatus.and.returnValue(of(onboardingStatusData));
component.navigateBasedOnUserStatus(config).subscribe((res) => {
expect(res).toBeNull();
expect(router.navigate).toHaveBeenCalledOnceWith(['/', 'enterprise', 'spender_onboarding']);
done();
it('should navigate to spender onboarding if status not COMPLETE', fakeAsync(() => {
const config = {
isPendingDetails: false,
roles,
eou: apiEouRes,
};
orgSettingsService.get.and.returnValue(of(orgSettingsData));
spenderOnboardingService.getOnboardingStatus.and.returnValue(of(onboardingStatusData));
tick();
component.navigateBasedOnUserStatus(config).subscribe((res) => {
expect(res).toBeNull();
expect(router.navigate).toHaveBeenCalledOnceWith(['/', 'enterprise', 'spender_onboarding']);
expect(orgSettingsService.get).toHaveBeenCalledTimes(1);
expect(spenderOnboardingService.getOnboardingStatus).toHaveBeenCalledTimes(1);
});
tick();
}));

});
});
Expand Down
8 changes: 6 additions & 2 deletions src/app/auth/switch-org/switch-org.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import { TransactionService } from 'src/app/core/services/transaction.service';
import { DeepLinkService } from 'src/app/core/services/deep-link.service';
import { ExpensesService } from 'src/app/core/services/platform/v1/spender/expenses.service';
import { LaunchDarklyService } from 'src/app/core/services/launch-darkly.service';
import { OrgSettings } from 'src/app/core/models/org-settings.model';
import { OrgSettingsService } from 'src/app/core/services/org-settings.service';
import { SpenderOnboardingService } from 'src/app/core/services/spender-onboarding.service';
import { OnboardingState } from 'src/app/core/models/onboarding-state.enum';
Expand Down Expand Up @@ -321,7 +320,12 @@ export class SwitchOrgPage implements OnInit, AfterViewChecked {
navigateToDashboard(openOptInDialog?: boolean): void {
forkJoin([this.orgSettingsService.get(), this.spenderOnboardingService.getOnboardingStatus()]).subscribe(
([orgSettings, onboardingStatus]) => {
if (onboardingStatus.state !== OnboardingState.COMPLETED) {
if (
(orgSettings.visa_enrollment_settings.enabled ||
orgSettings.mastercard_enrollment_settings.enabled ||
orgSettings.amex_feed_enrollment_settings.enabled) &&
onboardingStatus.state !== OnboardingState.COMPLETED
) {
Comment on lines +323 to +328
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Mind it! Let's simplify this complex condition, shall we?

The condition checking multiple enrollment settings can be simplified using Array.some() for better readability, macha! 🕶️

-        if (
-          (orgSettings.visa_enrollment_settings.enabled ||
-            orgSettings.mastercard_enrollment_settings.enabled ||
-            orgSettings.amex_feed_enrollment_settings.enabled) &&
-          onboardingStatus.state !== OnboardingState.COMPLETED
-        ) {
+        const hasEnabledEnrollment = [
+          orgSettings.visa_enrollment_settings,
+          orgSettings.mastercard_enrollment_settings,
+          orgSettings.amex_feed_enrollment_settings
+        ].some(setting => setting.enabled);
+        
+        if (hasEnabledEnrollment && onboardingStatus.state !== OnboardingState.COMPLETED) {
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if (
(orgSettings.visa_enrollment_settings.enabled ||
orgSettings.mastercard_enrollment_settings.enabled ||
orgSettings.amex_feed_enrollment_settings.enabled) &&
onboardingStatus.state !== OnboardingState.COMPLETED
) {
const hasEnabledEnrollment = [
orgSettings.visa_enrollment_settings,
orgSettings.mastercard_enrollment_settings,
orgSettings.amex_feed_enrollment_settings
].some(setting => setting.enabled);
if (hasEnabledEnrollment && onboardingStatus.state !== OnboardingState.COMPLETED) {

this.router.navigate(['/', 'enterprise', 'spender_onboarding']);
} else {
this.router.navigate([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@
role="button"
(click)="enrollCards()"
appFormButtonValidation
[disabled]="!fg.valid"
[loading]="cardsEnrolling"
[loadingText]="'Continue'"
>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
import { HttpErrorResponse } from '@angular/common/http';
import {
ChangeDetectorRef,
Component,
EventEmitter,
Input,
OnChanges,
OnInit,
Output,
SimpleChanges,
} from '@angular/core';
import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';
import { AbstractControl, FormBuilder, FormControl, FormGroup, ValidationErrors, Validators } from '@angular/forms';
import { PopoverController } from '@ionic/angular';
import { error } from 'console';
import { catchError, concatMap, from, map, noop, of, switchMap, tap } from 'rxjs';
import { catchError, concatMap, from, map, of } from 'rxjs';
import { CardNetworkType } from 'src/app/core/enums/card-network-type';
import { OrgSettings } from 'src/app/core/models/org-settings.model';
import { OverlayResponse } from 'src/app/core/models/overlay-response.modal';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<ng-container *ngIf="optInFlowState === OptInFlowState.MOBILE_INPUT">
<div class="opt-in-step__mobile-input-container">
<div class="opt-in-step__mobile-input-container__label">
<span> Mobile number </span>
<span> Mobile Number </span>
</div>
<input
#mobileInput
Expand Down Expand Up @@ -91,8 +91,21 @@
</div>
</div>

<div class="opt-in-step__primary-cta-container" *ngIf="optInFlowState === OptInFlowState.MOBILE_INPUT">
<ion-button class="btn-primary opt-in-step__primary-cta" fill="clear" role="button" (click)="saveMobileNumber()">
<div
class="opt-in-step__cta-container"
[ngClass]="{ 'opt-in-step__without-go-back': !showGoBackCta, 'opt-in-step__with-go-back': showGoBackCta }"
>
<div fill="clear" class="opt-in-step__cta-secondary" (click)="goBackToConnectCard()" *ngIf="showGoBackCta">
<ion-icon class="opt-in-step__arrow-icon" [src]="'/assets/svg/arrow-left.svg'" slot="icon-only"></ion-icon>
<span class="opt-in-step__cta-text">Go back</span>
</div>
<ion-button
*ngIf="optInFlowState === OptInFlowState.MOBILE_INPUT"
class="btn-primary opt-in-step__primary-cta"
fill="clear"
role="button"
(click)="saveMobileNumber()"
>
Continue
</ion-button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,17 @@
height: 100%;
}

&__primary-cta-container {
&__cta-container {
display: flex;
flex-direction: row;
justify-content: flex-end;
}

&__card-number-input {
width: fit-content !important;
margin-right: 24px;
&::placeholder {
word-spacing: 24px;
}
&__with-go-back {
justify-content: space-between;
}

&__without-go-back {
justify-content: flex-end;
}

&__heading {
Expand All @@ -46,6 +45,7 @@
&__primary-cta {
width: 108px;
align-self: flex-end;
margin-bottom: 20px;
}

&__toolbar-title {
Expand Down Expand Up @@ -73,7 +73,7 @@
}

&__input-container {
padding: 16px 16px 8px;
padding: 16px 16px 8px 16px;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn't the shorthand work?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

accidentally added it back from a different PR

border-radius: 8px;
border: 1px solid $grey;

Expand Down Expand Up @@ -269,22 +269,11 @@
}
}

&__primary-cta {
margin: 16px auto;
width: 90%;

.mat-button-base {
width: 100%;
font-weight: 700;
min-height: 47px;
}
}

&__otp-container {
display: flex;
justify-content: center;
justify-content: flex-start;
align-items: center;
margin-bottom: 32px;
margin-bottom: 16px;

&__label {
margin: 0 8px 0 0;
Expand Down Expand Up @@ -400,15 +389,29 @@
font-size: 14px;
}
}

&__help-article-icon {
margin: 4px 0px 0px 6px;
width: 14px;
height: 14px;
}
}

&__footer {
margin-bottom: calc(env(safe-area-inset-bottom));
}

&__cta-text {
font-size: 14px;
font-weight: 500;
}

&__arrow-icon {
margin-right: 6px;
height: 18px;
width: 18px;
}

&__cta-secondary {
display: flex;
align-items: center;
justify-content: center;
color: $blue-black;
flex-direction: row;
padding: 16px 0;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import { snackbarPropertiesRes2 } from 'src/app/core/mock-data/snackbar-properti
import { ToastMessageComponent } from 'src/app/shared/components/toast-message/toast-message.component';
import { UserEventService } from 'src/app/core/services/user-event.service';
import { FormBuilder } from '@angular/forms';
import { SpenderOnboardingService } from 'src/app/core/services/spender-onboarding.service';
import { onboardingStatusData } from 'src/app/core/mock-data/onboarding-status.data';

describe('SpenderOnboardingOptInStepComponent', () => {
let component: SpenderOnboardingOptInStepComponent;
Expand All @@ -35,8 +37,8 @@ describe('SpenderOnboardingOptInStepComponent', () => {
let trackingService: jasmine.SpyObj<TrackingService>;
let matSnackbar: jasmine.SpyObj<MatSnackBar>;
let loaderService: jasmine.SpyObj<LoaderService>;
let platformHandlerService: jasmine.SpyObj<PlatformHandlerService>;
let userEventService: jasmine.SpyObj<UserEventService>;
let spenderOnboardingService: jasmine.SpyObj<SpenderOnboardingService>;
let fb: FormBuilder;

beforeEach(waitForAsync(() => {
Expand All @@ -63,6 +65,7 @@ describe('SpenderOnboardingOptInStepComponent', () => {
const browserHandlerServiceSpy = jasmine.createSpyObj('BrowserHandlerService', ['openLinkWithToolbarColor']);
const platformHandlerServiceSpy = jasmine.createSpyObj('PlatformHandlerService', ['registerBackButtonAction']);
const userEventServiceSpy = jasmine.createSpyObj('UserEventService', ['clearTaskCache']);
const spenderOnboardingServiceSpy = jasmine.createSpyObj('SpenderOnboardingService', ['getOnboardingStatus']);

TestBed.configureTestingModule({
declarations: [SpenderOnboardingOptInStepComponent],
Expand All @@ -80,6 +83,7 @@ describe('SpenderOnboardingOptInStepComponent', () => {
{ provide: BrowserHandlerService, useValue: browserHandlerServiceSpy },
{ provide: PlatformHandlerService, useValue: platformHandlerServiceSpy },
{ provide: UserEventService, useValue: userEventServiceSpy },
{ provide: SpenderOnboardingService, useValue: spenderOnboardingServiceSpy },
],
schemas: [NO_ERRORS_SCHEMA],
}).compileComponents();
Expand All @@ -96,7 +100,7 @@ describe('SpenderOnboardingOptInStepComponent', () => {
trackingService = TestBed.inject(TrackingService) as jasmine.SpyObj<TrackingService>;
matSnackbar = TestBed.inject(MatSnackBar) as jasmine.SpyObj<MatSnackBar>;
loaderService = TestBed.inject(LoaderService) as jasmine.SpyObj<LoaderService>;
platformHandlerService = TestBed.inject(PlatformHandlerService) as jasmine.SpyObj<PlatformHandlerService>;
spenderOnboardingService = TestBed.inject(SpenderOnboardingService) as jasmine.SpyObj<SpenderOnboardingService>;
userEventService = TestBed.inject(UserEventService) as jasmine.SpyObj<UserEventService>;
fb = TestBed.inject(FormBuilder);
}));
Expand All @@ -108,6 +112,9 @@ describe('SpenderOnboardingOptInStepComponent', () => {
describe('ngOnInit():', () => {
beforeEach(() => {
component.eou = cloneDeep(eouRes2);
spenderOnboardingService.getOnboardingStatus.and.returnValue(
of({ ...onboardingStatusData, step_connect_cards_is_skipped: true })
);
Comment on lines +115 to +117
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Testing like a boss! But let's make it even more powerful!

The test setup for onboarding status is good, but let's add more test cases for different scenarios.

Add these test cases to cover all scenarios:

it('should not show back CTA when step_connect_cards_is_skipped is false', () => {
  spenderOnboardingService.getOnboardingStatus.and.returnValue(
    of({ ...onboardingStatusData, step_connect_cards_is_skipped: false })
  );
  fixture.detectChanges();
  expect(component.showGoBackCta).toBeFalse();
});

it('should handle error in getOnboardingStatus', () => {
  spenderOnboardingService.getOnboardingStatus.and.returnValue(
    throwError(() => new Error('Network error'))
  );
  fixture.detectChanges();
  expect(component.showGoBackCta).toBeFalse();
});

});

it('should not set mobileNumberInputValue if mobile number is not present in DB', () => {
Expand Down
Loading
Loading