Angular_PdfViewer_Unit Testing_ null/undefined

.html

<ejs-pdfviewer id="pdfViewer" #pdfViewer [serviceUrl]='serv' (documentLoad)='documentLoaded($event)'

                        style="height:640px;display:block">

                    </ejs-pdfviewer>


.ts

@ViewChild('pdfViewer')

  public pdfviewerControl: PdfViewerComponent;

  public serv: string = 'https://ej2services.syncfusion.com/production/web-services/api/pdfviewer';


var viewer = (<any>document.getElementById('pdfViewer')).ej2_instances[0];



.spec.ts

console.log( fixture.debugElement.query(By.css('#pdfViewer')));

console.log(component.pdfviewerControl);


the above statements return null and undefined respectively....How can we test pdfviewer in angular?


4 Replies

GS GodlinLijo SobiDhas Syncfusion Team July 20, 2022 04:43 AM UTC

Hi Priya,


Thanks for contacting Syncfusion support.

We are analyzing  the issue “Angular_PdfViewer_Unit Testing_ null/undefined ” and will get back to you with further update on 21 July, 2022.


Regards,

Godlin Lijo S



GS GodlinLijo SobiDhas Syncfusion Team July 25, 2022 03:35 PM UTC

Hi Priya,


Thanks for contacting Syncfusion support.


Sorry for the inconvenience, We are preparing a test sample for the test case we are facing complexity, we are analyzing  the issue “Angular_PdfViewer_Unit Testing_ null/undefined ” and will get back to you with further update on 27 July, 2022.


Regards,

Godlin Lijo S



AC ArunKumar Chandrakesan Syncfusion Team August 2, 2022 04:21 PM UTC

Hi Priya,


Sorry for the inconvenience, We are facing complexity in  preparing a test sample for the test case  and we were working on this with high priority, we will analyze and  get back to you with further update on 05 August, 2022.

Regards,

Arun Kumar



JM Johnson Monohar M Syncfusion Team August 25, 2022 06:14 PM UTC

Hi Priya,

Sorry for the delay.

We have analyzed and found that your code is proper. But still not sure why the error occurs. Is it possible to send us the simple unit testing sample or a video screenshot to reproduce the issue on our end?


Regards,
Arun Kumar


Loader.
Up arrow icon