Closed danieljin closed 8 years ago
Hi @danieljin . It's an interesting problem. I do see some value in it, but I also see a bit of potential problems with it given the inexact nature of the setTimeout and just UI testing itself.
How was your experience with it? Did you find it worked reliably enough that you were able to verify your loading state consistently?
@atecarlos It's been working well for me. Our protractor tests that checks for the loading modal during the response delay and then checks that it's hidden afterwards is passing consistently.
Hi @danieljin . I made a minor schema change to your PR. Basically, instead of responsdeDelay
, I added it to the response
object. Therefore, now you define it as response.delay
.
This is now live in version 0.6.0
This is awesome. Thanks @atecarlos
Obviously more documentation and testing is needed, but I was wondering whether there would be any want for adding this feature to the main repository.
This provided to be useful when I wanted mocked calls to hang in order to test our loading icon.