簡體   English   中英

Kendo UI Chart導致量角器在Angular超時問題上等待

[英]Kendo UI Chart causes protractor waiting on Angular timeout issue

我有一個簡單的圖表定義:

<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>

在帶有圖表的頁面上運行的任何量角器測試均會失敗,並出現以下典型情況:

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

用嵌套的*ngFor替換圖表定義,並將圖表數據吐出為HTML,可以使測試成功運行。

是否可以使用Kendo UI圖表運行量角器測試? 該項目是使用angular-cli構建的,並使用ng e2e運行測試。

請使用spec.js文件中的以下代碼來消除此問題:

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

在具有Kendo圖表的頁面上調用browser.waitForAngular()時,會出現此問題。

可以通過在量角器配置中添加useAllAngular2AppRoots: true來解決此問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM