Skip to content

Commit 3a8882b

Browse files
committed
Fix tests
1 parent 5fe9329 commit 3a8882b

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/filter-components/filter-components.component.spec.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,10 @@ function onlyOneComponent() {
3636
} as ComponentContent
3737
];
3838
fixture.detectChanges();
39+
select = await loader.getHarness(MatSelectHarness);
3940
});
40-
it('should show button when there is only 1 component', () => {
41-
const button = fixture.nativeElement.querySelector('button');
42-
expect(button).toBeTruthy();
43-
expect(button.innerText).toBe('1 assessment item');
44-
expect(button.disabled).toBe(true);
41+
it('should be disabled', async () => {
42+
expect(await select.isDisabled()).toBe(true);
4543
});
4644
});
4745
}
@@ -65,9 +63,6 @@ function moreThanOneComponent() {
6563
});
6664
it('should show options', async () => {
6765
await select.open();
68-
const optionGroups = await select.getOptionGroups();
69-
expect(optionGroups.length).toBe(1);
70-
expect(await optionGroups[0].getLabelText()).toBe('Assessment items to show');
7166
const options = await select.getOptions();
7267
expect(options.length).toBe(2);
7368
expect(await options[0].isSelected()).toBe(true);

0 commit comments

Comments
 (0)