From dc7a12882ac3ba0e334c78813b8c75d974648fd0 Mon Sep 17 00:00:00 2001 From: Viorela Ioia Date: Mon, 3 Mar 2014 10:27:05 +0200 Subject: [PATCH] Bug 978099 - Better wait in test_video_empty.TestVideoEmpty --- tests/python/gaia-ui-tests/gaiatest/apps/videoplayer/app.py | 4 ---- .../tests/functional/videoplayer/test_video_empty.py | 5 ++--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/tests/python/gaia-ui-tests/gaiatest/apps/videoplayer/app.py b/tests/python/gaia-ui-tests/gaiatest/apps/videoplayer/app.py index 5da9a9ebd..eab8c831c 100644 --- a/tests/python/gaia-ui-tests/gaiatest/apps/videoplayer/app.py +++ b/tests/python/gaia-ui-tests/gaiatest/apps/videoplayer/app.py @@ -10,7 +10,6 @@ class VideoPlayer(Base): name = 'Video' - _progress_bar_locator = (By.ID, 'throbber') _thumbnails_locator = (By.ID, 'thumbnails') # Video list/summary view @@ -27,9 +26,6 @@ def wait_for_thumbnails_to_load(self, files_number): self.wait_for_condition(lambda m: len(m.find_elements(*self._video_items_locator)) == files_number, timeout=files_number * 5) - def wait_for_progress_bar_not_visible(self): - self.wait_for_element_not_displayed(*self._progress_bar_locator) - @property def total_video_count(self): return len(self.marionette.find_elements(*self._video_items_locator)) diff --git a/tests/python/gaia-ui-tests/gaiatest/tests/functional/videoplayer/test_video_empty.py b/tests/python/gaia-ui-tests/gaiatest/tests/functional/videoplayer/test_video_empty.py index 0819c4237..e9af44f9c 100644 --- a/tests/python/gaia-ui-tests/gaiatest/tests/functional/videoplayer/test_video_empty.py +++ b/tests/python/gaia-ui-tests/gaiatest/tests/functional/videoplayer/test_video_empty.py @@ -18,10 +18,9 @@ def test_empty_video(self): video_player = VideoPlayer(self.marionette) video_player.launch() - video_player.wait_for_progress_bar_not_visible() - # Verify title when no videos - self.assertEqual(video_player.empty_video_title, 'Add videos to get started') + # Wait for title when no videos + self.wait_for_condition(lambda m: video_player.empty_video_title == 'Add videos to get started') # Verify text when no videos # Note: Text will need to be updated if/when Bug 834477 is fixed