OpenTreeMap/OTM2 — pull request #1383 by RickMohr (2014-05-22 13:04:45+00:00)
Title: All UI tests wait for any transaction-causing requests to complete

Improve `wait_until` functions, and use them in all tests
* add new functions
* several take either an element or a css selector, and return the element
* use `lambda`
* add doc strings

Also:
* remove call to kill pending transactions, because there should no longer be any (and it sometimes hung anyway)
* remove all `sleep` calls -- use `wait_until` calls instead
* DRY out tests in `plot_detail.py`
* simplify tests in `registyration_views.py`

Note that some tests still exit with pending requests for map tiles. But because those requests don't change the database there should be no transactions created and so no problem with deadlock.