Skip to content

Commit

Permalink
101393: Fix VocabularyTreeview tests + Remove template comments
Browse files Browse the repository at this point in the history
  • Loading branch information
nona-luypaert committed Apr 27, 2023
1 parent a5c300a commit 2a84c42
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Expand Up @@ -31,7 +31,6 @@ <h4 *ngIf="!(loading | async) && dataSource.data.length === 0" class="text-cente
[openDelay]="500"
container="body"
>
<!-- checkbox (click) needs to be stopped, to prevent that button (click) gets called twice -->
<input class="mr-2" type="checkbox"
[disabled]="!node.item?.selectable"
[checked]="node.isSelected"
Expand Down Expand Up @@ -64,7 +63,6 @@ <h4 *ngIf="!(loading | async) && dataSource.data.length === 0" class="text-cente
[ngbTooltip]="node.item?.otherInformation?.note"
[openDelay]="500"
container="body">
<!-- checkbox (click) needs to be stopped, to prevent that button (click) gets called twice -->
<input class="mr-2" type="checkbox"
[disabled]="!node.item?.selectable"
[checked]="node.isSelected"
Expand Down
Expand Up @@ -90,7 +90,7 @@ describe('VocabularyTreeviewComponent test suite', () => {
}));

afterEach(() => {
fixture.destroy();
fixture?.destroy();
comp = null;
compAsAny = null;
});
Expand Down Expand Up @@ -264,14 +264,14 @@ describe('VocabularyTreeviewComponent test suite', () => {

it('should not display checkboxes by default', async () => {
fixture.detectChanges();
expect(de.query(By.css('.form-check-input'))).toBeNull();
expect(de.query(By.css('input[type=checkbox]'))).toBeNull();
expect(de.queryAll(By.css('cdk-tree-node')).length).toEqual(3);
});

it('should display checkboxes if multiSelect is true', async () => {
comp.multiSelect = true;
fixture.detectChanges();
expect(de.queryAll(By.css('.form-check-input')).length).toEqual(3);
expect(de.queryAll(By.css('input[type=checkbox]')).length).toEqual(3);
expect(de.queryAll(By.css('cdk-tree-node')).length).toEqual(3);
});
});
Expand Down

0 comments on commit 2a84c42

Please sign in to comment.