[pitivi] dogtail tests: Expand the media library tests
- From: Jean-FranÃois Fortin Tam <jfft src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] dogtail tests: Expand the media library tests
- Date: Wed, 25 Jul 2012 11:57:29 +0000 (UTC)
commit 88fd7d0b21574ffe630e625a2cd7f62986b6bed2
Author: Jean-FranÃois Fortin Tam <nekohayo gmail com>
Date: Tue Jul 24 17:37:41 2012 -0400
dogtail tests: Expand the media library tests
tests/dogtail_scripts/test_medialibrary.py | 33 +++++++++++++++++++++++++++-
1 files changed, 32 insertions(+), 1 deletions(-)
---
diff --git a/tests/dogtail_scripts/test_medialibrary.py b/tests/dogtail_scripts/test_medialibrary.py
index ac0d9ab..e6afe4f 100644
--- a/tests/dogtail_scripts/test_medialibrary.py
+++ b/tests/dogtail_scripts/test_medialibrary.py
@@ -1,10 +1,12 @@
#!/usr/bin/env python
from helper_functions import HelpFunc
+from time import sleep
class MediaLibraryTest(HelpFunc):
+
def test_medialibrary(self):
- #Load few samples
+ # FIXME: this test will fail if the media library is in listview mode
samples = []
samples.append(self.import_media("flat_colour1_640x480.png"))
samples.append(self.import_media("flat_colour2_640x480.png"))
@@ -30,3 +32,32 @@ class MediaLibraryTest(HelpFunc):
self.assertEqual(len(iconview.children), 2)
search.text = ""
self.assertEqual(len(iconview.children), 3)
+ search.doubleClick() # Select all
+ search.typeText("colour2")
+ self.assertEqual(len(iconview.children), 1)
+
+ # Check how search results react to importing new clips.
+ search.text = ""
+ search.typeText("colour")
+ self.assertEqual(len(iconview.children), 3)
+ self.import_media() # Not appending to Samples, because it will be None
+ # The default clip that gets imported does not have "colour" in its name
+ self.assertEqual(len(iconview.children), 3)
+ # However, these ones should show up immediately in the iconview:
+ samples.append(self.import_media_multiple(["flat_colour4_1600x1200.jpg", "flat_colour5_1600x1200.jpg"]))
+ self.assertEqual(len(iconview.children), 5)
+ search.text = ""
+ self.assertEqual(len(iconview.children), 6)
+
+ # Search for the remaining clips that were not inserted in the timeline,
+ # then insert them all at once.
+ self.menubar.menu("Library").click()
+ self.menubar.menu("Library").menuItem("Select Unused Media").click()
+ self.menubar.menu("Library").click()
+ self.menubar.menu("Library").menuItem("Insert at End of Timeline").click()
+ sleep(0.5)
+ self.menubar.menu("Library").click()
+ self.menubar.menu("Library").menuItem("Select Unused Media").click()
+ sleep(0.5)
+ for icon in iconview.children:
+ self.assertFalse(icon.isSelected)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]