Merge lp:~noskcaj/ubuntu-autopilot-tests/mousepad into lp:ubuntu-autopilot-tests

Proposed by Jackson Doak
Status: Rejected
Rejected by: Nicholas Skaggs
Proposed branch: lp:~noskcaj/ubuntu-autopilot-tests/mousepad
Merge into: lp:ubuntu-autopilot-tests
Diff against target: 31 lines (+25/-0)
1 file modified
xubuntu_autopilot_tests/mousepad/test_mousepad.py (+25/-0)
To merge this branch: bzr merge lp:~noskcaj/ubuntu-autopilot-tests/mousepad
Reviewer Review Type Date Requested Status
Nicholas Skaggs (community) Needs Information
Review via email: mp+208890@code.launchpad.net

Description of the change

Add basic mousepad test

To post a comment you must log in.
Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

hmm, no introspection :-(

autopilot launch -i Gtk mousepad
Gtk-Message: Failed to load module "autopilot"

Ideally we are using test_launch, and not BAMF.

Moving on, I would suggest before merging the test you add at least one simple testcase. Can you check anything else? You have the same assert in setup as in the testcase;

self.assertTrue(self.app.is_active)

review: Needs Information
Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

Rejecting for now to clean up the MP. Please re-propose Jackson if you are able to add more to the testcase. Thanks!

Unmerged revisions

64. By Jackson Doak

Add basic mousepad test

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'xubuntu_autopilot_tests/mousepad'
2=== added file 'xubuntu_autopilot_tests/mousepad/__init__.py'
3=== added file 'xubuntu_autopilot_tests/mousepad/test_mousepad.py'
4--- xubuntu_autopilot_tests/mousepad/test_mousepad.py 1970-01-01 00:00:00 +0000
5+++ xubuntu_autopilot_tests/mousepad/test_mousepad.py 2014-02-28 22:14:45 +0000
6@@ -0,0 +1,25 @@
7+from autopilot.testcase import AutopilotTestCase
8+#from autopilot.matchers import Eventually
9+#from testtools.matchers import Equals, Contains
10+from autopilot.process import ProcessManager
11+
12+# register mousepad as a known application
13+ProcessManager.register_known_application(
14+ "mousepad",
15+ "mousepad.desktop",
16+ "mousepad")
17+
18+
19+class mousepadTests(AutopilotTestCase):
20+ """ Autopilot tests for mousepad """
21+
22+ def setUp(self):
23+ """ Basic setup instruction to run before each test """
24+ super(mousepadTests, self).setUp()
25+ self.manager = ProcessManager.create('BAMF')
26+ self.app = self.manager.start_app("mousepad")
27+ self.assertTrue(self.app.is_active)
28+
29+ def test_app_visible(self, ):
30+ """ A simple check that the app window is focused """
31+ self.assertTrue(self.app.is_active)

Subscribers

People subscribed via source and target branches