From da56d7e2ae395ce38398a2e0cbc5590f0c6c7ab8 Mon Sep 17 00:00:00 2001 From: OleksandrKirovychDev Date: Wed, 31 Jul 2024 18:38:46 +0200 Subject: [PATCH 1/4] core header + overlay portal --- .gitignore | 1 + .../src/app/core/header/header.component.html | 16 +++++++++ .../src/app/core/header/header.component.scss | 0 .../app/core/header/header.component.spec.ts | 23 ++++++++++++ .../src/app/core/header/header.component.ts | 31 ++++++++++++++++ .../project-list-dropdown.component.html | 3 ++ .../project-list-dropdown.component.scss | 0 .../project-list-dropdown.component.spec.ts | 23 ++++++++++++ .../project-list-dropdown.component.ts | 11 ++++++ .../drop-down-button.component.ts | 25 +++++++++++++ .../drop-down-button/drop-down-button.spec.ts | 0 .../drop-down/drop-down.component.scss | 0 .../drop-down/drop-down.component.spec.ts | 22 ++++++++++++ .../drop-down/drop-down.component.ts | 35 +++++++++++++++++++ 14 files changed, 190 insertions(+) create mode 100644 .gitignore create mode 100755 tasktrellis/src/app/core/header/header.component.html create mode 100755 tasktrellis/src/app/core/header/header.component.scss create mode 100755 tasktrellis/src/app/core/header/header.component.spec.ts create mode 100755 tasktrellis/src/app/core/header/header.component.ts create mode 100755 tasktrellis/src/app/core/project-list-dropdown/project-list-dropdown.component.html create mode 100755 tasktrellis/src/app/core/project-list-dropdown/project-list-dropdown.component.scss create mode 100755 tasktrellis/src/app/core/project-list-dropdown/project-list-dropdown.component.spec.ts create mode 100755 tasktrellis/src/app/core/project-list-dropdown/project-list-dropdown.component.ts create mode 100644 tasktrellis/src/app/shared/components/drop-down-button/drop-down-button.component.ts create mode 100644 tasktrellis/src/app/shared/components/drop-down-button/drop-down-button.spec.ts create mode 100755 tasktrellis/src/app/shared/components/drop-down/drop-down.component.scss create mode 100755 tasktrellis/src/app/shared/components/drop-down/drop-down.component.spec.ts create mode 100755 tasktrellis/src/app/shared/components/drop-down/drop-down.component.ts diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..723ef36 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea \ No newline at end of file diff --git a/tasktrellis/src/app/core/header/header.component.html b/tasktrellis/src/app/core/header/header.component.html new file mode 100755 index 0000000..30db0f7 --- /dev/null +++ b/tasktrellis/src/app/core/header/header.component.html @@ -0,0 +1,16 @@ + +

TASKTRELLIS

