简体   繁体   English

Kendo UI Chart导致量角器在Angular超时问题上等待

[英]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. 用嵌套的*ngFor替换图表定义,并将图表数据吐出为HTML,可以使测试成功运行。

Is it possible to run protractor tests with Kendo UI charts? 是否可以使用Kendo UI图表运行量角器测试? The project is built with angular-cli and using ng e2e to run the tests. 该项目是使用angular-cli构建的,并使用ng e2e运行测试。

Please use below code in the spec.js file for removing this issue: 请使用spec.js文件中的以下代码来消除此问题:

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

The issue appears when calling browser.waitForAngular() on a page with a Kendo chart. 在具有Kendo图表的页面上调用browser.waitForAngular()时,会出现此问题。

It can be resolved by adding useAllAngular2AppRoots: true to the protractor config. 可以通过在量角器配置中添加useAllAngular2AppRoots: true来解决此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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