Also fix those tests to correctly wait until the ajax portions have finished before evaluating the page contents.