[pitivi] tests: Check undo/redo for TrackElement property changing



commit e7c87a1c939a3b0096f36c748322793dbe64f912
Author: Fabián Orccón <Fabian Orccon>
Date:   Mon Dec 14 12:12:35 2015 -0500

    tests: Check undo/redo for TrackElement property changing
    
    Differential Revision: https://phabricator.freedesktop.org/D686

 tests/test_undo_timeline.py |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/tests/test_undo_timeline.py b/tests/test_undo_timeline.py
index d35c3a6..1bbc776 100644
--- a/tests/test_undo_timeline.py
+++ b/tests/test_undo_timeline.py
@@ -140,6 +140,21 @@ class TestTimelineUndo(TestCase):
         self.action_log.redo()
         self.assertTrue(clip1 in self.getTimelineClips())
 
+    def testTrackElementPropertyChanged(self):
+        clip1 = GES.TitleClip()
+        self.layer.add_clip(clip1)
+
+        self.action_log.begin("Title text change")
+        source = clip1.get_children(False)[0]
+        source.set_child_property("text", "pigs fly!")
+        self.assertEqual(source.get_child_property("text")[1], "pigs fly!")
+        self.action_log.commit()
+
+        self.action_log.undo()
+        self.assertEqual(source.get_child_property("text")[1], "")
+        self.action_log.redo()
+        self.assertEqual(source.get_child_property("text")[1], "pigs fly!")
+
     def testRemoveClip(self):
         stacks = []
         self.action_log.connect("commit", TestTimelineUndo.commitCb, stacks)


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