Skip to content

Commit aa4f751

Browse files
Night plan menu removed temporarily
1 parent e3bab40 commit aa4f751

3 files changed

Lines changed: 6 additions & 15 deletions

File tree

src/app/components/layout/layout.component.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@
2626
<mat-icon>list</mat-icon>
2727
<span>Tasks</span>
2828
</button>
29-
<button mat-menu-item routerLink="/night-plan">
30-
<mat-icon>nightlight</mat-icon>
31-
<span>Night Plan</span>
32-
</button>
3329
<button mat-menu-item routerLink="/scopes">
3430
<mat-icon>visibility</mat-icon>
3531
<span>Telescopes</span>

src/app/components/layout/layout.component.spec.ts

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ import { MatDialogModule } from '@angular/material/dialog';
77
import { Router } from '@angular/router';
88
import { RouterTestingModule } from '@angular/router/testing';
99
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
10-
import { NightPlanService } from '../../services/night-plan.service';
1110
import { provideHttpClient } from '@angular/common/http';
1211
import { provideHttpClientTesting } from '@angular/common/http/testing';
13-
import { BehaviorSubject } from 'rxjs';
12+
import { LoginService } from '../../services/login.service';
13+
import { of } from 'rxjs';
1414

1515
describe('LayoutComponent', () => {
1616
let component: LayoutComponent;
@@ -21,13 +21,7 @@ describe('LayoutComponent', () => {
2121
/* eslint-disable @typescript-eslint/no-unused-vars */
2222
let router: Router;
2323
/* eslint-enable @typescript-eslint/no-unused-vars */
24-
let nightPlanService: { getTaskCount: ReturnType<typeof vi.fn> };
25-
2624
beforeEach(async () => {
27-
nightPlanService = {
28-
getTaskCount: vi.fn().mockReturnValue(new BehaviorSubject(0)),
29-
};
30-
3125
await TestBed.configureTestingModule({
3226
imports: [
3327
RouterTestingModule,
@@ -39,7 +33,10 @@ describe('LayoutComponent', () => {
3933
LayoutComponent
4034
],
4135
providers: [
42-
{ provide: NightPlanService, useValue: nightPlanService },
36+
{
37+
provide: LoginService,
38+
useValue: { currentUser$: of(null), logout: vi.fn() }
39+
},
4340
provideHttpClient(),
4441
provideHttpClientTesting()
4542
]

src/app/components/layout/layout.component.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { Component, OnInit, OnDestroy, inject } from '@angular/core';
22
import { MatDialog } from '@angular/material/dialog';
33
import { TaskViewComponent } from '../task-view/task-view.component';
44
import { Router, RouterModule } from '@angular/router';
5-
import { NightPlanService } from '../../services/night-plan.service';
65
import { LoginService } from '../../services/login.service';
76
import { Subscription } from 'rxjs';
87
import { TopBarService } from '../../services/top-bar.service';
@@ -37,7 +36,6 @@ import { GravatarService } from '../../services/gravatar.service';
3736
export class LayoutComponent implements OnInit, OnDestroy {
3837
private dialog = inject(MatDialog);
3938
private router = inject(Router);
40-
private nightPlanService = inject(NightPlanService);
4139
private loginService = inject(LoginService);
4240
private topBarService = inject(TopBarService);
4341
private gravatarService = inject(GravatarService);

0 commit comments

Comments
 (0)