1
我使用jQuery File Upload作爲一個餘燼組件。這個插件有一個API,可以讓我在測試中與文件上傳programmatically進行交互。這在組件測試中完美工作。然而,在驗收測試我得到這個錯誤:驗收測試文件上傳
Assertion Failed: You have turned on testing mode, which disabled the run-loop's autorun. You will need to wrap any code with asynchronous side-effects in a run
從我測試的代碼段:
// some steps before this.
andThen(() => {
Ember.run(() => {
find('.file-upload').fileupload('send', { files: [{name: 'file.doc' }] });
});
});
});
任何指針將不勝感激。