我试图用角形材料单选按钮测试某些组件-
it('should show task', fakeAsync(() => {
const items = fixture.debugElement.queryAll(By.css('.question-summary'));
items[0].triggerEventHandler('click', null);
fixture.detectChanges();
const buttons = fixture.debugElement.queryAll(By.directive(PriceAnswerButtonComponent));
expect(buttons.length).toEqual(1);
const radioButtons = buttons[0].queryAll(By.directive(MatRadioButton));
radioButtons[0].nativeElement.click();
fixture.detectChanges();
}));
但我无法使其正常运行,我也尝试了triggerEventHandler('click', null);