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

Proposed by Brian Murray
Status: Merged
Merged at revision: 14
Proposed branch: lp:~brian-murray/mago/jockey-deactivate-test
Merge into: lp:~mago-contributors/mago/mago-testsuite
Diff against target: 37 lines (+15/-2)
1 file modified
jockey-gtk/test_jockey-gtk.py (+15/-2)
To merge this branch: bzr merge lp:~brian-murray/mago/jockey-deactivate-test
Reviewer Review Type Date Requested Status
Jean-Baptiste Lallement Approve
Nagappan Alagappan Approve
Review via email: mp+47618@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Nagappan Alagappan (nagappan) wrote :

Maybe the hard coded label moved above and we can use just the variable. If the label changes later or we are planing i18n / l10n testing later, we can just change the variable value and we are all set.

Thanks

review: Approve
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Just for reference the LDTP way to check is an object exist are ldtp.objectexist() or ldtp.guiexist() which also check for the existence of the window.
Anyway, this is a bitesize change, I'll merge your fix and update it.

Thanks much.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'jockey-gtk/test_jockey-gtk.py'
2--- jockey-gtk/test_jockey-gtk.py 2011-01-18 22:56:37 +0000
3+++ jockey-gtk/test_jockey-gtk.py 2011-01-27 00:46:13 +0000
4@@ -22,6 +22,8 @@
5 - that clicking the Help button brings up yelp
6 - that the activate button is clickable when proprietary drivers are
7 available
8+ - that the deactivate button is clickable when proprietary drivers are
9+ active
10
11 To run it with:
12 $ mago-ng <path_to_this_file>
13@@ -54,11 +56,22 @@
14 This test ensures the activate button is present if there are
15 drivers that have not been activated.
16 """
17- if ldtp.gettextvalue(self.window_name,
18- 'lblThisdriverisnotactivated'):
19+ not_activated = 'lblThisdriverisnotactivated'
20+ if not_activated in ldtp.getobjectlist(self.window_name):
21 self.assertTrue(ldtp.objectexist(self.window_name,
22 'btnActivate'))
23
24+ def test_deactivate_is_active(self):
25+ """Test deactivate button is available
26+
27+ This test ensures the deactivate button is present if there are
28+ drivers that have been activated.
29+ """
30+ activated = 'lblThisdriverisactivatedandcurrentlyinuse'
31+ if activated in ldtp.getobjectlist(self.window_name):
32+ self.assertTrue(ldtp.objectexist(self.window_name,
33+ 'btnDeactivate'))
34+
35
36 if __name__ == "__main__":
37 unittest.main()

Subscribers

People subscribed via source and target branches