Protractor ,Jasmine timeout issue

后端 未结 6 2226
灰色年华
灰色年华 2021-02-10 02:44

I\'m doing e2e-testing with Protractor and Jasmine. Our application is in Angular.

I have written given getPageTimeout: 500000, allScriptsTimeout: 600

6条回答
  •  甜味超标
    2021-02-10 02:54

    Angular is never becoming ready in your app. The only reason why you're seeing jasmine timeout instead of protractor timeouts is because you increased your protractor timeout limit to be higher than your jasmine timeout limit. This is likely a problem with the app polling indefinitely, rather than a problem with how you're writing your test.

    From https://github.com/angular/protractor/blob/master/docs/timeouts.md:

    "Before performing any action, Protractor asks Angular to wait until the page is synchronized. This means that all timeouts and http requests are finished. If your application continuously polls $timeout or $http, it will never be registered as completely loaded. You should use the $interval service (interval.js) for anything that polls continuously (introduced in Angular 1.2rc3)."

提交回复
热议问题