Skip to content

Commit

Permalink
NAS-133127: PR Update
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexKarpov98 committed Dec 26, 2024
1 parent 51095ed commit 9d4ac70
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('InstalledAppBadgeComponent', () => {
});

it('navigates to specific app when clicked and app is found', () => {
spectator.component.navigateToAllInstalledPage(new MouseEvent('click'));
spectator.component.navigateToAllInstalledPage();
spectator.fixture.detectChanges();

expect(spectator.inject(Router).navigate).toHaveBeenCalledWith([
Expand All @@ -49,7 +49,7 @@ describe('InstalledAppBadgeComponent', () => {

it('navigates to installed apps overview when clicked and app is not found', () => {
spectator.setInput('app', { name: 'NonExistentApp', train: 'stable' });
spectator.component.navigateToAllInstalledPage(new MouseEvent('click'));
spectator.component.navigateToAllInstalledPage();
spectator.fixture.detectChanges();

expect(spectator.inject(Router).navigate).toHaveBeenCalledWith([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ export class InstalledAppBadgeComponent {
private router: Router,
) {}

navigateToAllInstalledPage(event: Event): void {
event.preventDefault();
navigateToAllInstalledPage(event?: Event): void {
event?.preventDefault();

this.installedAppsStore.installedApps$.pipe(
map((apps) => {
Expand Down

0 comments on commit 9d4ac70

Please sign in to comment.