Merge lp:~brian-murray/mago/mago-testsuite-jockey-gtk into lp:~mago-contributors/mago/mago-testsuite

Proposed by Brian Murray
Status: Merged
Merged at revision: 7
Proposed branch: lp:~brian-murray/mago/mago-testsuite-jockey-gtk
Merge into: lp:~mago-contributors/mago/mago-testsuite
Diff against target: 69 lines (+64/-0)
1 file modified
jockey-gtk/test_jockey-gtk.py (+64/-0)
To merge this branch: bzr merge lp:~brian-murray/mago/mago-testsuite-jockey-gtk
Reviewer Review Type Date Requested Status
Jean-Baptiste Lallement Approve
Review via email: mp+46708@code.launchpad.net

Description of the change

I've added in a test or two for jockey-gtk. I left the following line in the test but commented out:

+ #help_name = 'frmProprietaryDrivers'
+ help_name = 'frmWorkingwithHardwareDevices'

On one system the yelp form name was "ProprietaryDrivers" but on another it is now "WorkingwithHardwareDevices". I'd check the first system to see if the form name has changed on it but yelp won't start at all.

To post a comment you must log in.
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

On my test system the help_name if 'frmWorkingwithHardwareDevices'
Looks good. Thanks.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'jockey-gtk'
2=== added file 'jockey-gtk/test_jockey-gtk.py'
3--- jockey-gtk/test_jockey-gtk.py 1970-01-01 00:00:00 +0000
4+++ jockey-gtk/test_jockey-gtk.py 2011-01-18 23:15:23 +0000
5@@ -0,0 +1,64 @@
6+# Copyright (C) 2011 Canonical Ltd
7+#
8+# This program is free software; you can redistribute it and/or modify
9+# it under the terms of the GNU General Public License as published by
10+# the Free Software Foundation; either version 2 of the License, or
11+# (at your option) any later version.
12+#
13+# This program is distributed in the hope that it will be useful,
14+# but WITHOUT ANY WARRANTY; without even the implied warranty of
15+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+# GNU General Public License for more details.
17+#
18+# You should have received a copy of the GNU General Public License
19+# along with this program; if not, write to the Free Software
20+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21+
22+"""Jockey GTK Test
23+
24+This is a basic test to verify that jockey-gtk is working correctly.
25+
26+It checks the following:
27+ - that clicking the Help button brings up yelp
28+ - that the activate button is clickable when proprietary drivers are
29+ available
30+
31+To run it with:
32+$ mago-ng <path_to_this_file>
33+"""
34+
35+from mago import TestCase
36+import ldtp
37+import unittest
38+
39+class JockeyTests(TestCase):
40+ """Launcher for the application jockey-gtk
41+ """
42+ launcher = 'jockey-gtk'
43+ window_name = 'dlgAdditionalDrivers'
44+
45+ def test_help_button(self):
46+ """Test help button
47+
48+ This tests that Help regarding proprietary drivers can be accessed.
49+ """
50+ ldtp.mouseleftclick(self.window_name, 'Help')
51+ #help_name = 'frmProprietaryDrivers'
52+ help_name = 'frmWorkingwithHardwareDevices'
53+ self.assertTrue(ldtp.waittillguiexist(help_name))
54+ ldtp.closewindow(help_name)
55+
56+ def test_activate_is_active(self):
57+ """Test activate button is available
58+
59+ This test ensures the activate button is present if there are
60+ drivers that have not been activated.
61+ """
62+ if ldtp.gettextvalue(self.window_name,
63+ 'lblThisdriverisnotactivated'):
64+ self.assertTrue(ldtp.objectexist(self.window_name,
65+ 'btnActivate'))
66+
67+
68+if __name__ == "__main__":
69+ unittest.main()

Subscribers

People subscribed via source and target branches