it('should correctly render the passed @Input value', () => {
component.message = 'Enter a new title'; // input value modify
fixture.detectChanges(); // make change
const compiled = fixture.debugElement.nativeElement; // compiled component
expect(compiled.querySelector('p').textContent).toBe('Enter a new title'); // component content verify
});
it('should correctly @Output value of text input in component', () => {
spyOn(component.changeTitleEvent, 'emit'); // emit spy
const button = fixture.nativeElement.querySelector('button');
fixture.nativeElement.querySelector('input').value = 'A new title'; // 2
const inputText = fixture.nativeElement.querySelector('input').value;
button.click(); // 3
fixture.detectChanges();
expect(component.changeTitleEvent.emit).toHaveBeenCalledWith(inputText); // 4
});