Skip to content

Commit

Permalink
fix: navigation tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stardustmeg committed Aug 17, 2024
1 parent a64139f commit 9ebbeba
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/app/admin/constants/adminCredentials.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const ADMIN_CREDENTIALS = {
email: '[email protected]',
password: 'my-password',
};
} as const;
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ActivatedRoute } from '@angular/router';

import { NavigationComponent } from './navigation.component';

Expand All @@ -9,6 +10,7 @@ describe('NavigationComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [NavigationComponent],
providers: [{ provide: ActivatedRoute, useValue: {} }],
}).compileComponents();

fixture = TestBed.createComponent(NavigationComponent);
Expand Down
6 changes: 3 additions & 3 deletions src/app/core/components/navigation/navigation.component.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { ChangeDetectionStrategy, Component, inject } from '@angular/core';
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { RouterLink } from '@angular/router';

import { ButtonModule } from 'primeng/button';
import { DropdownModule } from 'primeng/dropdown';

import { LocalStorageService } from '../../services/local-storage/local-storage.service';
import { ADMIN_LINK, NAVIGATION_LINKS, USER_LINK } from './constants/navigation-links';

@Component({
Expand All @@ -16,7 +15,8 @@ import { ADMIN_LINK, NAVIGATION_LINKS, USER_LINK } from './constants/navigation-
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class NavigationComponent {
public localStorageService = inject(LocalStorageService);
// TBD: uncomment when we have users logged in
// public localStorageService = inject(LocalStorageService);

public navigationLinks = NAVIGATION_LINKS;
public userLink = USER_LINK;
Expand Down

0 comments on commit 9ebbeba

Please sign in to comment.