How can I make Protractor NOT wait for $timeout?

后端 未结 2 1711
有刺的猬
有刺的猬 2021-01-12 13:22

I\'m testing my angular application with Protractor. Once the user is logged in to my app, I set a $timeout to do some job in one hour (so if the user was logged-in in 13:00

2条回答
  •  走了就别回头了
    2021-01-12 13:51

    The solution is to use interceptors and modify the http request which is getting timeout and set custom timeout to some milliseconds(your desired) to that http request so that after sometime long running http request will get closed(because of new timeout) and then you can test immediate response.

    This is working well and promising.

提交回复
热议问题