zacc/gaia-ui-tests — pull request #43 by malini (2012-11-15 23:36:55+00:00)
Title: Make tests less flaky

The first commit "fix intermittent failure where the list of icons returned is 0 " had an error that the subsequent commit fixes.

So this pull request adds:

1) a switch_to_frame function in GaiaApps that will switch to a frame, and wait for the url to be what you expect (ex: 'browser' in the browser url). This will prevent returning from a switch_to_frame call with only the 'about:blank' page loaded, and ensures we've loaded the right app's frame for the rest of the test to use.

2) a few wait_for_element_displayed calls. I found a few tests would expect elements to be visible, but it may not be true (test_calculator would fail looking for 'C', or gallery would fail looking for thumbnails). Adding these waits removed those failures.