+ + + Recent + + + + + +
diff --git a/tasktrellis/src/app/core/header/header.component.scss b/tasktrellis/src/app/core/header/header.component.scss new file mode 100755 index 0000000..e69de29 diff --git a/tasktrellis/src/app/core/header/header.component.spec.ts b/tasktrellis/src/app/core/header/header.component.spec.ts new file mode 100755 index 0000000..204ed6e --- /dev/null +++ b/tasktrellis/src/app/core/header/header.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { HeaderComponent } from './header.component'; + +describe('HeaderComponent', () => { + let component: HeaderComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [HeaderComponent] + }) + .compileComponents(); + + fixture = TestBed.createComponent(HeaderComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/tasktrellis/src/app/core/header/header.component.ts b/tasktrellis/src/app/core/header/header.component.ts new file mode 100755 index 0000000..c68faf1 --- /dev/null +++ b/tasktrellis/src/app/core/header/header.component.ts @@ -0,0 +1,31 @@ +import { + ChangeDetectionStrategy, + Component, + signal, + WritableSignal, +} from '@angular/core'; +import { MatToolbarModule } from '@angular/material/toolbar'; +import { DropDownComponent } from '../../shared/components/drop-down/drop-down.component'; +import { CdkOverlayOrigin } from '@angular/cdk/overlay'; +import { ProjectListDropdownComponent } from '../project-list-dropdown/project-list-dropdown.component'; +import { DropDownButtonComponent } from '../../shared/components/drop-down-button/drop-down-button.component'; +import { PortalModule } from '@angular/cdk/portal'; + +@Component({ + selector: 'app-header', + standalone: true, + imports: [ + MatToolbarModule, + DropDownComponent, + CdkOverlayOrigin, + ProjectListDropdownComponent, + DropDownButtonComponent, + PortalModule, + ], + templateUrl: './header.component.html', + styleUrl: './header.component.scss', + changeDetection: ChangeDetectionStrategy.OnPush, +}) +export class HeaderComponent { + protected isOpen: WritableSignal = signal(false); +} diff --git a/tasktrellis/src/app/core/project-list-dropdown/project-list-dropdown.component.html b/tasktrellis/src/app/core/project-list-dropdown/project-list-dropdown.component.html new file mode 100755 index 0000000..b094d6b --- /dev/null +++ b/tasktrellis/src/app/core/project-list-dropdown/project-list-dropdown.component.html @@ -0,0 +1,3 @@ +
+ project-list-dropdown works! +
diff --git a/tasktrellis/src/app/core/project-list-dropdown/project-list-dropdown.component.scss b/tasktrellis/src/app/core/project-list-dropdown/project-list-dropdown.component.scss new file mode 100755 index 0000000..e69de29 diff --git a/tasktrellis/src/app/core/project-list-dropdown/project-list-dropdown.component.spec.ts b/tasktrellis/src/app/core/project-list-dropdown/project-list-dropdown.component.spec.ts new file mode 100755 index 0000000..dee568d --- /dev/null +++ b/tasktrellis/src/app/core/project-list-dropdown/project-list-dropdown.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ProjectListDropdownComponent } from './project-list-dropdown.component'; + +describe('ProjectListDropdownComponent', () => { + let component: ProjectListDropdownComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [ProjectListDropdownComponent] + }) + .compileComponents(); + + fixture = TestBed.createComponent(ProjectListDropdownComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/tasktrellis/src/app/core/project-list-dropdown/project-list-dropdown.component.ts b/tasktrellis/src/app/core/project-list-dropdown/project-list-dropdown.component.ts new file mode 100755 index 0000000..6220a3b --- /dev/null +++ b/tasktrellis/src/app/core/project-list-dropdown/project-list-dropdown.component.ts @@ -0,0 +1,11 @@ +import { ChangeDetectionStrategy, Component } from '@angular/core'; + +@Component({ + selector: 'app-project-list-dropdown', + standalone: true, + imports: [], + templateUrl: './project-list-dropdown.component.html', + styleUrl: './project-list-dropdown.component.scss', + changeDetection: ChangeDetectionStrategy.OnPush, +}) +export class ProjectListDropdownComponent {} diff --git a/tasktrellis/src/app/shared/components/drop-down-button/drop-down-button.component.ts b/tasktrellis/src/app/shared/components/drop-down-button/drop-down-button.component.ts new file mode 100644 index 0000000..2a9c666 --- /dev/null +++ b/tasktrellis/src/app/shared/components/drop-down-button/drop-down-button.component.ts @@ -0,0 +1,25 @@ +import { + Component, + ChangeDetectionStrategy, + Input, + Output, + EventEmitter, +} from '@angular/core'; +import { MatButton } from '@angular/material/button'; + +@Component({ + selector: 'app-drop-down-button', + standalone: true, + imports: [MatButton], + template: ` + + `, + changeDetection: ChangeDetectionStrategy.OnPush, +}) +export class DropDownButtonComponent { + @Output() openDropDown: EventEmitter = new EventEmitter(); + + @Input() class!: string; +} diff --git a/tasktrellis/src/app/shared/components/drop-down-button/drop-down-button.spec.ts b/tasktrellis/src/app/shared/components/drop-down-button/drop-down-button.spec.ts new file mode 100644 index 0000000..e69de29 diff --git a/tasktrellis/src/app/shared/components/drop-down/drop-down.component.scss b/tasktrellis/src/app/shared/components/drop-down/drop-down.component.scss new file mode 100755 index 0000000..e69de29 diff --git a/tasktrellis/src/app/shared/components/drop-down/drop-down.component.spec.ts b/tasktrellis/src/app/shared/components/drop-down/drop-down.component.spec.ts new file mode 100755 index 0000000..e9c899e --- /dev/null +++ b/tasktrellis/src/app/shared/components/drop-down/drop-down.component.spec.ts @@ -0,0 +1,22 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { DropDownComponent } from './drop-down.component'; + +describe('MenuComponent', () => { + let component: DropDownComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [DropDownComponent], + }).compileComponents(); + + fixture = TestBed.createComponent(DropDownComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/tasktrellis/src/app/shared/components/drop-down/drop-down.component.ts b/tasktrellis/src/app/shared/components/drop-down/drop-down.component.ts new file mode 100755 index 0000000..d91a5d1 --- /dev/null +++ b/tasktrellis/src/app/shared/components/drop-down/drop-down.component.ts @@ -0,0 +1,35 @@ +import { + ChangeDetectionStrategy, + Component, + EventEmitter, + inject, + Output, + ViewChild, +} from '@angular/core'; +import { Overlay, OverlayModule } from '@angular/cdk/overlay'; +import { CdkPortal, PortalModule } from '@angular/cdk/portal'; + +@Component({ + selector: 'app-drop-down', + standalone: true, + imports: [OverlayModule, PortalModule], + template: ` + + + + `, + styleUrl: './drop-down.component.scss', + changeDetection: ChangeDetectionStrategy.OnPush, +}) +export class DropDownComponent { + @Output() openModalOutput = new EventEmitter(); + + @ViewChild(CdkPortal) portal!: CdkPortal; + + private overlay = inject(Overlay); + + public openModal() { + const overlayRef = this.overlay.create(); + overlayRef.attach(this.portal); + } +} From 8fb9f9d1f63b073e609762aa5d6dcc957a102b80 Mon Sep 17 00:00:00 2001 From: OleksandrKirovychDev Date: Wed, 31 Jul 2024 18:39:08 +0200 Subject: [PATCH 2/4] config --- .github/workflows/node.js.yml | 0 LICENSE | 0 README.md | 0 tasktrellis/src/app/app.component.html | 332 +------------------------ tasktrellis/src/app/app.component.ts | 6 +- tasktrellis/src/app/app.config.ts | 2 +- tasktrellis/src/app/app.routes.ts | 13 +- 7 files changed, 20 insertions(+), 333 deletions(-) mode change 100644 => 100755 .github/workflows/node.js.yml mode change 100644 => 100755 LICENSE mode change 100644 => 100755 README.md diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml old mode 100644 new mode 100755 diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/tasktrellis/src/app/app.component.html b/tasktrellis/src/app/app.component.html index c7dd3c4..af69d18 100755 --- a/tasktrellis/src/app/app.component.html +++ b/tasktrellis/src/app/app.component.html @@ -1,330 +1,4 @@ - - - - - - - - + + + - - -
-
-
- -

Hello, {{ title }}

-

Congratulations! Your app is running. 🎉

-
- -
-
- @for (item of [ { title: 'Explore the Docs', link: 'https://angular.dev' - }, { title: 'Learn with Tutorials', link: - 'https://angular.dev/tutorials' }, { title: 'CLI Docs', link: - 'https://angular.dev/tools/cli' }, { title: 'Angular Language Service', - link: 'https://angular.dev/tools/language-service' }, { title: 'Angular - DevTools', link: 'https://angular.dev/tools/devtools' }, ]; track - item.title) { - - {{ item.title }} - - - - - } -
- -
-
-
- - - - - - - - - - diff --git a/tasktrellis/src/app/app.component.ts b/tasktrellis/src/app/app.component.ts index 665da70..5a09a35 100755 --- a/tasktrellis/src/app/app.component.ts +++ b/tasktrellis/src/app/app.component.ts @@ -1,12 +1,14 @@ -import { Component } from '@angular/core'; +import { ChangeDetectionStrategy, Component } from '@angular/core'; import { RouterOutlet } from '@angular/router'; +import { HeaderComponent } from './core/header/header.component'; @Component({ selector: 'app-root', standalone: true, - imports: [RouterOutlet], + imports: [RouterOutlet, HeaderComponent], templateUrl: './app.component.html', styleUrl: './app.component.scss', + changeDetection: ChangeDetectionStrategy.OnPush, }) export class AppComponent { title = 'tasktrellis'; diff --git a/tasktrellis/src/app/app.config.ts b/tasktrellis/src/app/app.config.ts index 1763bca..82127d5 100755 --- a/tasktrellis/src/app/app.config.ts +++ b/tasktrellis/src/app/app.config.ts @@ -4,9 +4,9 @@ import { } from '@angular/core'; import { provideRouter } from '@angular/router'; -import { routes } from './app.routes'; import { provideAnimationsAsync } from '@angular/platform-browser/animations/async'; import { provideStore } from '@ngrx/store'; +import { routes } from './app.routes'; export const appConfig: ApplicationConfig = { providers: [ diff --git a/tasktrellis/src/app/app.routes.ts b/tasktrellis/src/app/app.routes.ts index dc39edb..4d2c10a 100755 --- a/tasktrellis/src/app/app.routes.ts +++ b/tasktrellis/src/app/app.routes.ts @@ -1,3 +1,14 @@ import { Routes } from '@angular/router'; +import { AppComponent } from './app.component'; -export const routes: Routes = []; +export const routes: Routes = [ + { + path: '', + redirectTo: 'home', + pathMatch: 'full', + }, + { + path: 'home', + component: AppComponent, + }, +]; From 49e5dc15497a22d0ab28cd4c48b60a546d7724ca Mon Sep 17 00:00:00 2001 From: OleksandrKirovychDev Date: Fri, 2 Aug 2024 17:09:50 +0200 Subject: [PATCH 3/4] reusable drop down --- .../src/app/core/header/header.component.html | 16 ---- .../src/app/core/header/header.component.scss | 0 .../src/app/core/header/header.component.ts | 87 ++++++++++++++++--- .../project-list-dropdown.component.html | 3 - .../project-list-dropdown.component.scss | 0 .../project-list-dropdown.component.ts | 8 +- .../drop-down-button.component.ts | 26 ++++-- .../drop-down/drop-down.component.scss | 0 .../drop-down/drop-down.component.ts | 37 ++++---- 9 files changed, 121 insertions(+), 56 deletions(-) delete mode 100755 tasktrellis/src/app/core/header/header.component.html delete mode 100755 tasktrellis/src/app/core/header/header.component.scss delete mode 100755 tasktrellis/src/app/core/project-list-dropdown/project-list-dropdown.component.html delete mode 100755 tasktrellis/src/app/core/project-list-dropdown/project-list-dropdown.component.scss delete mode 100755 tasktrellis/src/app/shared/components/drop-down/drop-down.component.scss diff --git a/tasktrellis/src/app/core/header/header.component.html b/tasktrellis/src/app/core/header/header.component.html deleted file mode 100755 index 30db0f7..0000000 --- a/tasktrellis/src/app/core/header/header.component.html +++ /dev/null @@ -1,16 +0,0 @@ - -

TASKTRELLIS

- - - Recent - - - - - -
diff --git a/tasktrellis/src/app/core/header/header.component.scss b/tasktrellis/src/app/core/header/header.component.scss deleted file mode 100755 index e69de29..0000000 diff --git a/tasktrellis/src/app/core/header/header.component.ts b/tasktrellis/src/app/core/header/header.component.ts index c68faf1..99240ba 100755 --- a/tasktrellis/src/app/core/header/header.component.ts +++ b/tasktrellis/src/app/core/header/header.component.ts @@ -1,12 +1,7 @@ -import { - ChangeDetectionStrategy, - Component, - signal, - WritableSignal, -} from '@angular/core'; +import { ChangeDetectionStrategy, Component } from '@angular/core'; import { MatToolbarModule } from '@angular/material/toolbar'; import { DropDownComponent } from '../../shared/components/drop-down/drop-down.component'; -import { CdkOverlayOrigin } from '@angular/cdk/overlay'; +import { OverlayModule } from '@angular/cdk/overlay'; import { ProjectListDropdownComponent } from '../project-list-dropdown/project-list-dropdown.component'; import { DropDownButtonComponent } from '../../shared/components/drop-down-button/drop-down-button.component'; import { PortalModule } from '@angular/cdk/portal'; @@ -17,15 +12,81 @@ import { PortalModule } from '@angular/cdk/portal'; imports: [ MatToolbarModule, DropDownComponent, - CdkOverlayOrigin, ProjectListDropdownComponent, DropDownButtonComponent, PortalModule, + OverlayModule, ], - templateUrl: './header.component.html', - styleUrl: './header.component.scss', + template: ` + +

TASKTRELLIS

+ + + Workspaces + + + + Recent + + + + Starred + + + + Templates + +
+ + + + + + + + + + + + + + + + + `, + styles: [], changeDetection: ChangeDetectionStrategy.OnPush, }) -export class HeaderComponent { - protected isOpen: WritableSignal = signal(false); -} +export class HeaderComponent {} diff --git a/tasktrellis/src/app/core/project-list-dropdown/project-list-dropdown.component.html b/tasktrellis/src/app/core/project-list-dropdown/project-list-dropdown.component.html deleted file mode 100755 index b094d6b..0000000 --- a/tasktrellis/src/app/core/project-list-dropdown/project-list-dropdown.component.html +++ /dev/null @@ -1,3 +0,0 @@ -
- project-list-dropdown works! -
diff --git a/tasktrellis/src/app/core/project-list-dropdown/project-list-dropdown.component.scss b/tasktrellis/src/app/core/project-list-dropdown/project-list-dropdown.component.scss deleted file mode 100755 index e69de29..0000000 diff --git a/tasktrellis/src/app/core/project-list-dropdown/project-list-dropdown.component.ts b/tasktrellis/src/app/core/project-list-dropdown/project-list-dropdown.component.ts index 6220a3b..84091b2 100755 --- a/tasktrellis/src/app/core/project-list-dropdown/project-list-dropdown.component.ts +++ b/tasktrellis/src/app/core/project-list-dropdown/project-list-dropdown.component.ts @@ -4,8 +4,12 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; selector: 'app-project-list-dropdown', standalone: true, imports: [], - templateUrl: './project-list-dropdown.component.html', - styleUrl: './project-list-dropdown.component.scss', + template: ` +
+ project-list-dropdown works! +
+ `, + styles: [], changeDetection: ChangeDetectionStrategy.OnPush, }) export class ProjectListDropdownComponent {} diff --git a/tasktrellis/src/app/shared/components/drop-down-button/drop-down-button.component.ts b/tasktrellis/src/app/shared/components/drop-down-button/drop-down-button.component.ts index 2a9c666..2d2ce22 100644 --- a/tasktrellis/src/app/shared/components/drop-down-button/drop-down-button.component.ts +++ b/tasktrellis/src/app/shared/components/drop-down-button/drop-down-button.component.ts @@ -2,24 +2,36 @@ import { Component, ChangeDetectionStrategy, Input, - Output, - EventEmitter, + signal, + WritableSignal, } from '@angular/core'; import { MatButton } from '@angular/material/button'; - +import { MatIconModule } from '@angular/material/icon'; @Component({ selector: 'app-drop-down-button', standalone: true, - imports: [MatButton], + imports: [MatButton, MatIconModule], template: ` - `, changeDetection: ChangeDetectionStrategy.OnPush, }) export class DropDownButtonComponent { - @Output() openDropDown: EventEmitter = new EventEmitter(); - @Input() class!: string; + + public isDropDownOpen: WritableSignal = signal(false); + + public toggleDropDown() { + this.isDropDownOpen.set(!this.isDropDownOpen()); + } } diff --git a/tasktrellis/src/app/shared/components/drop-down/drop-down.component.scss b/tasktrellis/src/app/shared/components/drop-down/drop-down.component.scss deleted file mode 100755 index e69de29..0000000 diff --git a/tasktrellis/src/app/shared/components/drop-down/drop-down.component.ts b/tasktrellis/src/app/shared/components/drop-down/drop-down.component.ts index d91a5d1..ca960bc 100755 --- a/tasktrellis/src/app/shared/components/drop-down/drop-down.component.ts +++ b/tasktrellis/src/app/shared/components/drop-down/drop-down.component.ts @@ -2,34 +2,41 @@ import { ChangeDetectionStrategy, Component, EventEmitter, - inject, + Input, Output, - ViewChild, + WritableSignal, } from '@angular/core'; -import { Overlay, OverlayModule } from '@angular/cdk/overlay'; -import { CdkPortal, PortalModule } from '@angular/cdk/portal'; +import { + CdkOverlayOrigin, + FlexibleConnectedPositionStrategyOrigin, + OverlayModule, +} from '@angular/cdk/overlay'; @Component({ selector: 'app-drop-down', standalone: true, - imports: [OverlayModule, PortalModule], + imports: [OverlayModule], template: ` - + `, - styleUrl: './drop-down.component.scss', + styles: [], changeDetection: ChangeDetectionStrategy.OnPush, }) export class DropDownComponent { - @Output() openModalOutput = new EventEmitter(); - - @ViewChild(CdkPortal) portal!: CdkPortal; + @Output() clickOutside = new EventEmitter(); - private overlay = inject(Overlay); + @Input({ required: true }) trigger!: + | CdkOverlayOrigin + | FlexibleConnectedPositionStrategyOrigin; + @Input({ required: true }) isDropDownOpen!: WritableSignal; - public openModal() { - const overlayRef = this.overlay.create(); - overlayRef.attach(this.portal); - } + @Input() offsetY = 5; } From ce20365ec4e6b44f88dcf63d43a2188107240533 Mon Sep 17 00:00:00 2001 From: OleksandrKirovychDev Date: Fri, 2 Aug 2024 17:29:59 +0200 Subject: [PATCH 4/4] fixing test --- tasktrellis/src/app/app.component.spec.ts | 4 +--- .../drop-down-button/drop-down-button.spec.ts | 22 +++++++++++++++++++ .../drop-down/drop-down.component.spec.ts | 4 +++- 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/tasktrellis/src/app/app.component.spec.ts b/tasktrellis/src/app/app.component.spec.ts index 5287532..4885e66 100755 --- a/tasktrellis/src/app/app.component.spec.ts +++ b/tasktrellis/src/app/app.component.spec.ts @@ -24,8 +24,6 @@ describe('AppComponent', () => { const fixture = TestBed.createComponent(AppComponent); fixture.detectChanges(); const compiled = fixture.nativeElement as HTMLElement; - expect(compiled.querySelector('h1')?.textContent).toContain( - 'Hello, tasktrellis', - ); + expect(compiled.querySelector('h1')?.textContent).toContain('TASKTRELLIS'); }); }); diff --git a/tasktrellis/src/app/shared/components/drop-down-button/drop-down-button.spec.ts b/tasktrellis/src/app/shared/components/drop-down-button/drop-down-button.spec.ts index e69de29..917a346 100644 --- a/tasktrellis/src/app/shared/components/drop-down-button/drop-down-button.spec.ts +++ b/tasktrellis/src/app/shared/components/drop-down-button/drop-down-button.spec.ts @@ -0,0 +1,22 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { DropDownButtonComponent } from './drop-down-button.component'; + +describe('DropDownButtonComponent', () => { + let component: DropDownButtonComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [DropDownButtonComponent], + }).compileComponents(); + + fixture = TestBed.createComponent(DropDownButtonComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/tasktrellis/src/app/shared/components/drop-down/drop-down.component.spec.ts b/tasktrellis/src/app/shared/components/drop-down/drop-down.component.spec.ts index e9c899e..95988f2 100755 --- a/tasktrellis/src/app/shared/components/drop-down/drop-down.component.spec.ts +++ b/tasktrellis/src/app/shared/components/drop-down/drop-down.component.spec.ts @@ -9,7 +9,9 @@ describe('MenuComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ imports: [DropDownComponent], - }).compileComponents(); + }) + .overrideTemplate(DropDownComponent, '') + .compileComponents(); fixture = TestBed.createComponent(DropDownComponent); component = fixture.componentInstance;