简体   繁体   中英

Kendo UI Chart causes protractor waiting on Angular timeout issue

I have a simple chart definition:

<kendo-chart>
  <kendo-chart-series>
    <kendo-chart-series-item *ngFor="let series of chartSeries"
      type="column" 
      field="amount" 
      categoryField="period"  
      [data]="series.dataPoints">
    </kendo-chart-series-item>
  </kendo-chart-series>
</kendo-chart>

Any protractor test running on the page with the chart fails with the typical:

Failed: Timed out waiting for asynchronous Angular tasks to finish after 11 seconds.

Replacing the chart definition with a nested *ngFor and spitting out the chart data to HTML allows the tests to run successfully.

Is it possible to run protractor tests with Kendo UI charts? The project is built with angular-cli and using ng e2e to run the tests.

Please use below code in the spec.js file for removing this issue:

beforeEach(function(){
browser.ignoreSynchronization = true; 
});

The issue appears when calling browser.waitForAngular() on a page with a Kendo chart.

It can be resolved by adding useAllAngular2AppRoots: true to the protractor config.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM