diff --git a/src/app/fyle/my-profile/my-profile.page.html b/src/app/fyle/my-profile/my-profile.page.html
index 4b34d43b88..eb1b781ac9 100644
--- a/src/app/fyle/my-profile/my-profile.page.html
+++ b/src/app/fyle/my-profile/my-profile.page.html
@@ -23,7 +23,7 @@
(optInClicked)="optInMobileNumber($event)"
(optOutClicked)="optOutClick()"
(editMobileNumberClicked)="optInMobileNumber($event)"
- (deleteMobileNumberClicked)="onDeleteCTAClicked($event)"
+ (deleteMobileNumberClicked)="onDeleteCTAClicked()"
>
@@ -33,7 +33,7 @@
diff --git a/src/app/shared/components/mobile-number-card/mobile-number-card.component.spec.ts b/src/app/shared/components/mobile-number-card/mobile-number-card.component.spec.ts
index e096ecea28..594e624ec8 100644
--- a/src/app/shared/components/mobile-number-card/mobile-number-card.component.spec.ts
+++ b/src/app/shared/components/mobile-number-card/mobile-number-card.component.spec.ts
@@ -40,7 +40,14 @@ describe('MobileNumberCardComponent', () => {
it('editMobileNumber(): should emit editMobileNumberClicked event', () => {
spyOn(component.editMobileNumberClicked, 'emit');
+ component.extendedOrgUser = apiEouRes;
component.editMobileNumber();
- expect(component.editMobileNumberClicked.emit).toHaveBeenCalled();
+ expect(component.editMobileNumberClicked.emit).toHaveBeenCalledOnceWith(apiEouRes);
+ });
+
+ it('deleteMobileNumber(): should emit deleteMobileNumberClicked event', () => {
+ spyOn(component.deleteMobileNumberClicked, 'emit');
+ component.deleteMobileNumber();
+ expect(component.deleteMobileNumberClicked.emit).toHaveBeenCalledTimes(1);
});
});
diff --git a/src/app/shared/components/mobile-number-card/mobile-number-card.component.ts b/src/app/shared/components/mobile-number-card/mobile-number-card.component.ts
index df9d5393c2..db9b75ec0f 100644
--- a/src/app/shared/components/mobile-number-card/mobile-number-card.component.ts
+++ b/src/app/shared/components/mobile-number-card/mobile-number-card.component.ts
@@ -11,7 +11,7 @@ export class MobileNumberCardComponent implements OnInit {
@Output() addMobileNumberClicked = new EventEmitter();
- @Output() deleteMobileNumberClicked = new EventEmitter();
+ @Output() deleteMobileNumberClicked = new EventEmitter();
@Output() editMobileNumberClicked = new EventEmitter();
@@ -30,6 +30,6 @@ export class MobileNumberCardComponent implements OnInit {
}
deleteMobileNumber(): void {
- this.deleteMobileNumberClicked.emit(this.extendedOrgUser);
+ this.deleteMobileNumberClicked.emit();
}
}
diff --git a/src/app/shared/components/profile-opt-in-card/profile-opt-in-card.component.spec.ts b/src/app/shared/components/profile-opt-in-card/profile-opt-in-card.component.spec.ts
index 7d4406f863..ce07e05030 100644
--- a/src/app/shared/components/profile-opt-in-card/profile-opt-in-card.component.spec.ts
+++ b/src/app/shared/components/profile-opt-in-card/profile-opt-in-card.component.spec.ts
@@ -113,6 +113,6 @@ describe('ProfileOptInCardComponent', () => {
spyOn(component.deleteMobileNumberClicked, 'emit');
component.deleteMobileNumber();
expect(trackingService.clickedOnDeleteNumber).toHaveBeenCalledTimes(1);
- expect(component.deleteMobileNumberClicked.emit).toHaveBeenCalledOnceWith(component.extendedOrgUser);
+ expect(component.deleteMobileNumberClicked.emit).toHaveBeenCalledTimes(1);
});
});
diff --git a/src/app/shared/components/profile-opt-in-card/profile-opt-in-card.component.ts b/src/app/shared/components/profile-opt-in-card/profile-opt-in-card.component.ts
index 10b0e98d14..b59fb50bd2 100644
--- a/src/app/shared/components/profile-opt-in-card/profile-opt-in-card.component.ts
+++ b/src/app/shared/components/profile-opt-in-card/profile-opt-in-card.component.ts
@@ -19,7 +19,7 @@ export class ProfileOptInCardComponent implements OnInit {
@Output() editMobileNumberClicked = new EventEmitter();
- @Output() deleteMobileNumberClicked = new EventEmitter();
+ @Output() deleteMobileNumberClicked = new EventEmitter();
isUserOptedIn = false;
@@ -57,7 +57,7 @@ export class ProfileOptInCardComponent implements OnInit {
deleteMobileNumber(): void {
this.trackingService.clickedOnDeleteNumber();
- this.deleteMobileNumberClicked.emit(this.extendedOrgUser);
+ this.deleteMobileNumberClicked.emit();
}
async copyToClipboard(): Promise {