yui/yuitest — pull request #18 by thiagocaiubi (2012-08-09 20:24:00+00:00)
Title: Selenium waits for getResults() !== null instead of !isRunning()

Instead of waiting for pageload and subsequently wating for !YUITest.TestRunner.isRunning(), we simply wait for the TestRunner to have some results at the end.

Since the YUITest.TestRunner.getResults() ensures that the runner isn't running to return data, it guarantees that it will only seek for results at the very end.

We have a suite test that load libraries asynchronously and sometimes after window.onload causing it to end up browser before tests have ran.

Pair programming with @pablo-cabrera