1- import { FormBuilder } from '@angular/forms' ;
2- import { async , ComponentFixture , TestBed } from '@angular/core/testing' ;
3- import { provideMockStore , MockStore } from '@ngrx/store/testing' ;
4- import { HttpClientTestingModule } from '@angular/common/http/testing' ;
1+ import { FormBuilder } from '@angular/forms' ;
2+ import { async , ComponentFixture , TestBed } from '@angular/core/testing' ;
3+ import { provideMockStore , MockStore } from '@ngrx/store/testing' ;
4+ import { HttpClientTestingModule } from '@angular/common/http/testing' ;
55
6- import { ProjectListHoverComponent } from './project-list-hover.component' ;
7- import { ProjectState } from '../../../customer-management/components/projects/components/store/project.reducer' ;
8- import { getCustomerProjects } from '../../../customer-management/components/projects/components/store/project.selectors' ;
9- import { FilterProjectPipe } from '../../../shared/pipes' ;
10- import { CreateEntry , UpdateActiveEntry } from '../../store/entry.actions' ;
6+ import { ProjectListHoverComponent } from './project-list-hover.component' ;
7+ import { ProjectState } from '../../../customer-management/components/projects/components/store/project.reducer' ;
8+ import { getCustomerProjects } from '../../../customer-management/components/projects/components/store/project.selectors' ;
9+ import { FilterProjectPipe } from '../../../shared/pipes' ;
10+ import { CreateEntry , UpdateActiveEntry } from '../../store/entry.actions' ;
11+ import { AutocompleteLibModule } from 'angular-ng-autocomplete' ;
1112
1213describe ( 'ProjectListHoverComponent' , ( ) => {
1314 let component : ProjectListHoverComponent ;
@@ -18,7 +19,7 @@ describe('ProjectListHoverComponent', () => {
1819 const state = {
1920 projects : {
2021 projects : [ ] ,
21- customerProjects : [ { id : 'id' , name : 'name' , description : 'description' , project_type_id : '123' } ] ,
22+ customerProjects : [ { id : 'id' , name : 'name' , description : 'description' , project_type_id : '123' } ] ,
2223 isLoading : false ,
2324 message : '' ,
2425 projectToEdit : undefined ,
@@ -38,8 +39,8 @@ describe('ProjectListHoverComponent', () => {
3839 beforeEach ( async ( ( ) => {
3940 TestBed . configureTestingModule ( {
4041 declarations : [ ProjectListHoverComponent , FilterProjectPipe ] ,
41- providers : [ FormBuilder , provideMockStore ( { initialState : state } ) ] ,
42- imports : [ HttpClientTestingModule ] ,
42+ providers : [ FormBuilder , provideMockStore ( { initialState : state } ) ] ,
43+ imports : [ HttpClientTestingModule , AutocompleteLibModule ] ,
4344 } ) . compileComponents ( ) ;
4445 store = TestBed . inject ( MockStore ) ;
4546 mockProjectsSelector = store . overrideSelector ( getCustomerProjects , state . projects ) ;
@@ -65,7 +66,7 @@ describe('ProjectListHoverComponent', () => {
6566 } ) ;
6667
6768 it ( 'dispatchs a UpdateEntry action when activeEntry is not null' , ( ) => {
68- const entry = { id : '123' , project_id : 'p1' , start_date : new Date ( ) . toISOString ( ) } ;
69+ const entry = { id : '123' , project_id : 'p1' , start_date : new Date ( ) . toISOString ( ) } ;
6970 component . activeEntry = entry ;
7071 spyOn ( store , 'dispatch' ) ;
7172
0 commit comments