[pitivi] interactiveintro: Fix intro not appearing and add test
- From: Alexandru Băluț <alexbalut src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] interactiveintro: Fix intro not appearing and add test
- Date: Sun, 6 Sep 2020 02:00:59 +0000 (UTC)
commit a41d153348222aff408a0494d4b205847a8952e4
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Sun Sep 6 02:35:09 2020 +0200
interactiveintro: Fix intro not appearing and add test
Fixes #2488
pitivi/interactiveintro.py | 2 +-
tests/test_interactiveintro.py | 45 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 46 insertions(+), 1 deletion(-)
---
diff --git a/pitivi/interactiveintro.py b/pitivi/interactiveintro.py
index ddb266b6..ef2a6608 100644
--- a/pitivi/interactiveintro.py
+++ b/pitivi/interactiveintro.py
@@ -211,7 +211,7 @@ class InteractiveIntro(GObject.Object):
self.tips = [
(self.intro_button, _("Welcome to Pitivi!"),
Gtk.PositionType.BOTTOM, False, 4000),
- (editor.medialibrary.iconview_scrollwin, _("Drag files here to import them"),
+ (editor.medialibrary.scrollwin, _("Drag files here to import them"),
Gtk.PositionType.RIGHT, True, 5000),
(editor.timeline_ui.timeline, _("Drag clips in the timeline to arrange them"),
Gtk.PositionType.TOP, True, 7000),
diff --git a/tests/test_interactiveintro.py b/tests/test_interactiveintro.py
new file mode 100644
index 00000000..16b5da6a
--- /dev/null
+++ b/tests/test_interactiveintro.py
@@ -0,0 +1,45 @@
+# -*- coding: utf-8 -*-
+# Pitivi video editor
+# Copyright (c) 2020, Alex Băluț <alexandru balut gmail com>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, see <http://www.gnu.org/licenses/>.
+"""Tests for the pitivi.interactiveintro module."""
+# pylint: disable=protected-access,unused-argument
+from gi.repository import GLib
+
+from tests import common
+
+
+class TestInteractiveIntro(common.TestCase):
+
+ def test_overview(self):
+ app = common.create_pitivi()
+ app.gui = None
+ app.create_main_window()
+ intro = app.gui.editor.intro
+ app.project_manager.new_blank_project()
+
+ intro.intro_action.activate()
+
+ def timeout_add(timeout, func, *args):
+ func(*args)
+
+ original_timeout_add = GLib.timeout_add
+ GLib.timeout_add = timeout_add
+ try:
+ intro._overview_button_clicked_cb(None)
+ finally:
+ GLib.timeout_add = original_timeout_add
+
+ self.assertListEqual(intro.tips, [])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]