Merge lp:~noskcaj/ubuntu-autopilot-tests/xfce4-screenshooter into lp:ubuntu-autopilot-tests

Proposed by Jackson Doak
Status: Approved
Approved by: Dan Chapman 
Approved revision: 64
Proposed branch: lp:~noskcaj/ubuntu-autopilot-tests/xfce4-screenshooter
Merge into: lp:ubuntu-autopilot-tests
Diff against target: 31 lines (+25/-0)
1 file modified
ubuntu_autopilot_tests/xfce4_screenshooter/test_xfce4_screenshooter.py (+25/-0)
To merge this branch: bzr merge lp:~noskcaj/ubuntu-autopilot-tests/xfce4-screenshooter
Reviewer Review Type Date Requested Status
Dan Chapman  (community) Approve
Review via email: mp+199723@code.launchpad.net

Description of the change

Adds a basic test for xfce4-screenshooter.

To post a comment you must log in.
Revision history for this message
Dan Chapman  (dpniel) wrote :

This looks good to me as a simple testcase. I will hold off on merging until I have spoken with balloons about best place for xubuntu tests to live. :-)

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

Dan, I believe we can merge this under the xubuntu_tests subdirectory. I'm honestly not opposed to leaving them all in one directory but the precedence to split into subdirectories is set in ubuntu-manual-tests, so I think we can follow it. I'll await your feedback, but +1 for me.

If at all possible I would like to see another assert added, but it might not be possible. For instance, is there a hotkey to take a screenshot we can press, and see if the app responds as it should?

Unmerged revisions

64. By Jackson Doak

Remove unneeded comment

63. By Jackson Doak

Make a working screenshooter test

62. By Jackson Doak

Merge from the main branch

61. By Jackson Doak

Add xfce4_screenshooter test, not yet working

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'ubuntu_autopilot_tests/xfce4_screenshooter'
2=== added file 'ubuntu_autopilot_tests/xfce4_screenshooter/__init__.py'
3=== added file 'ubuntu_autopilot_tests/xfce4_screenshooter/test_xfce4_screenshooter.py'
4--- ubuntu_autopilot_tests/xfce4_screenshooter/test_xfce4_screenshooter.py 1970-01-01 00:00:00 +0000
5+++ ubuntu_autopilot_tests/xfce4_screenshooter/test_xfce4_screenshooter.py 2013-12-19 21:13:46 +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 xfce settings manager
13+ProcessManager.register_known_application(
14+ "xfce4-screenshooter",
15+ "xfce4-screenshooter.desktop",
16+ "xfce4-screenshooter")
17+
18+
19+class Xfce4ScreenshooterTests(AutopilotTestCase):
20+ """ Autopilot tests for the Xfce4 screenshooter """
21+
22+ def setUp(self):
23+ """ Basic setup instruction to run before each test """
24+ super(Xfce4ScreenshooterTests, self).setUp()
25+ self.manager = ProcessManager.create('BAMF')
26+ self.app = self.manager.start_app("xfce4-screenshooter")
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