11import { HttpClientModule , HttpHandler } from '@angular/common/http' ;
22import { HttpClientTestingModule } from '@angular/common/http/testing' ;
33import { ComponentFixture , TestBed } from '@angular/core/testing' ;
4- import { MatAutocomplete } from '@angular/material/autocomplete' ;
4+ // import { MatAutocomplete } from '@angular/material/autocomplete';
55import { RouterTestingModule } from '@angular/router/testing' ;
66import { ymlService } from 'src/app/service/yaml-parser/yaml-parser.service' ;
77import { MatrixComponent } from './matrix.component' ;
8+ import { MatChip } from '@angular/material/chips' ;
89
910describe ( 'MatrixComponent' , ( ) => {
1011 let component : MatrixComponent ;
@@ -14,7 +15,7 @@ describe('MatrixComponent', () => {
1415 await TestBed . configureTestingModule ( {
1516 providers : [ ymlService , HttpClientTestingModule ] ,
1617 imports : [ RouterTestingModule , HttpClientModule ] ,
17- declarations : [ MatrixComponent , MatAutocomplete ] ,
18+ declarations : [ MatrixComponent , MatChip ] ,
1819 } ) . compileComponents ( ) ;
1920 } ) ;
2021
@@ -36,10 +37,13 @@ describe('MatrixComponent', () => {
3637 } ) ;
3738
3839 it ( 'check for chip deletion' , ( ) => {
39- component . rowsCurrentlyBeingShown = [ 'row1' , 'row2' ] ;
40- component . remove ( 'row1' ) ;
40+ component . listSubDimension = [ 'row1' , 'row2' ] ;
41+ component . currentSubDimensions = [ 'row2' ] ;
42+ component . listTags = [ 'row1' , 'row2' ] ;
43+ component . currentTags = [ 'row2' ] ;
4144 const newChipRow = [ 'row2' ] ;
4245 fixture . detectChanges ( ) ;
43- expect ( component . rowsCurrentlyBeingShown ) . toEqual ( newChipRow ) ;
46+ expect ( component . currentSubDimensions ) . toEqual ( newChipRow ) ;
47+ expect ( component . currentTags ) . toEqual ( newChipRow ) ;
4448 } ) ;
4549} ) ;
0 commit comments