it('should accept input values', () => { // Query the input selectors question1 = fixture.debugElement.query(By.css('mat-select')).nativeElement; answer1 = fixture.debugElement.query(By.css('input[type=text]')).nativeElement; // Set the input element's value to mockPaste question1.value = mockSecurityModel.question1.toString(); answer1.value = mockSecurityModel.answer1; // Dispatch an event to tell the component input value has changed question1.dispatchEvent(new Event('change')); answer1.dispatchEvent(new Event('input')); // expect(mockSecurityModel.question1).toEqual(component.viewModel.question1); expect(mockSecurityModel.answer1).toEqual(component.viewModel.answer1); });
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)