[pitivi] dogtail: Fix test_effects



commit 3fca6ac78fa9226e340edcb3fad859e616fa96b0
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Fri Feb 14 15:29:31 2014 +0100

    dogtail: Fix test_effects

 tests/dogtail_scripts/helper_functions.py |    8 +++++++-
 tests/dogtail_scripts/test_effects.py     |    2 ++
 2 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/tests/dogtail_scripts/helper_functions.py b/tests/dogtail_scripts/helper_functions.py
index da49ae4..a546ea7 100644
--- a/tests/dogtail_scripts/helper_functions.py
+++ b/tests/dogtail_scripts/helper_functions.py
@@ -117,6 +117,9 @@ class HelpFunc(BaseDogTail):
         self.zoom_best_fit_button.click()
 
     def import_media(self, filename="tears of steel.webm"):
+        """
+        @return: The icon widget.
+        """
         dogtail.rawinput.pressKey("Esc")  # Ensure the welcome dialog is closed
         self.import_button.click()
 
@@ -273,8 +276,11 @@ class HelpFunc(BaseDogTail):
         """
         listview = self.medialibrary.child(name="media_listview_scrollwindow")
         if listview.showing:
-            dogtail.rawinput.pressKey("Esc")  # Ensure the welcome dialog is closed
+            # Ensure the welcome dialog is closed.
+            dogtail.rawinput.pressKey("Esc")
+            # Make sure the list view is hidden.
             self.medialibrary.child(name="media_listview_button", roleName="panel").click()
+            self.wait_for_node_hidden(listview, timeout=2)
 
     @staticmethod
     def center(obj):
diff --git a/tests/dogtail_scripts/test_effects.py b/tests/dogtail_scripts/test_effects.py
index b9c1584..065650c 100644
--- a/tests/dogtail_scripts/test_effects.py
+++ b/tests/dogtail_scripts/test_effects.py
@@ -32,6 +32,8 @@ class EffectLibraryTest(HelpFunc):
         self.assertEqual(len(tab.child(roleName="table").children), 4)
 
     def help_test_effect_drag(self):
+        self.force_medialibrary_iconview_mode()
+
         sample = self.import_media()
         self.insert_clip(sample)
         # Assume that the layer controls are roughly 260 pixels wide,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]