tests_: Check transition is gone when editing clip to another layer

Differential Revision: https://phabricator.freedesktop.org/D1359
This commit is contained in:
Alexandru Băluț 2016-10-06 14:00:23 +02:00 committed by Thibault Saunier
parent c45705f529
commit ad6aab49ae
2 changed files with 15 additions and 0 deletions

View 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)

View 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)