mozilla/talkilla — pull request #264 by Standard8 (2013-10-14 20:50:57+00:00)
Title: Add a wait until timeout when checking for presence icon status in the conversation window to avoid random failures

This aims to fix some random failures we've been seeing as shown below.

My assumption is that in test_presence_icon it can take a short amount of time for the notification of larry signing out getting to bob's client. As the test doesn't currently wait for the icon to be present in the DOM, this could cause intermittent timeouts like we've been seeing. Hence, this patch adds a waitForElements if possible, so that we take account of the lag.

======================================================================
FAIL: test_presence_icon (test_MultipleBrowsers.MultipleBrowsersTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/mozilla/talkilla/test/functional/test_MultipleBrowsers.py", line 152, in test_presence_icon
self.assertPresenceIconDisconnected(self.bob)
File "/home/travis/build/mozilla/talkilla/test/functional/browser_test.py", line 117, in assertPresenceIconDisconnected
'head > link[rel="icon"][href="img/presence/disconnected.png"]', 1)
File "/home/travis/build/mozilla/talkilla/test/functional/browser_test.py", line 96, in assertElementsCount
css_selector, length))
AssertionError: head > link[rel="icon"][href="img/presence/disconnected.png"] does not contain 1 elements