I have a Component which embeds an Angular Material MatSelect
element.
In a test that I am writing, I need to simulate the selection of a certain option and make sure that the selectionChange
Observable associated to that MatSelect
element actually fires.
So far my code is
const mySelect: MatSelect = fixture.nativeElement.querySelector('#mySelect');
mySelect.value = 'new value';
But unfortunately this is not making the mySelect.selectionChange
notify, and therefore my test work. Any idea on how this could be performed is very welcome.