I'm developing a testing suite and the only way I have found to be sure a page is ready, is when the selector 'div.spinner' disappear. I was able to do catch this condition with CapserJs (with PhantomJs or SlimerJs):
casper.waitWhileSelector('div.spinner');
I had to switch to codeceptjs 1.0.1 with nightmarejs 2.10.1 and I can't translate this condition properly.
I must avoid waiting some predefined amount of times as we have many environments to test, and depending on the load the waiting time can vary from 1s to 40s+.
Currently I'm planning to replicate on codecept the casper feature Casper.prototype.waitWhileSelector
Does anyone had a similar problem? Am I missing some feature in CodeceptJs?
Thanks in advance