We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Jasmine tests with deep rendering

Hi! I'm trying to execute my tests using jasmine but for some reason the component doesn't render completely. In this case I'm using ejs-toolbar and when I'm trying to find the items it just shows the top component and ignore the items like bellow:
...
<ejs-toolbar _ngcontent-c0="" id="myToolbar" overflowmode="Popup" ng-reflect-overflow-mode="Popup"></ejs-toolbar>
...

Do someone experienced this?

Best regards.

4 Replies

MA Marco September 2, 2019 08:15 PM UTC

Hi!

I face similar issue.

In my case, I have a dialog with 3 templates (for header, content and footer) and, during jasmine testing, the templates are not rendered, so, the component HTML template gets rendered like this:

<ejs-dialog _ngcontent-c0="" ...>
<!-- -->
<!-- -->
<!-- -->
</ejs-dialog>

I googled about this, but got no helpful answers...


KK Karthigeyan Krishnamurthi Syncfusion Team September 10, 2019 06:20 AM UTC

 
Syncfusion greetings. 
 
We have checked the reported scenarios with unit testing, where Toolbar and Dialog components are rendered properly and for the same below samples prepared for your reference. 
 
Kindly try the above samples and if still issue persists, try to reproduce the issue in the above sample and revert else share your code example / runnable sample (if possible) to serve you better. 
 
Regards, 
Karthi 
 



MA Marco October 21, 2019 05:57 PM UTC

Hi Karthi,


I could not download the Dialog example (the URL is not working), but, checking the Toolbar example, the toolbar itself is rendered, but the items are not.

About the tab example, is there any special reason why you import ToolbarAllModule in the component and ToolbarModule in the spec file?


Thanks and regards,


VD Vinitha Devi Murugan Syncfusion Team October 22, 2019 10:42 AM UTC

Hi Marco, 

Sorry for the inconvenience. 

The previous link got broken so please get the Dialog example from the below link. 

ToolbarModule vs ToolbarAllModule 

The difference between ToolbarModule and ToolbarAllModule is in toolbar module only have basic modules are available where as in ToolbarAllModule  entire modules available in toolbar can be used. 

In spec file we have rendered and tested the basic toolbar sample for which ToolbarModule is enough. So we have import ToolbarModule. In sample we have imported ToolbarAllModule  in order to access all the modules available in toolbar component. 
  
Regards, 
M.Vinitha devi. 


Loader.
Live Chat Icon For mobile
Up arrow icon