Trigger input events when updated for tests.
const updateFormValue = (cssSelector: any, value: string | number | boolean, elementType = 'input') => {
const debugElement = fixture.debugElement.query(By.css(cssSelector));
const formElement = debugElement.nativeElement;
switch (elementType) {
case 'input':
formElement.value = value;
formElement.dispatchEvent(new Event('input', {
'bubbles': true,
'cancelable': true
}));
break;
case 'checkbox':
formElement.checked = true;
formElement.dispatchEvent(new Event('change', {
'bubbles': true,
'cancelable': true
}));
break;
}
};