我想能夠用量角器測試我的Angular應用程序。由於我使用RequireJS,因此我不能在我的DOM中使用ng-app
指令,這就是爲什麼我使用angular.bootstrap
手動引導Angular。使用量角器測試與自舉AngularJS
量角器打印錯誤輸出象下面這樣:
Error: Angular could not be found on the page
http://localhost:1428/
: retries looking for angular exceeded
然後,我意識到,量角器文檔有一個警告:
Protractor does not work out-of-the-box with apps that bootstrap manually using angular.bootstrap. You must use the ng-app directive.
那麼,有沒有什麼解決辦法運行量角器測試與手動自舉角度應用還是應該開始瞭解其他測試套件?
我們的量角器測試適用於RequireJS和手動引導應用程序。你能分享更多的代碼嗎? :) – glepretre 2014-09-02 06:49:42