tests_: Check transition is gone when editing clip to another layer
authorAlexandru Băluț <alexandru.balut@gmail.com>
Thu, 6 Oct 2016 12:00:23 +0000 (14:00 +0200)
committerThibault Saunier <thibault.saunier@osg.samsung.com>
Fri, 4 Nov 2016 18:56:30 +0000 (15:56 -0300)
Differential Revision: https://phabricator.freedesktop.org/D1359

tests/check/python/test_clip.py
tests/check/python/test_timeline.py

index 6df4f26..fd57f76 100644 (file)
@@ -73,6 +73,7 @@ class TestCopyPaste(unittest.TestCase):
 
 
 class TestTitleClip(unittest.TestCase):
+
     def testGetPropertyNotInTrack(self):
         title_clip = GES.TitleClip.new()
         self.assertEqual(title_clip.props.text, "")
@@ -106,6 +107,7 @@ class TestTitleClip(unittest.TestCase):
 
 
 class TestTrackElements(unittest.TestCase):
+
     def test_add_to_layer_with_effect_remove_add(self):
         timeline = GES.Timeline.new_audio_video()
         self.assertEqual(len(timeline.get_tracks()), 2)
index ba3f0f5..0c5f41e 100644 (file)
@@ -60,3 +60,16 @@ class TestTimeline(unittest.TestCase):
         mainloop.run()
         self.assertTrue(loaded_called)
         handle.assert_not_called()
+
+class TestEditing(common.GESSimpleTimelineTest):
+
+    def test_transition_disappears_when_moving_to_another_layer(self):
+        self.timeline.props.auto_transition = True
+        unused_clip1 = self.add_clip(0, 0, 100)
+        clip2 = self.add_clip(50, 0, 100)
+        self.assertEquals(len(self.layer.get_clips()), 4)
+
+        layer2 = self.timeline.append_layer()
+        clip2.edit([], layer2.get_priority(), GES.EditMode.EDIT_NORMAL, GES.Edge.EDGE_NONE, clip2.props.start)
+        self.assertEquals(len(self.layer.get_clips()), 1)
+        self.assertEquals(len(layer2.get_clips()), 1)