Skip to content

Commit 335328a

Browse files
committed
Implemented more tests
1 parent 226c650 commit 335328a

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/app/component/matrix/matrix.component.spec.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { MatAutocomplete } from '@angular/material/autocomplete';
55
import { RouterTestingModule } from '@angular/router/testing';
66
import { ymlService } from 'src/app/service/yaml-parser/yaml-parser.service';
77
import { MatrixComponent } from './matrix.component';
8+
import { delay } from 'rxjs';
89

910
describe('MatrixComponent', () => {
1011
let component: MatrixComponent;
@@ -34,4 +35,12 @@ describe('MatrixComponent', () => {
3435
const table = HTMLElement.querySelector('table')!;
3536
expect(table).toBeTruthy();
3637
});
38+
39+
it('check for chip deletion', () => {
40+
component.rowsCurrentlyBeingShown = ['row1', 'row2'];
41+
component.remove('row1');
42+
const newChipRow = ['row2'];
43+
fixture.detectChanges();
44+
expect(component.rowsCurrentlyBeingShown).toEqual(newChipRow);
45+
});
3746
});

0 commit comments

Comments
 (0)