summaryrefslogtreecommitdiff
path: root/tests
diff options
Diffstat (limited to 'tests')
-rw-r--r--tests/autopilot/unity/tests/launcher/test_icon_behavior.py1
-rw-r--r--tests/autopilot/unity/tests/launcher/test_tooltips.py8
2 files changed, 6 insertions, 3 deletions
diff --git a/tests/autopilot/unity/tests/launcher/test_icon_behavior.py b/tests/autopilot/unity/tests/launcher/test_icon_behavior.py
index da6e38cae..0f03b2d0f 100644
--- a/tests/autopilot/unity/tests/launcher/test_icon_behavior.py
+++ b/tests/autopilot/unity/tests/launcher/test_icon_behavior.py
@@ -70,6 +70,7 @@ class LauncherIconsTests(LauncherTestCase):
bfb = self.unity.launcher.model.get_bfb_icon()
self.mouse.move(bfb.center_x, bfb.center_y)
+ self.assertThat(lambda: bfb.get_tooltip(), Eventually(NotEquals(None)))
self.assertThat(bfb.get_tooltip().active, Eventually(Equals(True)))
self.unity.dash.ensure_visible()
self.addCleanup(self.unity.dash.ensure_hidden)
diff --git a/tests/autopilot/unity/tests/launcher/test_tooltips.py b/tests/autopilot/unity/tests/launcher/test_tooltips.py
index 09cd786e1..28d871aed 100644
--- a/tests/autopilot/unity/tests/launcher/test_tooltips.py
+++ b/tests/autopilot/unity/tests/launcher/test_tooltips.py
@@ -7,7 +7,7 @@
# by the Free Software Foundation.
from autopilot.matchers import Eventually
-from testtools.matchers import Equals
+from testtools.matchers import Equals, NotEquals
from time import sleep
from unity.tests.launcher import LauncherTestCase, _make_scenarios
@@ -37,8 +37,10 @@ class LauncherTooltipTests(LauncherTestCase):
a, b = 0, 1
while b < len(self.icons):
self.mouse.move(self.icons[b].center_x, self.icons[b].center_y)
- self.assertTrue(self.icons[b].get_tooltip().active)
- self.assertFalse(self.icons[a].get_tooltip().active)
+ self.assertThat(lambda: self.icons[b].get_tooltip(), Eventually(NotEquals(None)))
+ self.assertThat(self.icons[b].get_tooltip().active, Eventually(Equals(True)))
+ self.assertThat(lambda: self.icons[a].get_tooltip(), Eventually(NotEquals(None)))
+ self.assertThat(self.icons[a].get_tooltip().active, Eventually(Equals(False)))
a, b = a + 1, b + 1
b -= 1