Under my component , i ve this variable which take reference for the html widget element (which i got from a 3rd library):
<dx-data-grid id="myWidget" #myWidget>
...
</dx-data-grid>
So in my ts file i call it this way :
@ViewChild('myWidget') datatableWidget: DxDataGridComponent;
And in some method , i using it this way
myMethod(){
this.datatableWidget.instance.myWidgetMethod();
}
Now in my test file , i want to test my method : myMethod()
and as i m calling some private methode of my widget component , i got
Cannot read property 'myWidgetMethod' of undefined
How may i get reference of @ViewChild from my fixture , or how may i mock it or event spyOn It ??
Suggestions ?