Merge lp:~pitti/autopilot-gtk/update-tests into lp:autopilot-gtk

Proposed by Martin Pitt
Status: Merged
Approved by: Christopher Lee
Approved revision: 74
Merged at revision: 73
Proposed branch: lp:~pitti/autopilot-gtk/update-tests
Merge into: lp:autopilot-gtk
Diff against target: 117 lines (+26/-40)
3 files modified
debian/control (+3/-2)
debian/tests/control (+3/-2)
tests/autopilot/tests/test_gnome_app.py (+20/-36)
To merge this branch: bzr merge lp:~pitti/autopilot-gtk/update-tests
Reviewer Review Type Date Requested Status
Christopher Lee (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+220075@code.launchpad.net

Commit message

* Update build and test deps for autopilot-legacy
* Replace gnome-system-log test with gnome-calculator test

Description of the change

This adjusts dependencies for the autopilot-legacy rename, and fixes the test
failures due to gnome-system-log changing in between.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Christopher Lee (veebers) wrote :

LGTM, will be good to be able to run this with py3 soon:-)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/control'
--- debian/control 2013-12-18 17:47:19 +0000
+++ debian/control 2014-05-19 14:56:52 +0000
@@ -2,14 +2,15 @@
2Priority: extra2Priority: extra
3Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>3Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
4XSBC-Original-Maintainer: Allan LeSage <allan.lesage@canonical.com>4XSBC-Original-Maintainer: Allan LeSage <allan.lesage@canonical.com>
5Build-Depends: autopilot-desktop (>= 1.4),5Build-Depends: autopilot-desktop-legacy (>= 1.4),
6 bamfdaemon,6 bamfdaemon,
7 at-spi2-core,7 at-spi2-core,
8 cmake,8 cmake,
9 dbus-x11,9 dbus-x11,
10 debhelper (>= 9),10 debhelper (>= 9),
11 gnome-system-log,11 gnome-calculator,
12 gsettings-desktop-schemas,12 gsettings-desktop-schemas,
13 gnome-icon-theme-symbolic,
13 libglib2.0-dev,14 libglib2.0-dev,
14 libgtk-3-dev,15 libgtk-3-dev,
15 libxpathselect-dev (>= 1.4),16 libxpathselect-dev (>= 1.4),
1617
=== modified file 'debian/tests/control'
--- debian/tests/control 2013-12-18 17:47:19 +0000
+++ debian/tests/control 2014-05-19 14:56:52 +0000
@@ -1,11 +1,12 @@
1Tests: autopilot1Tests: autopilot
2Depends: @,2Depends: @,
3 autopilot-desktop (>= 1.4),3 autopilot-desktop-legacy (>= 1.4),
4 bamfdaemon,4 bamfdaemon,
5 at-spi2-core,5 at-spi2-core,
6 xvfb,6 xvfb,
7 dbus-x11,7 dbus-x11,
8 gnome-system-log,8 gnome-calculator,
9 gsettings-desktop-schemas,9 gsettings-desktop-schemas,
10 gnome-icon-theme-symbolic,
10 python-gi,11 python-gi,
11 gir1.2-gtk-3.012 gir1.2-gtk-3.0
1213
=== renamed file 'tests/autopilot/tests/test_gnome_system_log.py' => 'tests/autopilot/tests/test_gnome_app.py'
--- tests/autopilot/tests/test_gnome_system_log.py 2013-09-27 06:14:10 +0000
+++ tests/autopilot/tests/test_gnome_app.py 2014-05-19 14:56:52 +0000
@@ -1,4 +1,4 @@
1# blackbox testing of autopilot API against gnome-system-log1# blackbox testing of autopilot API against gnome-calculator
2# Author: Martin Pitt <martin.pitt@ubuntu.com>2# Author: Martin Pitt <martin.pitt@ubuntu.com>
3# Copyright (C) 2013 Canonical Ltd3# Copyright (C) 2013 Canonical Ltd
4#4#
@@ -17,7 +17,7 @@
1717
18from autopilot.testcase import AutopilotTestCase18from autopilot.testcase import AutopilotTestCase
19from autopilot.matchers import Eventually19from autopilot.matchers import Eventually
20from testtools.matchers import Equals, NotEquals20from testtools.matchers import Equals
2121
2222
23class GnomeAppTest(AutopilotTestCase):23class GnomeAppTest(AutopilotTestCase):
@@ -28,39 +28,23 @@
28 self.patch_environment('LANGUAGE', '')28 self.patch_environment('LANGUAGE', '')
29 self.patch_environment('LANG', '')29 self.patch_environment('LANG', '')
30 self.patch_environment('LC_MESSAGES', 'C')30 self.patch_environment('LC_MESSAGES', 'C')
31 self.app = self.launch_test_application('gnome-system-log', '/etc/issue')31 self.app = self.launch_test_application('gnome-calculator')
3232
33 def test_filename_label(self):33 def test_builder_button(self):
34 """Find file name label"""34 """Find button by builder ID"""
3535
36 l = self.app.select_single('GtkLabel', label=u'<b>issue</b>')36 l = self.app.select_single(BuilderName='calc_result_button')
37 self.assertNotEqual(l, None)37 self.assertNotEqual(l, None)
38 self.assertEqual(l.visible, True)38 self.assertEqual(l.visible, True)
3939 self.assertEqual(l.label, '=')
40 def test_search(self):40
41 """Run a search"""41 def test_calc(self):
4242 """Run a calculation"""
43 revealer = self.app.select_single('GdRevealer')43
44 if revealer:44 display = self.app.select_single(BuilderName='displayitem')
45 # search bar not visible by default45 self.mouse.click_object(display)
46 self.assertEqual(revealer.child_revealed, False)46 self.assertThat(display.buffer, Equals(''))
47 else:47
48 # g-s-l < 3.8 did not have the GdRevealer object yet48 self.keyboard.type('1+1')
49 findbar = self.app.select_single('LogviewFindbar')49 self.keyboard.press_and_release('Enter')
50 self.assertEqual(findbar.visible, False)50 self.assertThat(display.buffer, Eventually(Equals('2')))
51
52 search_btn = self.app.select_single('GtkToggleButton')
53 self.assertNotEqual(search_btn, None)
54 self.mouse.click_object(search_btn)
55
56 # should trigger search bar
57 if revealer:
58 self.assertThat(lambda: revealer.child_revealed, Eventually(Equals(True)))
59 else:
60 self.assertThat(lambda: findbar.visible, Eventually(Equals(True)))
61 search = self.app.select_single('GtkSearchEntry', visible=True)
62 self.assertTrue(search.has_focus)
63
64 # something that will not be in /etc/issue
65 self.keyboard.type('Bogus12!')
66 self.app.wait_select_single('GtkLabel', label=u'No matches found')

Subscribers

People subscribed via source and target branches

to all changes: