Skip to content

Commit

Permalink
fix: build failed
Browse files Browse the repository at this point in the history
  • Loading branch information
suyashpatil78 committed Jul 1, 2024
1 parent 98bf876 commit 393b887
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/app/fyle/my-profile/my-profile.page.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
(optInClicked)="optInMobileNumber($event)"
(optOutClicked)="optOutClick()"
(editMobileNumberClicked)="optInMobileNumber($event)"
(deleteMobileNumberClicked)="onDeleteCTAClicked($event)"
(deleteMobileNumberClicked)="onDeleteCTAClicked()"
></app-profile-opt-in-card>
</ng-container>
</ng-container>
Expand All @@ -33,7 +33,7 @@
<app-mobile-number-card
[extendedOrgUser]="eou"
(addMobileNumberClicked)="updateMobileNumber($event)"
(deleteMobileNumberClicked)="onDeleteCTAClicked($event)"
(deleteMobileNumberClicked)="onDeleteCTAClicked()"
(editMobileNumberClicked)="updateMobileNumber($event)"
></app-mobile-number-card>
</ng-container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export class MobileNumberCardComponent implements OnInit {

@Output() addMobileNumberClicked = new EventEmitter<ExtendedOrgUser>();

@Output() deleteMobileNumberClicked = new EventEmitter<ExtendedOrgUser>();
@Output() deleteMobileNumberClicked = new EventEmitter<void>();

@Output() editMobileNumberClicked = new EventEmitter<ExtendedOrgUser>();

Expand All @@ -30,6 +30,6 @@ export class MobileNumberCardComponent implements OnInit {
}

deleteMobileNumber(): void {
this.deleteMobileNumberClicked.emit(this.extendedOrgUser);
this.deleteMobileNumberClicked.emit();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class ProfileOptInCardComponent implements OnInit {

@Output() editMobileNumberClicked = new EventEmitter<ExtendedOrgUser>();

@Output() deleteMobileNumberClicked = new EventEmitter<ExtendedOrgUser>();
@Output() deleteMobileNumberClicked = new EventEmitter<void>();

isUserOptedIn = false;

Expand Down Expand Up @@ -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<void> {
Expand Down

0 comments on commit 393b887

Please sign in to comment.