Merge lp:~lderan/ubuntu-autopilot-tests/ubuntu-autopilot-tests into lp:ubuntu-autopilot-tests
- ubuntu-autopilot-tests
- Merge into trunk
Status: | Needs review |
---|---|
Proposed branch: | lp:~lderan/ubuntu-autopilot-tests/ubuntu-autopilot-tests |
Merge into: | lp:ubuntu-autopilot-tests |
Diff against target: |
1649 lines (+1350/-3) 52 files modified
xubuntu_autopilot_tests/abiword/__init__.py (+2/-0) xubuntu_autopilot_tests/abiword/test_abiword.py (+65/-0) xubuntu_autopilot_tests/catfish/__init__.py (+2/-0) xubuntu_autopilot_tests/catfish/test_catfish.py (+51/-0) xubuntu_autopilot_tests/evince/__init__.py (+2/-0) xubuntu_autopilot_tests/evince/test_evince.py (+51/-0) xubuntu_autopilot_tests/file-roller/__init__.py (+2/-0) xubuntu_autopilot_tests/file-roller/test_file_roller.py (+51/-0) xubuntu_autopilot_tests/gmusicbrowser/__init__.py (+2/-0) xubuntu_autopilot_tests/gmusicbrowser/test_gmusicbrowser.py (+51/-0) xubuntu_autopilot_tests/gnome-calculator/__init__.py (+2/-0) xubuntu_autopilot_tests/gnome-calculator/test_gnome_calculator.py (+51/-0) xubuntu_autopilot_tests/gnumeric/__init__.py (+2/-0) xubuntu_autopilot_tests/gnumeric/test_gnumeric.py (+51/-0) xubuntu_autopilot_tests/gthumb/__init__.py (+2/-0) xubuntu_autopilot_tests/gthumb/test_gthumb.py (+51/-0) xubuntu_autopilot_tests/gucharmap/__init__.py (+2/-0) xubuntu_autopilot_tests/gucharmap/test_gucharmap.py (+51/-0) xubuntu_autopilot_tests/mousepad/__init__.py (+2/-0) xubuntu_autopilot_tests/mousepad/test_mousepad.py (+51/-0) xubuntu_autopilot_tests/onboard/__init__.py (+2/-0) xubuntu_autopilot_tests/onboard/test_onboard.py (+51/-0) xubuntu_autopilot_tests/orage-calendar/__init__.py (+2/-0) xubuntu_autopilot_tests/orage-calendar/test_orage_calendar.py (+51/-0) xubuntu_autopilot_tests/orage-globaltime/__init__.py (+2/-0) xubuntu_autopilot_tests/orage-globaltime/test_orage_globaltime.py (+51/-0) xubuntu_autopilot_tests/pavucontrol/__init__.py (+2/-0) xubuntu_autopilot_tests/pavucontrol/test_pavucontrol.py (+51/-0) xubuntu_autopilot_tests/pidgin/__init__.py (+2/-0) xubuntu_autopilot_tests/pidgin/test_pidgin.py (+51/-0) xubuntu_autopilot_tests/ristretto/__init__.py (+2/-0) xubuntu_autopilot_tests/ristretto/test_ristretto.py (+51/-0) xubuntu_autopilot_tests/simple-scan/__init__.py (+2/-0) xubuntu_autopilot_tests/simple-scan/test_simple_scan.py (+50/-0) xubuntu_autopilot_tests/sudoku/__init__.py (+2/-0) xubuntu_autopilot_tests/sudoku/test_sudoku.py (+49/-0) xubuntu_autopilot_tests/thunderbird/__init__.py (+2/-0) xubuntu_autopilot_tests/thunderbird/test_thunderbird.py (+49/-0) xubuntu_autopilot_tests/transmission-gtk/__init__.py (+2/-0) xubuntu_autopilot_tests/transmission-gtk/test_transmission_gtk.py (+49/-0) xubuntu_autopilot_tests/xfce4-appfinder/__init__.py (+2/-0) xubuntu_autopilot_tests/xfce4-appfinder/test_xfce4_appfinder.py (+51/-0) xubuntu_autopilot_tests/xfce4-dict/__init__.py (+2/-0) xubuntu_autopilot_tests/xfce4-dict/test_xfce4_dict.py (+51/-0) xubuntu_autopilot_tests/xfce4-screenshooter/__init__.py (+2/-0) xubuntu_autopilot_tests/xfce4-screenshooter/test_xfce4_screenshooter.py (+51/-0) xubuntu_autopilot_tests/xfce4-settings-manager/__init__.py (+2/-0) xubuntu_autopilot_tests/xfce4-settings-manager/test_xfce4_settings_manager.py (+66/-0) xubuntu_autopilot_tests/xfce4-taskmanager/__init__.py (+2/-0) xubuntu_autopilot_tests/xfce4-taskmanager/test_xfce4_taskmanager.py (+51/-0) xubuntu_autopilot_tests/xfce4-terminal/__init__.py (+1/-1) xubuntu_autopilot_tests/xfce4-terminal/test_terminal.py (+2/-2) |
To merge this branch: | bzr merge lp:~lderan/ubuntu-autopilot-tests/ubuntu-autopilot-tests |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Nicholas Skaggs (community) | Needs Fixing | ||
Review via email:
|
Commit message
Description of the change
Added simple tests for Sudoku and gThumb to the Xubuntu Autopilot tests
- 66. By Thomas Molloy
-
Added Simple-scan test to Xubuntu tests
- 67. By Thomas Molloy
-
gmusicbrowser simple test for Xubuntu
- 68. By Thomas Molloy
-
Added Ristretto Image Viewer test to the Xubuntu test directory

Thomas Molloy (lderan) wrote : | # |
The __init__ must of come from my copying and pasting the terminal app folder to make the others, my apologies. Shall fix this as soon as I can. and try to expand on the tests before submitting another MP.

Thomas Molloy (lderan) wrote : | # |
> In the gmusicbrowser test;
>
> I take it you want the window to be the only one?
> windows = self.app.
> self.assertTrue
Yes, that is correct
> This is ok, but note that mainWindow.title will never change as it's already
> set (well, the app could change it, but I don't think that's what we're
> looking for here :-) ) I'm not exactly sure you need the eventually here, but
> if so you should ensure you get the window as part of the lambda function.
> mainWindow = windows[0]
> self.assertThat
> Eventually(
Okay shall approach it differently :)
> Reviewing several apps at once is a bit hard; ideally split these up in the
> future :-)
Yup will do, I can get rid of this mp and do each on individually.
- 69. By Thomas Molloy
-
fixes for the xubuntu tests
- 70. By Thomas Molloy
-
working tests, need to be individually merged and if possible improved before doing so
Unmerged revisions
- 70. By Thomas Molloy
-
working tests, need to be individually merged and if possible improved before doing so
- 69. By Thomas Molloy
-
fixes for the xubuntu tests
- 68. By Thomas Molloy
-
Added Ristretto Image Viewer test to the Xubuntu test directory
- 67. By Thomas Molloy
-
gmusicbrowser simple test for Xubuntu
- 66. By Thomas Molloy
-
Added Simple-scan test to Xubuntu tests
- 65. By Thomas Molloy
-
Corrected the gThumb test text
- 64. By Thomas Molloy
-
Added simple tests for Sudoku and gThumb to the Xubuntu Autopilot tests
Preview Diff
1 | === added directory 'xubuntu_autopilot_tests/abiword' | |||
2 | === added file 'xubuntu_autopilot_tests/abiword/__init__.py' | |||
3 | --- xubuntu_autopilot_tests/abiword/__init__.py 1970-01-01 00:00:00 +0000 | |||
4 | +++ xubuntu_autopilot_tests/abiword/__init__.py 2014-03-30 18:20:04 +0000 | |||
5 | @@ -0,0 +1,2 @@ | |||
6 | 1 | # -*- coding: utf-8 -*- | ||
7 | 2 | |||
8 | 0 | 3 | ||
9 | === added file 'xubuntu_autopilot_tests/abiword/test_abiword.py' | |||
10 | --- xubuntu_autopilot_tests/abiword/test_abiword.py 1970-01-01 00:00:00 +0000 | |||
11 | +++ xubuntu_autopilot_tests/abiword/test_abiword.py 2014-03-30 18:20:04 +0000 | |||
12 | @@ -0,0 +1,65 @@ | |||
13 | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | ||
14 | 2 | # | ||
15 | 3 | # Copyright (C) 2014 | ||
16 | 4 | # | ||
17 | 5 | # Author: Thomas Molloy beetyrootey@gmail.com | ||
18 | 6 | # | ||
19 | 7 | # This program is free software; you can redistribute it and/or modify | ||
20 | 8 | # it under the terms of the GNU Lesser General Public License as published by | ||
21 | 9 | # the Free Software Foundation; version 3. | ||
22 | 10 | # | ||
23 | 11 | # This program is distributed in the hope that it will be useful, | ||
24 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
25 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
26 | 14 | # GNU Lesser General Public License for more details. | ||
27 | 15 | # | ||
28 | 16 | # You should have received a copy of the GNU Lesser General Public License | ||
29 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
30 | 18 | import os | ||
31 | 19 | from autopilot.matchers import Eventually | ||
32 | 20 | from testtools.matchers import Equals, Contains | ||
33 | 21 | from autopilot.testcase import AutopilotTestCase | ||
34 | 22 | from autopilot.process import ProcessManager | ||
35 | 23 | from testtools.matchers import Equals, Contains, FileExists, DirExists, \ | ||
36 | 24 | DirContains | ||
37 | 25 | |||
38 | 26 | # register abiword app | ||
39 | 27 | ProcessManager.register_known_application( | ||
40 | 28 | "abiword", | ||
41 | 29 | "abiword.desktop", | ||
42 | 30 | "abiword") | ||
43 | 31 | |||
44 | 32 | class AbiwordWindowTests(AutopilotTestCase): | ||
45 | 33 | """ Window tests for the xfce4-screenshooter """ | ||
46 | 34 | |||
47 | 35 | def setUp(self): | ||
48 | 36 | """ Basic setup instruction to run before each test """ | ||
49 | 37 | super(AbiwordWindowTests, self).setUp() | ||
50 | 38 | self.manager = ProcessManager.create('BAMF') | ||
51 | 39 | self.app = self.manager.start_app("abiword") | ||
52 | 40 | # This will make sure Screenshooter window you launched is focused and ready | ||
53 | 41 | # to accept your keyboard input | ||
54 | 42 | self.assertTrue(self.app.is_active) | ||
55 | 43 | |||
56 | 44 | def test_window_visible(self): | ||
57 | 45 | """ Check to see if the main window has the proper title """ | ||
58 | 46 | windows = self.app.get_windows() | ||
59 | 47 | window = windows[0] | ||
60 | 48 | |||
61 | 49 | # We must assert the window title = Untitled1 | ||
62 | 50 | # It fails with assertTrue(self.app.is_focused) | ||
63 | 51 | self.assertThat(lambda: window.title, Eventually(Contains('Untitled1'))) | ||
64 | 52 | |||
65 | 53 | for window in windows: | ||
66 | 54 | window.close() | ||
67 | 55 | |||
68 | 56 | def test_file_saving(self): | ||
69 | 57 | self.keyboard.press_and_release('Ctrl+Shift+s') | ||
70 | 58 | self.keyboard.type("/tmp/") | ||
71 | 59 | self.keyboard.press_and_release('Enter') | ||
72 | 60 | self.keyboard.type("test-file") | ||
73 | 61 | self.keyboard.press_and_release('Enter') | ||
74 | 62 | # Verify that test-file has been created | ||
75 | 63 | self.assertThat(lambda: '/tmp/test-file.abw', Eventually(FileExists())) | ||
76 | 64 | # Delete the file we created | ||
77 | 65 | self.addCleanup(os.remove, "/tmp/test-file.abw") | ||
78 | 0 | 66 | ||
79 | === added directory 'xubuntu_autopilot_tests/catfish' | |||
80 | === added file 'xubuntu_autopilot_tests/catfish/__init__.py' | |||
81 | --- xubuntu_autopilot_tests/catfish/__init__.py 1970-01-01 00:00:00 +0000 | |||
82 | +++ xubuntu_autopilot_tests/catfish/__init__.py 2014-03-30 18:20:04 +0000 | |||
83 | @@ -0,0 +1,2 @@ | |||
84 | 1 | # -*- coding: utf-8 -*- | ||
85 | 2 | |||
86 | 0 | 3 | ||
87 | === added file 'xubuntu_autopilot_tests/catfish/test_catfish.py' | |||
88 | --- xubuntu_autopilot_tests/catfish/test_catfish.py 1970-01-01 00:00:00 +0000 | |||
89 | +++ xubuntu_autopilot_tests/catfish/test_catfish.py 2014-03-30 18:20:04 +0000 | |||
90 | @@ -0,0 +1,51 @@ | |||
91 | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | ||
92 | 2 | # | ||
93 | 3 | # Copyright (C) 2014 | ||
94 | 4 | # | ||
95 | 5 | # Author: Thomas Molloy beetyrootey@gmail.com | ||
96 | 6 | # | ||
97 | 7 | # This program is free software; you can redistribute it and/or modify | ||
98 | 8 | # it under the terms of the GNU Lesser General Public License as published by | ||
99 | 9 | # the Free Software Foundation; version 3. | ||
100 | 10 | # | ||
101 | 11 | # This program is distributed in the hope that it will be useful, | ||
102 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
103 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
104 | 14 | # GNU Lesser General Public License for more details. | ||
105 | 15 | # | ||
106 | 16 | # You should have received a copy of the GNU Lesser General Public License | ||
107 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
108 | 18 | from autopilot.matchers import Eventually | ||
109 | 19 | from testtools.matchers import Equals, Contains | ||
110 | 20 | from autopilot.testcase import AutopilotTestCase | ||
111 | 21 | from autopilot.process import ProcessManager | ||
112 | 22 | |||
113 | 23 | # register catfish app | ||
114 | 24 | ProcessManager.register_known_application( | ||
115 | 25 | "catfish", | ||
116 | 26 | "catfish.desktop", | ||
117 | 27 | "catfish") | ||
118 | 28 | |||
119 | 29 | class CatfishWindowTests(AutopilotTestCase): | ||
120 | 30 | """ Window tests for the xfce4-screenshooter """ | ||
121 | 31 | |||
122 | 32 | def setUp(self): | ||
123 | 33 | """ Basic setup instruction to run before each test """ | ||
124 | 34 | super(CatfishWindowTests, self).setUp() | ||
125 | 35 | self.manager = ProcessManager.create('BAMF') | ||
126 | 36 | self.app = self.manager.start_app("catfish") | ||
127 | 37 | # This will make sure Screenshooter window you launched is focused and ready | ||
128 | 38 | # to accept your keyboard input | ||
129 | 39 | self.assertTrue(self.app.is_active) | ||
130 | 40 | |||
131 | 41 | def test_window_visible(self): | ||
132 | 42 | """ Check to see if the main window has the proper title """ | ||
133 | 43 | windows = self.app.get_windows() | ||
134 | 44 | window = windows[0] | ||
135 | 45 | |||
136 | 46 | # We must assert the window title = Catfish | ||
137 | 47 | # It fails with assertTrue(self.app.is_focused) | ||
138 | 48 | self.assertThat(lambda: window.title, Eventually(Contains('Catfish'))) | ||
139 | 49 | |||
140 | 50 | for window in windows: | ||
141 | 51 | window.close() | ||
142 | 0 | 52 | ||
143 | === added directory 'xubuntu_autopilot_tests/evince' | |||
144 | === added file 'xubuntu_autopilot_tests/evince/__init__.py' | |||
145 | --- xubuntu_autopilot_tests/evince/__init__.py 1970-01-01 00:00:00 +0000 | |||
146 | +++ xubuntu_autopilot_tests/evince/__init__.py 2014-03-30 18:20:04 +0000 | |||
147 | @@ -0,0 +1,2 @@ | |||
148 | 1 | # -*- coding: utf-8 -*- | ||
149 | 2 | |||
150 | 0 | 3 | ||
151 | === added file 'xubuntu_autopilot_tests/evince/test_evince.py' | |||
152 | --- xubuntu_autopilot_tests/evince/test_evince.py 1970-01-01 00:00:00 +0000 | |||
153 | +++ xubuntu_autopilot_tests/evince/test_evince.py 2014-03-30 18:20:04 +0000 | |||
154 | @@ -0,0 +1,51 @@ | |||
155 | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | ||
156 | 2 | # | ||
157 | 3 | # Copyright (C) 2014 | ||
158 | 4 | # | ||
159 | 5 | # Author: Thomas Molloy beetyrootey@gmail.com | ||
160 | 6 | # | ||
161 | 7 | # This program is free software; you can redistribute it and/or modify | ||
162 | 8 | # it under the terms of the GNU Lesser General Public License as published by | ||
163 | 9 | # the Free Software Foundation; version 3. | ||
164 | 10 | # | ||
165 | 11 | # This program is distributed in the hope that it will be useful, | ||
166 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
167 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
168 | 14 | # GNU Lesser General Public License for more details. | ||
169 | 15 | # | ||
170 | 16 | # You should have received a copy of the GNU Lesser General Public License | ||
171 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
172 | 18 | from autopilot.matchers import Eventually | ||
173 | 19 | from testtools.matchers import Equals, Contains | ||
174 | 20 | from autopilot.testcase import AutopilotTestCase | ||
175 | 21 | from autopilot.process import ProcessManager | ||
176 | 22 | |||
177 | 23 | # register evince app | ||
178 | 24 | ProcessManager.register_known_application( | ||
179 | 25 | "evince", | ||
180 | 26 | "evince.desktop", | ||
181 | 27 | "evince") | ||
182 | 28 | |||
183 | 29 | class EvinceWindowTests(AutopilotTestCase): | ||
184 | 30 | """ Window tests for the xfce4-screenshooter """ | ||
185 | 31 | |||
186 | 32 | def setUp(self): | ||
187 | 33 | """ Basic setup instruction to run before each test """ | ||
188 | 34 | super(EvinceWindowTests, self).setUp() | ||
189 | 35 | self.manager = ProcessManager.create('BAMF') | ||
190 | 36 | self.app = self.manager.start_app("evince") | ||
191 | 37 | # This will make sure Screenshooter window you launched is focused and ready | ||
192 | 38 | # to accept your keyboard input | ||
193 | 39 | self.assertTrue(self.app.is_active) | ||
194 | 40 | |||
195 | 41 | def test_window_visible(self): | ||
196 | 42 | """ Check to see if the main window has the proper title """ | ||
197 | 43 | windows = self.app.get_windows() | ||
198 | 44 | window = windows[0] | ||
199 | 45 | |||
200 | 46 | # We must assert the window title = Document Viewer | ||
201 | 47 | # It fails with assertTrue(self.app.is_focused) | ||
202 | 48 | self.assertThat(lambda: window.title, Eventually(Contains('Document Viewer'))) | ||
203 | 49 | |||
204 | 50 | for window in windows: | ||
205 | 51 | window.close() | ||
206 | 0 | 52 | ||
207 | === added directory 'xubuntu_autopilot_tests/file-roller' | |||
208 | === added file 'xubuntu_autopilot_tests/file-roller/__init__.py' | |||
209 | --- xubuntu_autopilot_tests/file-roller/__init__.py 1970-01-01 00:00:00 +0000 | |||
210 | +++ xubuntu_autopilot_tests/file-roller/__init__.py 2014-03-30 18:20:04 +0000 | |||
211 | @@ -0,0 +1,2 @@ | |||
212 | 1 | # -*- coding: utf-8 -*- | ||
213 | 2 | |||
214 | 0 | 3 | ||
215 | === added file 'xubuntu_autopilot_tests/file-roller/test_file_roller.py' | |||
216 | --- xubuntu_autopilot_tests/file-roller/test_file_roller.py 1970-01-01 00:00:00 +0000 | |||
217 | +++ xubuntu_autopilot_tests/file-roller/test_file_roller.py 2014-03-30 18:20:04 +0000 | |||
218 | @@ -0,0 +1,51 @@ | |||
219 | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | ||
220 | 2 | # | ||
221 | 3 | # Copyright (C) 2014 | ||
222 | 4 | # | ||
223 | 5 | # Author: Thomas Molloy beetyrootey@gmail.com | ||
224 | 6 | # | ||
225 | 7 | # This program is free software; you can redistribute it and/or modify | ||
226 | 8 | # it under the terms of the GNU Lesser General Public License as published by | ||
227 | 9 | # the Free Software Foundation; version 3. | ||
228 | 10 | # | ||
229 | 11 | # This program is distributed in the hope that it will be useful, | ||
230 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
231 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
232 | 14 | # GNU Lesser General Public License for more details. | ||
233 | 15 | # | ||
234 | 16 | # You should have received a copy of the GNU Lesser General Public License | ||
235 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
236 | 18 | from autopilot.matchers import Eventually | ||
237 | 19 | from testtools.matchers import Equals, Contains | ||
238 | 20 | from autopilot.testcase import AutopilotTestCase | ||
239 | 21 | from autopilot.process import ProcessManager | ||
240 | 22 | |||
241 | 23 | # register file-roller app | ||
242 | 24 | ProcessManager.register_known_application( | ||
243 | 25 | "file-roller", | ||
244 | 26 | "file-roller.desktop", | ||
245 | 27 | "file-roller") | ||
246 | 28 | |||
247 | 29 | class FileRollerWindowTests(AutopilotTestCase): | ||
248 | 30 | """ Window tests for the xfce4-screenshooter """ | ||
249 | 31 | |||
250 | 32 | def setUp(self): | ||
251 | 33 | """ Basic setup instruction to run before each test """ | ||
252 | 34 | super(FileRollerWindowTests, self).setUp() | ||
253 | 35 | self.manager = ProcessManager.create('BAMF') | ||
254 | 36 | self.app = self.manager.start_app("file-roller") | ||
255 | 37 | # This will make sure Screenshooter window you launched is focused and ready | ||
256 | 38 | # to accept your keyboard input | ||
257 | 39 | self.assertTrue(self.app.is_active) | ||
258 | 40 | |||
259 | 41 | def test_window_visible(self): | ||
260 | 42 | """ Check to see if the main window has the proper title """ | ||
261 | 43 | windows = self.app.get_windows() | ||
262 | 44 | window = windows[0] | ||
263 | 45 | |||
264 | 46 | # We must assert the window title = Archive Manager | ||
265 | 47 | # It fails with assertTrue(self.app.is_focused) | ||
266 | 48 | self.assertThat(lambda: window.title, Eventually(Contains('Archive Manager'))) | ||
267 | 49 | |||
268 | 50 | for window in windows: | ||
269 | 51 | window.close() | ||
270 | 0 | 52 | ||
271 | === added directory 'xubuntu_autopilot_tests/gmusicbrowser' | |||
272 | === added file 'xubuntu_autopilot_tests/gmusicbrowser/__init__.py' | |||
273 | --- xubuntu_autopilot_tests/gmusicbrowser/__init__.py 1970-01-01 00:00:00 +0000 | |||
274 | +++ xubuntu_autopilot_tests/gmusicbrowser/__init__.py 2014-03-30 18:20:04 +0000 | |||
275 | @@ -0,0 +1,2 @@ | |||
276 | 1 | # -*- coding: utf-8 -*- | ||
277 | 2 | |||
278 | 0 | 3 | ||
279 | === added file 'xubuntu_autopilot_tests/gmusicbrowser/test_gmusicbrowser.py' | |||
280 | --- xubuntu_autopilot_tests/gmusicbrowser/test_gmusicbrowser.py 1970-01-01 00:00:00 +0000 | |||
281 | +++ xubuntu_autopilot_tests/gmusicbrowser/test_gmusicbrowser.py 2014-03-30 18:20:04 +0000 | |||
282 | @@ -0,0 +1,51 @@ | |||
283 | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | ||
284 | 2 | # | ||
285 | 3 | # Copyright (C) 2014 | ||
286 | 4 | # | ||
287 | 5 | # Author: Thomas Molloy beetyrootey@gmail.com | ||
288 | 6 | # | ||
289 | 7 | # This program is free software; you can redistribute it and/or modify | ||
290 | 8 | # it under the terms of the GNU Lesser General Public License as published by | ||
291 | 9 | # the Free Software Foundation; version 3. | ||
292 | 10 | # | ||
293 | 11 | # This program is distributed in the hope that it will be useful, | ||
294 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
295 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
296 | 14 | # GNU Lesser General Public License for more details. | ||
297 | 15 | # | ||
298 | 16 | # You should have received a copy of the GNU Lesser General Public License | ||
299 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
300 | 18 | |||
301 | 19 | from autopilot.matchers import Eventually | ||
302 | 20 | from testtools.matchers import Equals, Contains | ||
303 | 21 | from autopilot.testcase import AutopilotTestCase | ||
304 | 22 | from autopilot.process import ProcessManager | ||
305 | 23 | |||
306 | 24 | # register gmusicbrowser app | ||
307 | 25 | ProcessManager.register_known_application( | ||
308 | 26 | "gmusicbrowser", | ||
309 | 27 | "gmusicbrowser.desktop", | ||
310 | 28 | "gmusicbrowser") | ||
311 | 29 | |||
312 | 30 | class GMusicBrowserWindowTests(AutopilotTestCase): | ||
313 | 31 | """ Window tests for the game Simple scan """ | ||
314 | 32 | |||
315 | 33 | def setUp(self): | ||
316 | 34 | """ Basic setup instruction to run before each test """ | ||
317 | 35 | super(GMusicBrowserWindowTests, self).setUp() | ||
318 | 36 | self.manager = ProcessManager.create('BAMF') | ||
319 | 37 | self.app = self.manager.start_app("gmusicbrowser") | ||
320 | 38 | # This will make sure Sudoku window you launched is focused and ready | ||
321 | 39 | # to accept your keyboard input | ||
322 | 40 | self.assertTrue(self.app.is_active) | ||
323 | 41 | |||
324 | 42 | def test_window_visible(self): | ||
325 | 43 | """ Basic test to see if the window opens with the correct name """ | ||
326 | 44 | # We must assert the window title = gmusicbrowser here to keep focus of gmusicbrowser | ||
327 | 45 | # It fails with assertTrue(self.app.is_focused) | ||
328 | 46 | windows = self.app.get_windows() | ||
329 | 47 | self.assertTrue(len(windows) == 1) | ||
330 | 48 | mainWindow = windows[0] | ||
331 | 49 | self.assertThat(lambda: mainWindow.title, Eventually(Contains('gmusicbrowser'))) | ||
332 | 50 | # We must close the window else the test fails as it is unable to close it automatically | ||
333 | 51 | mainWindow.close() | ||
334 | 0 | 52 | ||
335 | === added directory 'xubuntu_autopilot_tests/gnome-calculator' | |||
336 | === added file 'xubuntu_autopilot_tests/gnome-calculator/__init__.py' | |||
337 | --- xubuntu_autopilot_tests/gnome-calculator/__init__.py 1970-01-01 00:00:00 +0000 | |||
338 | +++ xubuntu_autopilot_tests/gnome-calculator/__init__.py 2014-03-30 18:20:04 +0000 | |||
339 | @@ -0,0 +1,2 @@ | |||
340 | 1 | # -*- coding: utf-8 -*- | ||
341 | 2 | |||
342 | 0 | 3 | ||
343 | === added file 'xubuntu_autopilot_tests/gnome-calculator/test_gnome_calculator.py' | |||
344 | --- xubuntu_autopilot_tests/gnome-calculator/test_gnome_calculator.py 1970-01-01 00:00:00 +0000 | |||
345 | +++ xubuntu_autopilot_tests/gnome-calculator/test_gnome_calculator.py 2014-03-30 18:20:04 +0000 | |||
346 | @@ -0,0 +1,51 @@ | |||
347 | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | ||
348 | 2 | # | ||
349 | 3 | # Copyright (C) 2014 | ||
350 | 4 | # | ||
351 | 5 | # Author: Thomas Molloy beetyrootey@gmail.com | ||
352 | 6 | # | ||
353 | 7 | # This program is free software; you can redistribute it and/or modify | ||
354 | 8 | # it under the terms of the GNU Lesser General Public License as published by | ||
355 | 9 | # the Free Software Foundation; version 3. | ||
356 | 10 | # | ||
357 | 11 | # This program is distributed in the hope that it will be useful, | ||
358 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
359 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
360 | 14 | # GNU Lesser General Public License for more details. | ||
361 | 15 | # | ||
362 | 16 | # You should have received a copy of the GNU Lesser General Public License | ||
363 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
364 | 18 | from autopilot.matchers import Eventually | ||
365 | 19 | from testtools.matchers import Equals, Contains | ||
366 | 20 | from autopilot.testcase import AutopilotTestCase | ||
367 | 21 | from autopilot.process import ProcessManager | ||
368 | 22 | |||
369 | 23 | # register gnome-calculator app | ||
370 | 24 | ProcessManager.register_known_application( | ||
371 | 25 | "gnome-calculator", | ||
372 | 26 | "gnome-calculator.desktop", | ||
373 | 27 | "gnome-calculator") | ||
374 | 28 | |||
375 | 29 | class GnomeCalculatorWindowTests(AutopilotTestCase): | ||
376 | 30 | """ Window tests for the xfce4-screenshooter """ | ||
377 | 31 | |||
378 | 32 | def setUp(self): | ||
379 | 33 | """ Basic setup instruction to run before each test """ | ||
380 | 34 | super(GnomeCalculatorWindowTests, self).setUp() | ||
381 | 35 | self.manager = ProcessManager.create('BAMF') | ||
382 | 36 | self.app = self.manager.start_app("gnome-calculator") | ||
383 | 37 | # This will make sure Screenshooter window you launched is focused and ready | ||
384 | 38 | # to accept your keyboard input | ||
385 | 39 | self.assertTrue(self.app.is_active) | ||
386 | 40 | |||
387 | 41 | def test_window_visible(self): | ||
388 | 42 | """ Check to see if the main window has the proper title """ | ||
389 | 43 | windows = self.app.get_windows() | ||
390 | 44 | window = windows[0] | ||
391 | 45 | |||
392 | 46 | # We must assert the window title = Calculator | ||
393 | 47 | # It fails with assertTrue(self.app.is_focused) | ||
394 | 48 | self.assertThat(lambda: window.title, Eventually(Contains('Calculator'))) | ||
395 | 49 | |||
396 | 50 | for window in windows: | ||
397 | 51 | window.close() | ||
398 | 0 | 52 | ||
399 | === added directory 'xubuntu_autopilot_tests/gnumeric' | |||
400 | === added file 'xubuntu_autopilot_tests/gnumeric/__init__.py' | |||
401 | --- xubuntu_autopilot_tests/gnumeric/__init__.py 1970-01-01 00:00:00 +0000 | |||
402 | +++ xubuntu_autopilot_tests/gnumeric/__init__.py 2014-03-30 18:20:04 +0000 | |||
403 | @@ -0,0 +1,2 @@ | |||
404 | 1 | # -*- coding: utf-8 -*- | ||
405 | 2 | |||
406 | 0 | 3 | ||
407 | === added file 'xubuntu_autopilot_tests/gnumeric/test_gnumeric.py' | |||
408 | --- xubuntu_autopilot_tests/gnumeric/test_gnumeric.py 1970-01-01 00:00:00 +0000 | |||
409 | +++ xubuntu_autopilot_tests/gnumeric/test_gnumeric.py 2014-03-30 18:20:04 +0000 | |||
410 | @@ -0,0 +1,51 @@ | |||
411 | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | ||
412 | 2 | # | ||
413 | 3 | # Copyright (C) 2014 | ||
414 | 4 | # | ||
415 | 5 | # Author: Thomas Molloy beetyrootey@gmail.com | ||
416 | 6 | # | ||
417 | 7 | # This program is free software; you can redistribute it and/or modify | ||
418 | 8 | # it under the terms of the GNU Lesser General Public License as published by | ||
419 | 9 | # the Free Software Foundation; version 3. | ||
420 | 10 | # | ||
421 | 11 | # This program is distributed in the hope that it will be useful, | ||
422 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
423 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
424 | 14 | # GNU Lesser General Public License for more details. | ||
425 | 15 | # | ||
426 | 16 | # You should have received a copy of the GNU Lesser General Public License | ||
427 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
428 | 18 | from autopilot.matchers import Eventually | ||
429 | 19 | from testtools.matchers import Equals, Contains | ||
430 | 20 | from autopilot.testcase import AutopilotTestCase | ||
431 | 21 | from autopilot.process import ProcessManager | ||
432 | 22 | |||
433 | 23 | # register gnumeric app | ||
434 | 24 | ProcessManager.register_known_application( | ||
435 | 25 | "gnumeric", | ||
436 | 26 | "gnumeric.desktop", | ||
437 | 27 | "gnumeric") | ||
438 | 28 | |||
439 | 29 | class GnumericWindowTests(AutopilotTestCase): | ||
440 | 30 | """ Window tests for the xfce4-screenshooter """ | ||
441 | 31 | |||
442 | 32 | def setUp(self): | ||
443 | 33 | """ Basic setup instruction to run before each test """ | ||
444 | 34 | super(GnumericWindowTests, self).setUp() | ||
445 | 35 | self.manager = ProcessManager.create('BAMF') | ||
446 | 36 | self.app = self.manager.start_app("gnumeric") | ||
447 | 37 | # This will make sure Screenshooter window you launched is focused and ready | ||
448 | 38 | # to accept your keyboard input | ||
449 | 39 | self.assertTrue(self.app.is_active) | ||
450 | 40 | |||
451 | 41 | def test_window_visible(self): | ||
452 | 42 | """ Check to see if the main window has the proper title """ | ||
453 | 43 | windows = self.app.get_windows() | ||
454 | 44 | window = windows[0] | ||
455 | 45 | |||
456 | 46 | # We must assert the window title = Archive Manager | ||
457 | 47 | # It fails with assertTrue(self.app.is_focused) | ||
458 | 48 | self.assertThat(lambda: window.title, Eventually(Contains('Gnumeric'))) | ||
459 | 49 | |||
460 | 50 | for window in windows: | ||
461 | 51 | window.close() | ||
462 | 0 | 52 | ||
463 | === added directory 'xubuntu_autopilot_tests/gthumb' | |||
464 | === added file 'xubuntu_autopilot_tests/gthumb/__init__.py' | |||
465 | --- xubuntu_autopilot_tests/gthumb/__init__.py 1970-01-01 00:00:00 +0000 | |||
466 | +++ xubuntu_autopilot_tests/gthumb/__init__.py 2014-03-30 18:20:04 +0000 | |||
467 | @@ -0,0 +1,2 @@ | |||
468 | 1 | # -*- coding: utf-8 -*- | ||
469 | 2 | |||
470 | 0 | 3 | ||
471 | === added file 'xubuntu_autopilot_tests/gthumb/test_gthumb.py' | |||
472 | --- xubuntu_autopilot_tests/gthumb/test_gthumb.py 1970-01-01 00:00:00 +0000 | |||
473 | +++ xubuntu_autopilot_tests/gthumb/test_gthumb.py 2014-03-30 18:20:04 +0000 | |||
474 | @@ -0,0 +1,51 @@ | |||
475 | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | ||
476 | 2 | # | ||
477 | 3 | # Copyright (C) 2014 | ||
478 | 4 | # | ||
479 | 5 | # Author: Thomas Molloy beetyrootey@gmail.com | ||
480 | 6 | # | ||
481 | 7 | # This program is free software; you can redistribute it and/or modify | ||
482 | 8 | # it under the terms of the GNU Lesser General Public License as published by | ||
483 | 9 | # the Free Software Foundation; version 3. | ||
484 | 10 | # | ||
485 | 11 | # This program is distributed in the hope that it will be useful, | ||
486 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
487 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
488 | 14 | # GNU Lesser General Public License for more details. | ||
489 | 15 | # | ||
490 | 16 | # You should have received a copy of the GNU Lesser General Public License | ||
491 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
492 | 18 | from autopilot.matchers import Eventually | ||
493 | 19 | from testtools.matchers import Equals, Contains | ||
494 | 20 | from autopilot.testcase import AutopilotTestCase | ||
495 | 21 | from autopilot.process import ProcessManager | ||
496 | 22 | |||
497 | 23 | # register gThumb app | ||
498 | 24 | ProcessManager.register_known_application( | ||
499 | 25 | "gthumb", | ||
500 | 26 | "gthumb.desktop", | ||
501 | 27 | "gThumb") | ||
502 | 28 | |||
503 | 29 | class GThumbWindowTests(AutopilotTestCase): | ||
504 | 30 | """ Window tests for the gthumb """ | ||
505 | 31 | |||
506 | 32 | def setUp(self): | ||
507 | 33 | """ Basic setup instruction to run before each test """ | ||
508 | 34 | super(GThumbWindowTests, self).setUp() | ||
509 | 35 | self.manager = ProcessManager.create('BAMF') | ||
510 | 36 | self.app = self.manager.start_app("gthumb") | ||
511 | 37 | # This will make sure Mines window you launched is focused and ready | ||
512 | 38 | # to accept your keyboard input | ||
513 | 39 | self.assertTrue(self.app.is_active) | ||
514 | 40 | |||
515 | 41 | def test_window_visible(self): | ||
516 | 42 | """ Check to see if the main window has the proper title """ | ||
517 | 43 | windows = self.app.get_windows() | ||
518 | 44 | window = windows[0] | ||
519 | 45 | |||
520 | 46 | # We must assert the window title = gThumb here to keep focus of Sudoku | ||
521 | 47 | # It fails with assertTrue(self.app.is_focused) | ||
522 | 48 | self.assertThat(lambda: window.title, Eventually(Contains('gThumb'))) | ||
523 | 49 | |||
524 | 50 | for window in windows: | ||
525 | 51 | window.close() | ||
526 | 0 | 52 | ||
527 | === added directory 'xubuntu_autopilot_tests/gucharmap' | |||
528 | === added file 'xubuntu_autopilot_tests/gucharmap/__init__.py' | |||
529 | --- xubuntu_autopilot_tests/gucharmap/__init__.py 1970-01-01 00:00:00 +0000 | |||
530 | +++ xubuntu_autopilot_tests/gucharmap/__init__.py 2014-03-30 18:20:04 +0000 | |||
531 | @@ -0,0 +1,2 @@ | |||
532 | 1 | # -*- coding: utf-8 -*- | ||
533 | 2 | |||
534 | 0 | 3 | ||
535 | === added file 'xubuntu_autopilot_tests/gucharmap/test_gucharmap.py' | |||
536 | --- xubuntu_autopilot_tests/gucharmap/test_gucharmap.py 1970-01-01 00:00:00 +0000 | |||
537 | +++ xubuntu_autopilot_tests/gucharmap/test_gucharmap.py 2014-03-30 18:20:04 +0000 | |||
538 | @@ -0,0 +1,51 @@ | |||
539 | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | ||
540 | 2 | # | ||
541 | 3 | # Copyright (C) 2014 | ||
542 | 4 | # | ||
543 | 5 | # Author: Thomas Molloy beetyrootey@gmail.com | ||
544 | 6 | # | ||
545 | 7 | # This program is free software; you can redistribute it and/or modify | ||
546 | 8 | # it under the terms of the GNU Lesser General Public License as published by | ||
547 | 9 | # the Free Software Foundation; version 3. | ||
548 | 10 | # | ||
549 | 11 | # This program is distributed in the hope that it will be useful, | ||
550 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
551 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
552 | 14 | # GNU Lesser General Public License for more details. | ||
553 | 15 | # | ||
554 | 16 | # You should have received a copy of the GNU Lesser General Public License | ||
555 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
556 | 18 | from autopilot.matchers import Eventually | ||
557 | 19 | from testtools.matchers import Equals, Contains | ||
558 | 20 | from autopilot.testcase import AutopilotTestCase | ||
559 | 21 | from autopilot.process import ProcessManager | ||
560 | 22 | |||
561 | 23 | # register gnumeric app | ||
562 | 24 | ProcessManager.register_known_application( | ||
563 | 25 | "gucharmap", | ||
564 | 26 | "gucharmap.desktop", | ||
565 | 27 | "gucharmap") | ||
566 | 28 | |||
567 | 29 | class GucharmapWindowTests(AutopilotTestCase): | ||
568 | 30 | """ Window tests for the xfce4-screenshooter """ | ||
569 | 31 | |||
570 | 32 | def setUp(self): | ||
571 | 33 | """ Basic setup instruction to run before each test """ | ||
572 | 34 | super(GucharmapWindowTests, self).setUp() | ||
573 | 35 | self.manager = ProcessManager.create('BAMF') | ||
574 | 36 | self.app = self.manager.start_app("gucharmap") | ||
575 | 37 | # This will make sure Screenshooter window you launched is focused and ready | ||
576 | 38 | # to accept your keyboard input | ||
577 | 39 | self.assertTrue(self.app.is_active) | ||
578 | 40 | |||
579 | 41 | def test_window_visible(self): | ||
580 | 42 | """ Check to see if the main window has the proper title """ | ||
581 | 43 | windows = self.app.get_windows() | ||
582 | 44 | window = windows[0] | ||
583 | 45 | |||
584 | 46 | # We must assert the window title = Archive Manager | ||
585 | 47 | # It fails with assertTrue(self.app.is_focused) | ||
586 | 48 | self.assertThat(lambda: window.title, Eventually(Contains('Character Map'))) | ||
587 | 49 | |||
588 | 50 | for window in windows: | ||
589 | 51 | window.close() | ||
590 | 0 | 52 | ||
591 | === added directory 'xubuntu_autopilot_tests/mousepad' | |||
592 | === added file 'xubuntu_autopilot_tests/mousepad/__init__.py' | |||
593 | --- xubuntu_autopilot_tests/mousepad/__init__.py 1970-01-01 00:00:00 +0000 | |||
594 | +++ xubuntu_autopilot_tests/mousepad/__init__.py 2014-03-30 18:20:04 +0000 | |||
595 | @@ -0,0 +1,2 @@ | |||
596 | 1 | # -*- coding: utf-8 -*- | ||
597 | 2 | |||
598 | 0 | 3 | ||
599 | === added file 'xubuntu_autopilot_tests/mousepad/test_mousepad.py' | |||
600 | --- xubuntu_autopilot_tests/mousepad/test_mousepad.py 1970-01-01 00:00:00 +0000 | |||
601 | +++ xubuntu_autopilot_tests/mousepad/test_mousepad.py 2014-03-30 18:20:04 +0000 | |||
602 | @@ -0,0 +1,51 @@ | |||
603 | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | ||
604 | 2 | # | ||
605 | 3 | # Copyright (C) 2014 | ||
606 | 4 | # | ||
607 | 5 | # Author: Thomas Molloy beetyrootey@gmail.com | ||
608 | 6 | # | ||
609 | 7 | # This program is free software; you can redistribute it and/or modify | ||
610 | 8 | # it under the terms of the GNU Lesser General Public License as published by | ||
611 | 9 | # the Free Software Foundation; version 3. | ||
612 | 10 | # | ||
613 | 11 | # This program is distributed in the hope that it will be useful, | ||
614 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
615 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
616 | 14 | # GNU Lesser General Public License for more details. | ||
617 | 15 | # | ||
618 | 16 | # You should have received a copy of the GNU Lesser General Public License | ||
619 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
620 | 18 | from autopilot.matchers import Eventually | ||
621 | 19 | from testtools.matchers import Equals, Contains | ||
622 | 20 | from autopilot.testcase import AutopilotTestCase | ||
623 | 21 | from autopilot.process import ProcessManager | ||
624 | 22 | |||
625 | 23 | # register gnumeric app | ||
626 | 24 | ProcessManager.register_known_application( | ||
627 | 25 | "mousepad", | ||
628 | 26 | "mousepad.desktop", | ||
629 | 27 | "mousepad") | ||
630 | 28 | |||
631 | 29 | class MousepadWindowTests(AutopilotTestCase): | ||
632 | 30 | """ Window tests for the xfce4-screenshooter """ | ||
633 | 31 | |||
634 | 32 | def setUp(self): | ||
635 | 33 | """ Basic setup instruction to run before each test """ | ||
636 | 34 | super(MousepadWindowTests, self).setUp() | ||
637 | 35 | self.manager = ProcessManager.create('BAMF') | ||
638 | 36 | self.app = self.manager.start_app("mousepad") | ||
639 | 37 | # This will make sure Screenshooter window you launched is focused and ready | ||
640 | 38 | # to accept your keyboard input | ||
641 | 39 | self.assertTrue(self.app.is_active) | ||
642 | 40 | |||
643 | 41 | def test_window_visible(self): | ||
644 | 42 | """ Check to see if the main window has the proper title """ | ||
645 | 43 | windows = self.app.get_windows() | ||
646 | 44 | window = windows[0] | ||
647 | 45 | |||
648 | 46 | # We must assert the window title = Archive Manager | ||
649 | 47 | # It fails with assertTrue(self.app.is_focused) | ||
650 | 48 | self.assertThat(lambda: window.title, Eventually(Contains('Mousepad'))) | ||
651 | 49 | |||
652 | 50 | for window in windows: | ||
653 | 51 | window.close() | ||
654 | 0 | 52 | ||
655 | === added directory 'xubuntu_autopilot_tests/onboard' | |||
656 | === added file 'xubuntu_autopilot_tests/onboard/__init__.py' | |||
657 | --- xubuntu_autopilot_tests/onboard/__init__.py 1970-01-01 00:00:00 +0000 | |||
658 | +++ xubuntu_autopilot_tests/onboard/__init__.py 2014-03-30 18:20:04 +0000 | |||
659 | @@ -0,0 +1,2 @@ | |||
660 | 1 | # -*- coding: utf-8 -*- | ||
661 | 2 | |||
662 | 0 | 3 | ||
663 | === added file 'xubuntu_autopilot_tests/onboard/test_onboard.py' | |||
664 | --- xubuntu_autopilot_tests/onboard/test_onboard.py 1970-01-01 00:00:00 +0000 | |||
665 | +++ xubuntu_autopilot_tests/onboard/test_onboard.py 2014-03-30 18:20:04 +0000 | |||
666 | @@ -0,0 +1,51 @@ | |||
667 | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | ||
668 | 2 | # | ||
669 | 3 | # Copyright (C) 2014 | ||
670 | 4 | # | ||
671 | 5 | # Author: Thomas Molloy beetyrootey@gmail.com | ||
672 | 6 | # | ||
673 | 7 | # This program is free software; you can redistribute it and/or modify | ||
674 | 8 | # it under the terms of the GNU Lesser General Public License as published by | ||
675 | 9 | # the Free Software Foundation; version 3. | ||
676 | 10 | # | ||
677 | 11 | # This program is distributed in the hope that it will be useful, | ||
678 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
679 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
680 | 14 | # GNU Lesser General Public License for more details. | ||
681 | 15 | # | ||
682 | 16 | # You should have received a copy of the GNU Lesser General Public License | ||
683 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
684 | 18 | from autopilot.matchers import Eventually | ||
685 | 19 | from testtools.matchers import Equals, Contains | ||
686 | 20 | from autopilot.testcase import AutopilotTestCase | ||
687 | 21 | from autopilot.process import ProcessManager | ||
688 | 22 | |||
689 | 23 | # register gnumeric app | ||
690 | 24 | ProcessManager.register_known_application( | ||
691 | 25 | "onboard", | ||
692 | 26 | "onboard.desktop", | ||
693 | 27 | "onboard") | ||
694 | 28 | |||
695 | 29 | class OnboardWindowTests(AutopilotTestCase): | ||
696 | 30 | """ Window tests for the xfce4-screenshooter """ | ||
697 | 31 | |||
698 | 32 | def setUp(self): | ||
699 | 33 | """ Basic setup instruction to run before each test """ | ||
700 | 34 | super(OnboardWindowTests, self).setUp() | ||
701 | 35 | self.manager = ProcessManager.create('BAMF') | ||
702 | 36 | self.app = self.manager.start_app("onboard") | ||
703 | 37 | # This will make sure Screenshooter window you launched is focused and ready | ||
704 | 38 | # to accept your keyboard input | ||
705 | 39 | self.assertTrue(self.app.is_active) | ||
706 | 40 | |||
707 | 41 | def test_window_visible(self): | ||
708 | 42 | """ Check to see if the main window has the proper title """ | ||
709 | 43 | windows = self.app.get_windows() | ||
710 | 44 | window = windows[0] | ||
711 | 45 | |||
712 | 46 | # We must assert the window title = Archive Manager | ||
713 | 47 | # It fails with assertTrue(self.app.is_focused) | ||
714 | 48 | self.assertThat(lambda: window.title, Eventually(Contains('Onboard'))) | ||
715 | 49 | |||
716 | 50 | for window in windows: | ||
717 | 51 | window.close() | ||
718 | 0 | 52 | ||
719 | === added directory 'xubuntu_autopilot_tests/orage-calendar' | |||
720 | === added file 'xubuntu_autopilot_tests/orage-calendar/__init__.py' | |||
721 | --- xubuntu_autopilot_tests/orage-calendar/__init__.py 1970-01-01 00:00:00 +0000 | |||
722 | +++ xubuntu_autopilot_tests/orage-calendar/__init__.py 2014-03-30 18:20:04 +0000 | |||
723 | @@ -0,0 +1,2 @@ | |||
724 | 1 | # -*- coding: utf-8 -*- | ||
725 | 2 | |||
726 | 0 | 3 | ||
727 | === added file 'xubuntu_autopilot_tests/orage-calendar/test_orage_calendar.py' | |||
728 | --- xubuntu_autopilot_tests/orage-calendar/test_orage_calendar.py 1970-01-01 00:00:00 +0000 | |||
729 | +++ xubuntu_autopilot_tests/orage-calendar/test_orage_calendar.py 2014-03-30 18:20:04 +0000 | |||
730 | @@ -0,0 +1,51 @@ | |||
731 | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | ||
732 | 2 | # | ||
733 | 3 | # Copyright (C) 2014 | ||
734 | 4 | # | ||
735 | 5 | # Author: Thomas Molloy beetyrootey@gmail.com | ||
736 | 6 | # | ||
737 | 7 | # This program is free software; you can redistribute it and/or modify | ||
738 | 8 | # it under the terms of the GNU Lesser General Public License as published by | ||
739 | 9 | # the Free Software Foundation; version 3. | ||
740 | 10 | # | ||
741 | 11 | # This program is distributed in the hope that it will be useful, | ||
742 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
743 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
744 | 14 | # GNU Lesser General Public License for more details. | ||
745 | 15 | # | ||
746 | 16 | # You should have received a copy of the GNU Lesser General Public License | ||
747 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
748 | 18 | from autopilot.matchers import Eventually | ||
749 | 19 | from testtools.matchers import Equals, Contains | ||
750 | 20 | from autopilot.testcase import AutopilotTestCase | ||
751 | 21 | from autopilot.process import ProcessManager | ||
752 | 22 | |||
753 | 23 | # register gnumeric app | ||
754 | 24 | ProcessManager.register_known_application( | ||
755 | 25 | "orage", | ||
756 | 26 | "orage.desktop", | ||
757 | 27 | "orage") | ||
758 | 28 | |||
759 | 29 | class OrageCalendarWindowTests(AutopilotTestCase): | ||
760 | 30 | """ Window tests for the xfce4-screenshooter """ | ||
761 | 31 | |||
762 | 32 | def setUp(self): | ||
763 | 33 | """ Basic setup instruction to run before each test """ | ||
764 | 34 | super(OrageCalendarWindowTests, self).setUp() | ||
765 | 35 | self.manager = ProcessManager.create('BAMF') | ||
766 | 36 | self.app = self.manager.start_app("orage") | ||
767 | 37 | # This will make sure Screenshooter window you launched is focused and ready | ||
768 | 38 | # to accept your keyboard input | ||
769 | 39 | self.assertTrue(self.app.is_active) | ||
770 | 40 | |||
771 | 41 | def test_window_visible(self): | ||
772 | 42 | """ Check to see if the main window has the proper title """ | ||
773 | 43 | windows = self.app.get_windows() | ||
774 | 44 | window = windows[0] | ||
775 | 45 | |||
776 | 46 | # We must assert the window title = Archive Manager | ||
777 | 47 | # It fails with assertTrue(self.app.is_focused) | ||
778 | 48 | self.assertThat(lambda: window.title, Eventually(Contains('Orage'))) | ||
779 | 49 | |||
780 | 50 | for window in windows: | ||
781 | 51 | window.close() | ||
782 | 0 | 52 | ||
783 | === added directory 'xubuntu_autopilot_tests/orage-globaltime' | |||
784 | === added file 'xubuntu_autopilot_tests/orage-globaltime/__init__.py' | |||
785 | --- xubuntu_autopilot_tests/orage-globaltime/__init__.py 1970-01-01 00:00:00 +0000 | |||
786 | +++ xubuntu_autopilot_tests/orage-globaltime/__init__.py 2014-03-30 18:20:04 +0000 | |||
787 | @@ -0,0 +1,2 @@ | |||
788 | 1 | # -*- coding: utf-8 -*- | ||
789 | 2 | |||
790 | 0 | 3 | ||
791 | === added file 'xubuntu_autopilot_tests/orage-globaltime/test_orage_globaltime.py' | |||
792 | --- xubuntu_autopilot_tests/orage-globaltime/test_orage_globaltime.py 1970-01-01 00:00:00 +0000 | |||
793 | +++ xubuntu_autopilot_tests/orage-globaltime/test_orage_globaltime.py 2014-03-30 18:20:04 +0000 | |||
794 | @@ -0,0 +1,51 @@ | |||
795 | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | ||
796 | 2 | # | ||
797 | 3 | # Copyright (C) 2014 | ||
798 | 4 | # | ||
799 | 5 | # Author: Thomas Molloy beetyrootey@gmail.com | ||
800 | 6 | # | ||
801 | 7 | # This program is free software; you can redistribute it and/or modify | ||
802 | 8 | # it under the terms of the GNU Lesser General Public License as published by | ||
803 | 9 | # the Free Software Foundation; version 3. | ||
804 | 10 | # | ||
805 | 11 | # This program is distributed in the hope that it will be useful, | ||
806 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
807 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
808 | 14 | # GNU Lesser General Public License for more details. | ||
809 | 15 | # | ||
810 | 16 | # You should have received a copy of the GNU Lesser General Public License | ||
811 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
812 | 18 | from autopilot.matchers import Eventually | ||
813 | 19 | from testtools.matchers import Equals, Contains | ||
814 | 20 | from autopilot.testcase import AutopilotTestCase | ||
815 | 21 | from autopilot.process import ProcessManager | ||
816 | 22 | |||
817 | 23 | # register gnumeric app | ||
818 | 24 | ProcessManager.register_known_application( | ||
819 | 25 | "globaltime", | ||
820 | 26 | "globaltime.desktop", | ||
821 | 27 | "globaltime") | ||
822 | 28 | |||
823 | 29 | class OrageCalendarWindowTests(AutopilotTestCase): | ||
824 | 30 | """ Window tests for the xfce4-screenshooter """ | ||
825 | 31 | |||
826 | 32 | def setUp(self): | ||
827 | 33 | """ Basic setup instruction to run before each test """ | ||
828 | 34 | super(OrageCalendarWindowTests, self).setUp() | ||
829 | 35 | self.manager = ProcessManager.create('BAMF') | ||
830 | 36 | self.app = self.manager.start_app("globaltime") | ||
831 | 37 | # This will make sure Screenshooter window you launched is focused and ready | ||
832 | 38 | # to accept your keyboard input | ||
833 | 39 | self.assertTrue(self.app.is_active) | ||
834 | 40 | |||
835 | 41 | def test_window_visible(self): | ||
836 | 42 | """ Check to see if the main window has the proper title """ | ||
837 | 43 | windows = self.app.get_windows() | ||
838 | 44 | window = windows[0] | ||
839 | 45 | |||
840 | 46 | # We must assert the window title = Archive Manager | ||
841 | 47 | # It fails with assertTrue(self.app.is_focused) | ||
842 | 48 | self.assertThat(lambda: window.title, Eventually(Contains('Global Time'))) | ||
843 | 49 | |||
844 | 50 | for window in windows: | ||
845 | 51 | window.close() | ||
846 | 0 | 52 | ||
847 | === added directory 'xubuntu_autopilot_tests/pavucontrol' | |||
848 | === added file 'xubuntu_autopilot_tests/pavucontrol/__init__.py' | |||
849 | --- xubuntu_autopilot_tests/pavucontrol/__init__.py 1970-01-01 00:00:00 +0000 | |||
850 | +++ xubuntu_autopilot_tests/pavucontrol/__init__.py 2014-03-30 18:20:04 +0000 | |||
851 | @@ -0,0 +1,2 @@ | |||
852 | 1 | # -*- coding: utf-8 -*- | ||
853 | 2 | |||
854 | 0 | 3 | ||
855 | === added file 'xubuntu_autopilot_tests/pavucontrol/test_pavucontrol.py' | |||
856 | --- xubuntu_autopilot_tests/pavucontrol/test_pavucontrol.py 1970-01-01 00:00:00 +0000 | |||
857 | +++ xubuntu_autopilot_tests/pavucontrol/test_pavucontrol.py 2014-03-30 18:20:04 +0000 | |||
858 | @@ -0,0 +1,51 @@ | |||
859 | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | ||
860 | 2 | # | ||
861 | 3 | # Copyright (C) 2014 | ||
862 | 4 | # | ||
863 | 5 | # Author: Thomas Molloy beetyrootey@gmail.com | ||
864 | 6 | # | ||
865 | 7 | # This program is free software; you can redistribute it and/or modify | ||
866 | 8 | # it under the terms of the GNU Lesser General Public License as published by | ||
867 | 9 | # the Free Software Foundation; version 3. | ||
868 | 10 | # | ||
869 | 11 | # This program is distributed in the hope that it will be useful, | ||
870 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
871 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
872 | 14 | # GNU Lesser General Public License for more details. | ||
873 | 15 | # | ||
874 | 16 | # You should have received a copy of the GNU Lesser General Public License | ||
875 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
876 | 18 | from autopilot.matchers import Eventually | ||
877 | 19 | from testtools.matchers import Equals, Contains | ||
878 | 20 | from autopilot.testcase import AutopilotTestCase | ||
879 | 21 | from autopilot.process import ProcessManager | ||
880 | 22 | |||
881 | 23 | # register gnumeric app | ||
882 | 24 | ProcessManager.register_known_application( | ||
883 | 25 | "pavucontrol", | ||
884 | 26 | "pavucontrol.desktop", | ||
885 | 27 | "pavucontrol") | ||
886 | 28 | |||
887 | 29 | class PavucontrolWindowTests(AutopilotTestCase): | ||
888 | 30 | """ Window tests for the xfce4-screenshooter """ | ||
889 | 31 | |||
890 | 32 | def setUp(self): | ||
891 | 33 | """ Basic setup instruction to run before each test """ | ||
892 | 34 | super(PavucontrolWindowTests, self).setUp() | ||
893 | 35 | self.manager = ProcessManager.create('BAMF') | ||
894 | 36 | self.app = self.manager.start_app("pavucontrol") | ||
895 | 37 | # This will make sure Screenshooter window you launched is focused and ready | ||
896 | 38 | # to accept your keyboard input | ||
897 | 39 | self.assertTrue(self.app.is_active) | ||
898 | 40 | |||
899 | 41 | def test_window_visible(self): | ||
900 | 42 | """ Check to see if the main window has the proper title """ | ||
901 | 43 | windows = self.app.get_windows() | ||
902 | 44 | window = windows[0] | ||
903 | 45 | |||
904 | 46 | # We must assert the window title = Archive Manager | ||
905 | 47 | # It fails with assertTrue(self.app.is_focused) | ||
906 | 48 | self.assertThat(lambda: window.title, Eventually(Contains('Volume Control'))) | ||
907 | 49 | |||
908 | 50 | for window in windows: | ||
909 | 51 | window.close() | ||
910 | 0 | 52 | ||
911 | === added directory 'xubuntu_autopilot_tests/pidgin' | |||
912 | === added file 'xubuntu_autopilot_tests/pidgin/__init__.py' | |||
913 | --- xubuntu_autopilot_tests/pidgin/__init__.py 1970-01-01 00:00:00 +0000 | |||
914 | +++ xubuntu_autopilot_tests/pidgin/__init__.py 2014-03-30 18:20:04 +0000 | |||
915 | @@ -0,0 +1,2 @@ | |||
916 | 1 | # -*- coding: utf-8 -*- | ||
917 | 2 | |||
918 | 0 | 3 | ||
919 | === added file 'xubuntu_autopilot_tests/pidgin/test_pidgin.py' | |||
920 | --- xubuntu_autopilot_tests/pidgin/test_pidgin.py 1970-01-01 00:00:00 +0000 | |||
921 | +++ xubuntu_autopilot_tests/pidgin/test_pidgin.py 2014-03-30 18:20:04 +0000 | |||
922 | @@ -0,0 +1,51 @@ | |||
923 | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | ||
924 | 2 | # | ||
925 | 3 | # Copyright (C) 2014 | ||
926 | 4 | # | ||
927 | 5 | # Author: Thomas Molloy beetyrootey@gmail.com | ||
928 | 6 | # | ||
929 | 7 | # This program is free software; you can redistribute it and/or modify | ||
930 | 8 | # it under the terms of the GNU Lesser General Public License as published by | ||
931 | 9 | # the Free Software Foundation; version 3. | ||
932 | 10 | # | ||
933 | 11 | # This program is distributed in the hope that it will be useful, | ||
934 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
935 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
936 | 14 | # GNU Lesser General Public License for more details. | ||
937 | 15 | # | ||
938 | 16 | # You should have received a copy of the GNU Lesser General Public License | ||
939 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
940 | 18 | from autopilot.matchers import Eventually | ||
941 | 19 | from testtools.matchers import Equals, Contains | ||
942 | 20 | from autopilot.testcase import AutopilotTestCase | ||
943 | 21 | from autopilot.process import ProcessManager | ||
944 | 22 | |||
945 | 23 | # register gnumeric app | ||
946 | 24 | ProcessManager.register_known_application( | ||
947 | 25 | "pidgin", | ||
948 | 26 | "pidgin.desktop", | ||
949 | 27 | "pidgin") | ||
950 | 28 | |||
951 | 29 | class PidginWindowTests(AutopilotTestCase): | ||
952 | 30 | """ Window tests for the xfce4-screenshooter """ | ||
953 | 31 | |||
954 | 32 | def setUp(self): | ||
955 | 33 | """ Basic setup instruction to run before each test """ | ||
956 | 34 | super(PidginWindowTests, self).setUp() | ||
957 | 35 | self.manager = ProcessManager.create('BAMF') | ||
958 | 36 | self.app = self.manager.start_app("pidgin") | ||
959 | 37 | # This will make sure Screenshooter window you launched is focused and ready | ||
960 | 38 | # to accept your keyboard input | ||
961 | 39 | self.assertTrue(self.app.is_active) | ||
962 | 40 | |||
963 | 41 | def test_window_visible(self): | ||
964 | 42 | """ Check to see if the main window has the proper title """ | ||
965 | 43 | windows = self.app.get_windows() | ||
966 | 44 | window = windows[0] | ||
967 | 45 | |||
968 | 46 | # We must assert the window title = Archive Manager | ||
969 | 47 | # It fails with assertTrue(self.app.is_focused) | ||
970 | 48 | self.assertThat(lambda: window.title, Eventually(Contains('Accounts'))) | ||
971 | 49 | |||
972 | 50 | for window in windows: | ||
973 | 51 | window.close() | ||
974 | 0 | 52 | ||
975 | === added directory 'xubuntu_autopilot_tests/ristretto' | |||
976 | === added file 'xubuntu_autopilot_tests/ristretto/__init__.py' | |||
977 | --- xubuntu_autopilot_tests/ristretto/__init__.py 1970-01-01 00:00:00 +0000 | |||
978 | +++ xubuntu_autopilot_tests/ristretto/__init__.py 2014-03-30 18:20:04 +0000 | |||
979 | @@ -0,0 +1,2 @@ | |||
980 | 1 | # -*- coding: utf-8 -*- | ||
981 | 2 | |||
982 | 0 | 3 | ||
983 | === added file 'xubuntu_autopilot_tests/ristretto/test_ristretto.py' | |||
984 | --- xubuntu_autopilot_tests/ristretto/test_ristretto.py 1970-01-01 00:00:00 +0000 | |||
985 | +++ xubuntu_autopilot_tests/ristretto/test_ristretto.py 2014-03-30 18:20:04 +0000 | |||
986 | @@ -0,0 +1,51 @@ | |||
987 | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | ||
988 | 2 | # | ||
989 | 3 | # Copyright (C) 2014 | ||
990 | 4 | # | ||
991 | 5 | # Author: Thomas Molloy beetyrootey@gmail.com | ||
992 | 6 | # | ||
993 | 7 | # This program is free software; you can redistribute it and/or modify | ||
994 | 8 | # it under the terms of the GNU Lesser General Public License as published by | ||
995 | 9 | # the Free Software Foundation; version 3. | ||
996 | 10 | # | ||
997 | 11 | # This program is distributed in the hope that it will be useful, | ||
998 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
999 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1000 | 14 | # GNU Lesser General Public License for more details. | ||
1001 | 15 | # | ||
1002 | 16 | # You should have received a copy of the GNU Lesser General Public License | ||
1003 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1004 | 18 | from autopilot.matchers import Eventually | ||
1005 | 19 | from testtools.matchers import Equals, Contains | ||
1006 | 20 | from autopilot.testcase import AutopilotTestCase | ||
1007 | 21 | from autopilot.process import ProcessManager | ||
1008 | 22 | |||
1009 | 23 | # register gThumb app | ||
1010 | 24 | ProcessManager.register_known_application( | ||
1011 | 25 | "ristretto", | ||
1012 | 26 | "ristretto.desktop", | ||
1013 | 27 | "ristretto") | ||
1014 | 28 | |||
1015 | 29 | class RistrettoWindowTests(AutopilotTestCase): | ||
1016 | 30 | """ Window tests for the gthumb """ | ||
1017 | 31 | |||
1018 | 32 | def setUp(self): | ||
1019 | 33 | """ Basic setup instruction to run before each test """ | ||
1020 | 34 | super(RistrettoWindowTests, self).setUp() | ||
1021 | 35 | self.manager = ProcessManager.create('BAMF') | ||
1022 | 36 | self.app = self.manager.start_app("ristretto") | ||
1023 | 37 | # This will make sure Mines window you launched is focused and ready | ||
1024 | 38 | # to accept your keyboard input | ||
1025 | 39 | self.assertTrue(self.app.is_active) | ||
1026 | 40 | |||
1027 | 41 | def test_window_visible(self): | ||
1028 | 42 | """ Check to see if the main window has the proper title """ | ||
1029 | 43 | windows = self.app.get_windows() | ||
1030 | 44 | window = windows[0] | ||
1031 | 45 | |||
1032 | 46 | # We must assert the window title = ristretto here to keep focus of ristretto | ||
1033 | 47 | # It fails with assertTrue(self.app.is_focused) | ||
1034 | 48 | self.assertThat(lambda: window.title, Eventually(Contains('Image Viewer'))) | ||
1035 | 49 | |||
1036 | 50 | for window in windows: | ||
1037 | 51 | window.close() | ||
1038 | 0 | 52 | ||
1039 | === added directory 'xubuntu_autopilot_tests/simple-scan' | |||
1040 | === added file 'xubuntu_autopilot_tests/simple-scan/__init__.py' | |||
1041 | --- xubuntu_autopilot_tests/simple-scan/__init__.py 1970-01-01 00:00:00 +0000 | |||
1042 | +++ xubuntu_autopilot_tests/simple-scan/__init__.py 2014-03-30 18:20:04 +0000 | |||
1043 | @@ -0,0 +1,2 @@ | |||
1044 | 1 | # -*- coding: utf-8 -*- | ||
1045 | 2 | |||
1046 | 0 | 3 | ||
1047 | === added file 'xubuntu_autopilot_tests/simple-scan/test_simple_scan.py' | |||
1048 | --- xubuntu_autopilot_tests/simple-scan/test_simple_scan.py 1970-01-01 00:00:00 +0000 | |||
1049 | +++ xubuntu_autopilot_tests/simple-scan/test_simple_scan.py 2014-03-30 18:20:04 +0000 | |||
1050 | @@ -0,0 +1,50 @@ | |||
1051 | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | ||
1052 | 2 | # | ||
1053 | 3 | # Copyright (C) 2014 | ||
1054 | 4 | # | ||
1055 | 5 | # Author: Thomas Molloy beetyrootey@gmail.com | ||
1056 | 6 | # | ||
1057 | 7 | # This program is free software; you can redistribute it and/or modify | ||
1058 | 8 | # it under the terms of the GNU Lesser General Public License as published by | ||
1059 | 9 | # the Free Software Foundation; version 3. | ||
1060 | 10 | # | ||
1061 | 11 | # This program is distributed in the hope that it will be useful, | ||
1062 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1063 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1064 | 14 | # GNU Lesser General Public License for more details. | ||
1065 | 15 | # | ||
1066 | 16 | # You should have received a copy of the GNU Lesser General Public License | ||
1067 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1068 | 18 | from autopilot.matchers import Eventually | ||
1069 | 19 | from testtools.matchers import Equals, Contains | ||
1070 | 20 | from autopilot.testcase import AutopilotTestCase | ||
1071 | 21 | from autopilot.process import ProcessManager | ||
1072 | 22 | |||
1073 | 23 | # register Simple-scan app | ||
1074 | 24 | ProcessManager.register_known_application( | ||
1075 | 25 | "simple-scan", | ||
1076 | 26 | "simple-scan.desktop", | ||
1077 | 27 | "Simple-scan") | ||
1078 | 28 | |||
1079 | 29 | class SimpleScanWindowTests(AutopilotTestCase): | ||
1080 | 30 | """ Window tests for the game Simple scan """ | ||
1081 | 31 | |||
1082 | 32 | def setUp(self): | ||
1083 | 33 | """ Basic setup instruction to run before each test """ | ||
1084 | 34 | super(SimpleScanWindowTests, self).setUp() | ||
1085 | 35 | self.manager = ProcessManager.create('BAMF') | ||
1086 | 36 | self.app = self.manager.start_app("simple-scan") | ||
1087 | 37 | # This will make sure Sudoku window you launched is focused and ready | ||
1088 | 38 | # to accept your keyboard input | ||
1089 | 39 | self.assertTrue(self.app.is_active) | ||
1090 | 40 | |||
1091 | 41 | def test_window_visible(self): | ||
1092 | 42 | """ Basic test to see if the window opens with the correct name """ | ||
1093 | 43 | # We must assert the window title = Simple Scan here to keep focus of SimpleScan | ||
1094 | 44 | # It fails with assertTrue(self.app.is_focused) | ||
1095 | 45 | windows = self.app.get_windows() | ||
1096 | 46 | self.assertTrue(len(windows) == 1) | ||
1097 | 47 | mainWindow = windows[0] | ||
1098 | 48 | self.assertThat(lambda: mainWindow.title, Eventually(Contains('Simple Scan'))) | ||
1099 | 49 | # We must close the window else the test fails as it is unable to close it automatically | ||
1100 | 50 | mainWindow.close() | ||
1101 | 0 | \ No newline at end of file | 51 | \ No newline at end of file |
1102 | 1 | 52 | ||
1103 | === added directory 'xubuntu_autopilot_tests/sudoku' | |||
1104 | === added file 'xubuntu_autopilot_tests/sudoku/__init__.py' | |||
1105 | --- xubuntu_autopilot_tests/sudoku/__init__.py 1970-01-01 00:00:00 +0000 | |||
1106 | +++ xubuntu_autopilot_tests/sudoku/__init__.py 2014-03-30 18:20:04 +0000 | |||
1107 | @@ -0,0 +1,2 @@ | |||
1108 | 1 | # -*- coding: utf-8 -*- | ||
1109 | 2 | |||
1110 | 0 | 3 | ||
1111 | === added file 'xubuntu_autopilot_tests/sudoku/test_sudoku.py' | |||
1112 | --- xubuntu_autopilot_tests/sudoku/test_sudoku.py 1970-01-01 00:00:00 +0000 | |||
1113 | +++ xubuntu_autopilot_tests/sudoku/test_sudoku.py 2014-03-30 18:20:04 +0000 | |||
1114 | @@ -0,0 +1,49 @@ | |||
1115 | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | ||
1116 | 2 | # | ||
1117 | 3 | # Copyright (C) 2014 | ||
1118 | 4 | # | ||
1119 | 5 | # Author: Thomas Molloy beetyrootey@gmail.com | ||
1120 | 6 | # | ||
1121 | 7 | # This program is free software; you can redistribute it and/or modify | ||
1122 | 8 | # it under the terms of the GNU Lesser General Public License as published by | ||
1123 | 9 | # the Free Software Foundation; version 3. | ||
1124 | 10 | # | ||
1125 | 11 | # This program is distributed in the hope that it will be useful, | ||
1126 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1127 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1128 | 14 | # GNU Lesser General Public License for more details. | ||
1129 | 15 | # | ||
1130 | 16 | # You should have received a copy of the GNU Lesser General Public License | ||
1131 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1132 | 18 | from autopilot.matchers import Eventually | ||
1133 | 19 | from testtools.matchers import Equals, Contains | ||
1134 | 20 | from autopilot.testcase import AutopilotTestCase | ||
1135 | 21 | from autopilot.process import ProcessManager | ||
1136 | 22 | |||
1137 | 23 | # register sudoku app | ||
1138 | 24 | ProcessManager.register_known_application( | ||
1139 | 25 | "gnome-sudoku", | ||
1140 | 26 | "gnome-sudoku.desktop", | ||
1141 | 27 | "gnome-sudoku") | ||
1142 | 28 | |||
1143 | 29 | class SudokuWindowTests(AutopilotTestCase): | ||
1144 | 30 | """ Window tests for the game Sudoku """ | ||
1145 | 31 | |||
1146 | 32 | def setUp(self): | ||
1147 | 33 | """ Basic setup instruction to run before each test """ | ||
1148 | 34 | super(SudokuWindowTests, self).setUp() | ||
1149 | 35 | self.manager = ProcessManager.create('BAMF') | ||
1150 | 36 | self.app = self.manager.start_app("gnome-sudoku") | ||
1151 | 37 | # This will make sure Sudoku window you launched is focused and ready | ||
1152 | 38 | # to accept your keyboard input | ||
1153 | 39 | self.assertTrue(self.app.is_active) | ||
1154 | 40 | |||
1155 | 41 | def test_window_visible(self): | ||
1156 | 42 | # We must assert the window title = Sudoku here to keep focus of Sudoku | ||
1157 | 43 | # It fails with assertTrue(self.app.is_focused) | ||
1158 | 44 | windows = self.app.get_windows() | ||
1159 | 45 | self.assertTrue(len(windows) == 1) | ||
1160 | 46 | mainWindow = windows[0] | ||
1161 | 47 | self.assertThat(lambda: mainWindow.title, Eventually(Contains('Sudoku'))) | ||
1162 | 48 | # We must close the window else the test fails as it is unable to close it automatically | ||
1163 | 49 | mainWindow.close() | ||
1164 | 0 | 50 | ||
1165 | === added directory 'xubuntu_autopilot_tests/thunderbird' | |||
1166 | === added file 'xubuntu_autopilot_tests/thunderbird/__init__.py' | |||
1167 | --- xubuntu_autopilot_tests/thunderbird/__init__.py 1970-01-01 00:00:00 +0000 | |||
1168 | +++ xubuntu_autopilot_tests/thunderbird/__init__.py 2014-03-30 18:20:04 +0000 | |||
1169 | @@ -0,0 +1,2 @@ | |||
1170 | 1 | # -*- coding: utf-8 -*- | ||
1171 | 2 | |||
1172 | 0 | 3 | ||
1173 | === added file 'xubuntu_autopilot_tests/thunderbird/test_thunderbird.py' | |||
1174 | --- xubuntu_autopilot_tests/thunderbird/test_thunderbird.py 1970-01-01 00:00:00 +0000 | |||
1175 | +++ xubuntu_autopilot_tests/thunderbird/test_thunderbird.py 2014-03-30 18:20:04 +0000 | |||
1176 | @@ -0,0 +1,49 @@ | |||
1177 | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | ||
1178 | 2 | # | ||
1179 | 3 | # Copyright (C) 2014 | ||
1180 | 4 | # | ||
1181 | 5 | # Author: Thomas Molloy beetyrootey@gmail.com | ||
1182 | 6 | # | ||
1183 | 7 | # This program is free software; you can redistribute it and/or modify | ||
1184 | 8 | # it under the terms of the GNU Lesser General Public License as published by | ||
1185 | 9 | # the Free Software Foundation; version 3. | ||
1186 | 10 | # | ||
1187 | 11 | # This program is distributed in the hope that it will be useful, | ||
1188 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1189 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1190 | 14 | # GNU Lesser General Public License for more details. | ||
1191 | 15 | # | ||
1192 | 16 | # You should have received a copy of the GNU Lesser General Public License | ||
1193 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1194 | 18 | from autopilot.matchers import Eventually | ||
1195 | 19 | from testtools.matchers import Equals, Contains | ||
1196 | 20 | from autopilot.testcase import AutopilotTestCase | ||
1197 | 21 | from autopilot.process import ProcessManager | ||
1198 | 22 | |||
1199 | 23 | # register sudoku app | ||
1200 | 24 | ProcessManager.register_known_application( | ||
1201 | 25 | "thunderbird", | ||
1202 | 26 | "thunderbird.desktop", | ||
1203 | 27 | "thunderbird") | ||
1204 | 28 | |||
1205 | 29 | class ThunderbirdWindowTests(AutopilotTestCase): | ||
1206 | 30 | """ Window tests for the game Sudoku """ | ||
1207 | 31 | |||
1208 | 32 | def setUp(self): | ||
1209 | 33 | """ Basic setup instruction to run before each test """ | ||
1210 | 34 | super(ThunderbirdWindowTests, self).setUp() | ||
1211 | 35 | self.manager = ProcessManager.create('BAMF') | ||
1212 | 36 | self.app = self.manager.start_app("thunderbird") | ||
1213 | 37 | # This will make sure Sudoku window you launched is focused and ready | ||
1214 | 38 | # to accept your keyboard input | ||
1215 | 39 | self.assertTrue(self.app.is_active) | ||
1216 | 40 | |||
1217 | 41 | def test_window_visible(self): | ||
1218 | 42 | # We must assert the window title = Sudoku here to keep focus of Sudoku | ||
1219 | 43 | # It fails with assertTrue(self.app.is_focused) | ||
1220 | 44 | windows = self.app.get_windows() | ||
1221 | 45 | self.assertTrue(len(windows) == 1) | ||
1222 | 46 | mainWindow = windows[0] | ||
1223 | 47 | self.assertThat(lambda: mainWindow.title, Eventually(Contains('Thunderbird'))) | ||
1224 | 48 | # We must close the window else the test fails as it is unable to close it automatically | ||
1225 | 49 | mainWindow.close() | ||
1226 | 0 | 50 | ||
1227 | === added directory 'xubuntu_autopilot_tests/transmission-gtk' | |||
1228 | === added file 'xubuntu_autopilot_tests/transmission-gtk/__init__.py' | |||
1229 | --- xubuntu_autopilot_tests/transmission-gtk/__init__.py 1970-01-01 00:00:00 +0000 | |||
1230 | +++ xubuntu_autopilot_tests/transmission-gtk/__init__.py 2014-03-30 18:20:04 +0000 | |||
1231 | @@ -0,0 +1,2 @@ | |||
1232 | 1 | # -*- coding: utf-8 -*- | ||
1233 | 2 | |||
1234 | 0 | 3 | ||
1235 | === added file 'xubuntu_autopilot_tests/transmission-gtk/test_transmission_gtk.py' | |||
1236 | --- xubuntu_autopilot_tests/transmission-gtk/test_transmission_gtk.py 1970-01-01 00:00:00 +0000 | |||
1237 | +++ xubuntu_autopilot_tests/transmission-gtk/test_transmission_gtk.py 2014-03-30 18:20:04 +0000 | |||
1238 | @@ -0,0 +1,49 @@ | |||
1239 | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | ||
1240 | 2 | # | ||
1241 | 3 | # Copyright (C) 2014 | ||
1242 | 4 | # | ||
1243 | 5 | # Author: Thomas Molloy beetyrootey@gmail.com | ||
1244 | 6 | # | ||
1245 | 7 | # This program is free software; you can redistribute it and/or modify | ||
1246 | 8 | # it under the terms of the GNU Lesser General Public License as published by | ||
1247 | 9 | # the Free Software Foundation; version 3. | ||
1248 | 10 | # | ||
1249 | 11 | # This program is distributed in the hope that it will be useful, | ||
1250 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1251 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1252 | 14 | # GNU Lesser General Public License for more details. | ||
1253 | 15 | # | ||
1254 | 16 | # You should have received a copy of the GNU Lesser General Public License | ||
1255 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1256 | 18 | from autopilot.matchers import Eventually | ||
1257 | 19 | from testtools.matchers import Equals, Contains | ||
1258 | 20 | from autopilot.testcase import AutopilotTestCase | ||
1259 | 21 | from autopilot.process import ProcessManager | ||
1260 | 22 | |||
1261 | 23 | # register sudoku app | ||
1262 | 24 | ProcessManager.register_known_application( | ||
1263 | 25 | "transmission-gtk", | ||
1264 | 26 | "transmission-gtk.desktop", | ||
1265 | 27 | "transmission-gtk") | ||
1266 | 28 | |||
1267 | 29 | class TransmissionGTKwindowTests(AutopilotTestCase): | ||
1268 | 30 | """ Window tests for the game Sudoku """ | ||
1269 | 31 | |||
1270 | 32 | def setUp(self): | ||
1271 | 33 | """ Basic setup instruction to run before each test """ | ||
1272 | 34 | super(TransmissionGTKwindowTests, self).setUp() | ||
1273 | 35 | self.manager = ProcessManager.create('BAMF') | ||
1274 | 36 | self.app = self.manager.start_app("transmission-gtk") | ||
1275 | 37 | # This will make sure Sudoku window you launched is focused and ready | ||
1276 | 38 | # to accept your keyboard input | ||
1277 | 39 | self.assertTrue(self.app.is_active) | ||
1278 | 40 | |||
1279 | 41 | def test_window_visible(self): | ||
1280 | 42 | # We must assert the window title = Sudoku here to keep focus of Sudoku | ||
1281 | 43 | # It fails with assertTrue(self.app.is_focused) | ||
1282 | 44 | windows = self.app.get_windows() | ||
1283 | 45 | self.assertTrue(len(windows) == 1) | ||
1284 | 46 | mainWindow = windows[0] | ||
1285 | 47 | self.assertThat(lambda: mainWindow.title, Eventually(Contains('Transmission'))) | ||
1286 | 48 | # We must close the window else the test fails as it is unable to close it automatically | ||
1287 | 49 | mainWindow.close() | ||
1288 | 0 | 50 | ||
1289 | === added directory 'xubuntu_autopilot_tests/xfce4-appfinder' | |||
1290 | === added file 'xubuntu_autopilot_tests/xfce4-appfinder/__init__.py' | |||
1291 | --- xubuntu_autopilot_tests/xfce4-appfinder/__init__.py 1970-01-01 00:00:00 +0000 | |||
1292 | +++ xubuntu_autopilot_tests/xfce4-appfinder/__init__.py 2014-03-30 18:20:04 +0000 | |||
1293 | @@ -0,0 +1,2 @@ | |||
1294 | 1 | # -*- coding: utf-8 -*- | ||
1295 | 2 | |||
1296 | 0 | 3 | ||
1297 | === added file 'xubuntu_autopilot_tests/xfce4-appfinder/test_xfce4_appfinder.py' | |||
1298 | --- xubuntu_autopilot_tests/xfce4-appfinder/test_xfce4_appfinder.py 1970-01-01 00:00:00 +0000 | |||
1299 | +++ xubuntu_autopilot_tests/xfce4-appfinder/test_xfce4_appfinder.py 2014-03-30 18:20:04 +0000 | |||
1300 | @@ -0,0 +1,51 @@ | |||
1301 | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | ||
1302 | 2 | # | ||
1303 | 3 | # Copyright (C) 2014 | ||
1304 | 4 | # | ||
1305 | 5 | # Author: Thomas Molloy beetyrootey@gmail.com | ||
1306 | 6 | # | ||
1307 | 7 | # This program is free software; you can redistribute it and/or modify | ||
1308 | 8 | # it under the terms of the GNU Lesser General Public License as published by | ||
1309 | 9 | # the Free Software Foundation; version 3. | ||
1310 | 10 | # | ||
1311 | 11 | # This program is distributed in the hope that it will be useful, | ||
1312 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1313 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1314 | 14 | # GNU Lesser General Public License for more details. | ||
1315 | 15 | # | ||
1316 | 16 | # You should have received a copy of the GNU Lesser General Public License | ||
1317 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1318 | 18 | from autopilot.matchers import Eventually | ||
1319 | 19 | from testtools.matchers import Equals, Contains | ||
1320 | 20 | from autopilot.testcase import AutopilotTestCase | ||
1321 | 21 | from autopilot.process import ProcessManager | ||
1322 | 22 | |||
1323 | 23 | # register xfce4-appfinder app | ||
1324 | 24 | ProcessManager.register_known_application( | ||
1325 | 25 | "xfce4-appfinder", | ||
1326 | 26 | "xfce4-appfinder.desktop", | ||
1327 | 27 | "xfce4-appfinder") | ||
1328 | 28 | |||
1329 | 29 | class xfce4AppfinderWindowTests(AutopilotTestCase): | ||
1330 | 30 | """ Window tests for the xfce4-appfinder """ | ||
1331 | 31 | |||
1332 | 32 | def setUp(self): | ||
1333 | 33 | """ Basic setup instruction to run before each test """ | ||
1334 | 34 | super(xfce4AppfinderWindowTests, self).setUp() | ||
1335 | 35 | self.manager = ProcessManager.create('BAMF') | ||
1336 | 36 | self.app = self.manager.start_app("xfce4-appfinder") | ||
1337 | 37 | # This will make sure Mines window you launched is focused and ready | ||
1338 | 38 | # to accept your keyboard input | ||
1339 | 39 | self.assertTrue(self.app.is_active) | ||
1340 | 40 | |||
1341 | 41 | def test_window_visible(self): | ||
1342 | 42 | """ Check to see if the main window has the proper title """ | ||
1343 | 43 | windows = self.app.get_windows() | ||
1344 | 44 | window = windows[0] | ||
1345 | 45 | |||
1346 | 46 | # We must assert the window title = Application Finder | ||
1347 | 47 | # It fails with assertTrue(self.app.is_focused) | ||
1348 | 48 | self.assertThat(lambda: window.title, Eventually(Contains('Application Finder'))) | ||
1349 | 49 | |||
1350 | 50 | for window in windows: | ||
1351 | 51 | window.close() | ||
1352 | 0 | 52 | ||
1353 | === added directory 'xubuntu_autopilot_tests/xfce4-dict' | |||
1354 | === added file 'xubuntu_autopilot_tests/xfce4-dict/__init__.py' | |||
1355 | --- xubuntu_autopilot_tests/xfce4-dict/__init__.py 1970-01-01 00:00:00 +0000 | |||
1356 | +++ xubuntu_autopilot_tests/xfce4-dict/__init__.py 2014-03-30 18:20:04 +0000 | |||
1357 | @@ -0,0 +1,2 @@ | |||
1358 | 1 | # -*- coding: utf-8 -*- | ||
1359 | 2 | |||
1360 | 0 | 3 | ||
1361 | === added file 'xubuntu_autopilot_tests/xfce4-dict/test_xfce4_dict.py' | |||
1362 | --- xubuntu_autopilot_tests/xfce4-dict/test_xfce4_dict.py 1970-01-01 00:00:00 +0000 | |||
1363 | +++ xubuntu_autopilot_tests/xfce4-dict/test_xfce4_dict.py 2014-03-30 18:20:04 +0000 | |||
1364 | @@ -0,0 +1,51 @@ | |||
1365 | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | ||
1366 | 2 | # | ||
1367 | 3 | # Copyright (C) 2014 | ||
1368 | 4 | # | ||
1369 | 5 | # Author: Thomas Molloy beetyrootey@gmail.com | ||
1370 | 6 | # | ||
1371 | 7 | # This program is free software; you can redistribute it and/or modify | ||
1372 | 8 | # it under the terms of the GNU Lesser General Public License as published by | ||
1373 | 9 | # the Free Software Foundation; version 3. | ||
1374 | 10 | # | ||
1375 | 11 | # This program is distributed in the hope that it will be useful, | ||
1376 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1377 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1378 | 14 | # GNU Lesser General Public License for more details. | ||
1379 | 15 | # | ||
1380 | 16 | # You should have received a copy of the GNU Lesser General Public License | ||
1381 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1382 | 18 | from autopilot.matchers import Eventually | ||
1383 | 19 | from testtools.matchers import Equals, Contains | ||
1384 | 20 | from autopilot.testcase import AutopilotTestCase | ||
1385 | 21 | from autopilot.process import ProcessManager | ||
1386 | 22 | |||
1387 | 23 | # register xfce4-dict app | ||
1388 | 24 | ProcessManager.register_known_application( | ||
1389 | 25 | "xfce4-dict", | ||
1390 | 26 | "xfce4-dict.desktop", | ||
1391 | 27 | "xfce4-dict") | ||
1392 | 28 | |||
1393 | 29 | class xfce4DictWindowTests(AutopilotTestCase): | ||
1394 | 30 | """ Window tests for the dict """ | ||
1395 | 31 | |||
1396 | 32 | def setUp(self): | ||
1397 | 33 | """ Basic setup instruction to run before each test """ | ||
1398 | 34 | super(xfce4DictWindowTests, self).setUp() | ||
1399 | 35 | self.manager = ProcessManager.create('BAMF') | ||
1400 | 36 | self.app = self.manager.start_app("xfce4-dict") | ||
1401 | 37 | # This will make sure Mines window you launched is focused and ready | ||
1402 | 38 | # to accept your keyboard input | ||
1403 | 39 | self.assertTrue(self.app.is_active) | ||
1404 | 40 | |||
1405 | 41 | def test_window_visible(self): | ||
1406 | 42 | """ Check to see if the main window has the proper title """ | ||
1407 | 43 | windows = self.app.get_windows() | ||
1408 | 44 | window = windows[0] | ||
1409 | 45 | |||
1410 | 46 | # We must assert the window title = Dictionary | ||
1411 | 47 | # It fails with assertTrue(self.app.is_focused) | ||
1412 | 48 | self.assertThat(lambda: window.title, Eventually(Contains('Dictionary'))) | ||
1413 | 49 | |||
1414 | 50 | for window in windows: | ||
1415 | 51 | window.close() | ||
1416 | 0 | 52 | ||
1417 | === added directory 'xubuntu_autopilot_tests/xfce4-screenshooter' | |||
1418 | === added file 'xubuntu_autopilot_tests/xfce4-screenshooter/__init__.py' | |||
1419 | --- xubuntu_autopilot_tests/xfce4-screenshooter/__init__.py 1970-01-01 00:00:00 +0000 | |||
1420 | +++ xubuntu_autopilot_tests/xfce4-screenshooter/__init__.py 2014-03-30 18:20:04 +0000 | |||
1421 | @@ -0,0 +1,2 @@ | |||
1422 | 1 | # -*- coding: utf-8 -*- | ||
1423 | 2 | |||
1424 | 0 | 3 | ||
1425 | === added file 'xubuntu_autopilot_tests/xfce4-screenshooter/test_xfce4_screenshooter.py' | |||
1426 | --- xubuntu_autopilot_tests/xfce4-screenshooter/test_xfce4_screenshooter.py 1970-01-01 00:00:00 +0000 | |||
1427 | +++ xubuntu_autopilot_tests/xfce4-screenshooter/test_xfce4_screenshooter.py 2014-03-30 18:20:04 +0000 | |||
1428 | @@ -0,0 +1,51 @@ | |||
1429 | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | ||
1430 | 2 | # | ||
1431 | 3 | # Copyright (C) 2014 | ||
1432 | 4 | # | ||
1433 | 5 | # Author: Thomas Molloy beetyrootey@gmail.com | ||
1434 | 6 | # | ||
1435 | 7 | # This program is free software; you can redistribute it and/or modify | ||
1436 | 8 | # it under the terms of the GNU Lesser General Public License as published by | ||
1437 | 9 | # the Free Software Foundation; version 3. | ||
1438 | 10 | # | ||
1439 | 11 | # This program is distributed in the hope that it will be useful, | ||
1440 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1441 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1442 | 14 | # GNU Lesser General Public License for more details. | ||
1443 | 15 | # | ||
1444 | 16 | # You should have received a copy of the GNU Lesser General Public License | ||
1445 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1446 | 18 | from autopilot.matchers import Eventually | ||
1447 | 19 | from testtools.matchers import Equals, Contains | ||
1448 | 20 | from autopilot.testcase import AutopilotTestCase | ||
1449 | 21 | from autopilot.process import ProcessManager | ||
1450 | 22 | |||
1451 | 23 | # register xfce4-screenshooter app | ||
1452 | 24 | ProcessManager.register_known_application( | ||
1453 | 25 | "xfce4-screenshooter", | ||
1454 | 26 | "xfce4-screenshooter.desktop", | ||
1455 | 27 | "xfce4-screenshooter") | ||
1456 | 28 | |||
1457 | 29 | class xfce4ScreenshooterWindowTests(AutopilotTestCase): | ||
1458 | 30 | """ Window tests for the xfce4-screenshooter """ | ||
1459 | 31 | |||
1460 | 32 | def setUp(self): | ||
1461 | 33 | """ Basic setup instruction to run before each test """ | ||
1462 | 34 | super(xfce4ScreenshooterWindowTests, self).setUp() | ||
1463 | 35 | self.manager = ProcessManager.create('BAMF') | ||
1464 | 36 | self.app = self.manager.start_app("xfce4-screenshooter") | ||
1465 | 37 | # This will make sure Screenshooter window you launched is focused and ready | ||
1466 | 38 | # to accept your keyboard input | ||
1467 | 39 | self.assertTrue(self.app.is_active) | ||
1468 | 40 | |||
1469 | 41 | def test_window_visible(self): | ||
1470 | 42 | """ Check to see if the main window has the proper title """ | ||
1471 | 43 | windows = self.app.get_windows() | ||
1472 | 44 | window = windows[0] | ||
1473 | 45 | |||
1474 | 46 | # We must assert the window title = Screenshot | ||
1475 | 47 | # It fails with assertTrue(self.app.is_focused) | ||
1476 | 48 | self.assertThat(lambda: window.title, Eventually(Contains('Screenshot'))) | ||
1477 | 49 | |||
1478 | 50 | for window in windows: | ||
1479 | 51 | window.close() | ||
1480 | 0 | 52 | ||
1481 | === added directory 'xubuntu_autopilot_tests/xfce4-settings-manager' | |||
1482 | === added file 'xubuntu_autopilot_tests/xfce4-settings-manager/__init__.py' | |||
1483 | --- xubuntu_autopilot_tests/xfce4-settings-manager/__init__.py 1970-01-01 00:00:00 +0000 | |||
1484 | +++ xubuntu_autopilot_tests/xfce4-settings-manager/__init__.py 2014-03-30 18:20:04 +0000 | |||
1485 | @@ -0,0 +1,2 @@ | |||
1486 | 1 | # -*- coding: utf-8 -*- | ||
1487 | 2 | |||
1488 | 0 | 3 | ||
1489 | === added file 'xubuntu_autopilot_tests/xfce4-settings-manager/test_xfce4_settings_manager.py' | |||
1490 | --- xubuntu_autopilot_tests/xfce4-settings-manager/test_xfce4_settings_manager.py 1970-01-01 00:00:00 +0000 | |||
1491 | +++ xubuntu_autopilot_tests/xfce4-settings-manager/test_xfce4_settings_manager.py 2014-03-30 18:20:04 +0000 | |||
1492 | @@ -0,0 +1,66 @@ | |||
1493 | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | ||
1494 | 2 | # | ||
1495 | 3 | # Copyright (C) 2013 | ||
1496 | 4 | # | ||
1497 | 5 | # Author: Daniel Chapman daniel@chapman-mail.com | ||
1498 | 6 | # | ||
1499 | 7 | # This program is free software; you can redistribute it and/or modify | ||
1500 | 8 | # it under the terms of the GNU Lesser General Public License as published by | ||
1501 | 9 | # the Free Software Foundation; version 3. | ||
1502 | 10 | # | ||
1503 | 11 | # This program is distributed in the hope that it will be useful, | ||
1504 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1505 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1506 | 14 | # GNU Lesser General Public License for more details. | ||
1507 | 15 | # | ||
1508 | 16 | # You should have received a copy of the GNU Lesser General Public License | ||
1509 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1510 | 18 | from autopilot.matchers import Eventually | ||
1511 | 19 | from testtools.matchers import Equals, Contains | ||
1512 | 20 | from autopilot.testcase import AutopilotTestCase | ||
1513 | 21 | from autopilot.process import ProcessManager | ||
1514 | 22 | |||
1515 | 23 | # register xfce4-settings-manager app | ||
1516 | 24 | ProcessManager.register_known_application( | ||
1517 | 25 | "xfce4-settings-manager", "xfce-settings-manager.desktop", "xfce4-settings-manager") | ||
1518 | 26 | |||
1519 | 27 | class xfce4SettingsManagerindowTests(AutopilotTestCase): | ||
1520 | 28 | """ Window tests for the xfce4-settings-manager """ | ||
1521 | 29 | |||
1522 | 30 | def setUp(self): | ||
1523 | 31 | """ Basic setup instruction to run before each test """ | ||
1524 | 32 | super(xfce4SettingsManagerindowTests, self).setUp() | ||
1525 | 33 | self.manager = ProcessManager.create('BAMF') | ||
1526 | 34 | self.app = self.manager.start_app("xfce4-settings-manager") | ||
1527 | 35 | self.assertTrue(self.app.is_active) | ||
1528 | 36 | |||
1529 | 37 | def test_window_visible(self): | ||
1530 | 38 | """ Check to see if the main window has the proper title """ | ||
1531 | 39 | windows = self.app.get_windows() | ||
1532 | 40 | window = windows[0] | ||
1533 | 41 | |||
1534 | 42 | # We must assert the window title = Settings | ||
1535 | 43 | # It fails with assertTrue(self.app.is_focused) | ||
1536 | 44 | self.assertThat(lambda: window.title, Eventually(Contains('Settings'))) | ||
1537 | 45 | |||
1538 | 46 | for window in windows: | ||
1539 | 47 | window.close() | ||
1540 | 48 | |||
1541 | 49 | def test_main_menu_settings_visible(self, ): | ||
1542 | 50 | windows = self.app.get_windows() | ||
1543 | 51 | self.assertTrue(len(windows) == 1) | ||
1544 | 52 | mainWindow = windows[0] | ||
1545 | 53 | self.assertTrue(mainWindow.title == "Settings") | ||
1546 | 54 | self.keyboard.type("Main menu") | ||
1547 | 55 | self.keyboard.press("Enter") | ||
1548 | 56 | self.keyboard.press("Enter") | ||
1549 | 57 | mainMenu = self.manager.get_running_applications() | ||
1550 | 58 | mainMenuFound = False | ||
1551 | 59 | for menu in mainMenu: | ||
1552 | 60 | if menu.name == "Main Menu": | ||
1553 | 61 | mainMenuFound = True | ||
1554 | 62 | mainMenuWindows = menu.get_windows() | ||
1555 | 63 | for window in mainMenuWindows: | ||
1556 | 64 | window.close() | ||
1557 | 65 | return | ||
1558 | 66 | self.assertTrue(mainMenuFound) | ||
1559 | 0 | \ No newline at end of file | 67 | \ No newline at end of file |
1560 | 1 | 68 | ||
1561 | === added directory 'xubuntu_autopilot_tests/xfce4-taskmanager' | |||
1562 | === added file 'xubuntu_autopilot_tests/xfce4-taskmanager/__init__.py' | |||
1563 | --- xubuntu_autopilot_tests/xfce4-taskmanager/__init__.py 1970-01-01 00:00:00 +0000 | |||
1564 | +++ xubuntu_autopilot_tests/xfce4-taskmanager/__init__.py 2014-03-30 18:20:04 +0000 | |||
1565 | @@ -0,0 +1,2 @@ | |||
1566 | 1 | # -*- coding: utf-8 -*- | ||
1567 | 2 | |||
1568 | 0 | 3 | ||
1569 | === added file 'xubuntu_autopilot_tests/xfce4-taskmanager/test_xfce4_taskmanager.py' | |||
1570 | --- xubuntu_autopilot_tests/xfce4-taskmanager/test_xfce4_taskmanager.py 1970-01-01 00:00:00 +0000 | |||
1571 | +++ xubuntu_autopilot_tests/xfce4-taskmanager/test_xfce4_taskmanager.py 2014-03-30 18:20:04 +0000 | |||
1572 | @@ -0,0 +1,51 @@ | |||
1573 | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | ||
1574 | 2 | # | ||
1575 | 3 | # Copyright (C) 2014 | ||
1576 | 4 | # | ||
1577 | 5 | # Author: Thomas Molloy beetyrootey@gmail.com | ||
1578 | 6 | # | ||
1579 | 7 | # This program is free software; you can redistribute it and/or modify | ||
1580 | 8 | # it under the terms of the GNU Lesser General Public License as published by | ||
1581 | 9 | # the Free Software Foundation; version 3. | ||
1582 | 10 | # | ||
1583 | 11 | # This program is distributed in the hope that it will be useful, | ||
1584 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1585 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1586 | 14 | # GNU Lesser General Public License for more details. | ||
1587 | 15 | # | ||
1588 | 16 | # You should have received a copy of the GNU Lesser General Public License | ||
1589 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1590 | 18 | from autopilot.matchers import Eventually | ||
1591 | 19 | from testtools.matchers import Equals, Contains | ||
1592 | 20 | from autopilot.testcase import AutopilotTestCase | ||
1593 | 21 | from autopilot.process import ProcessManager | ||
1594 | 22 | |||
1595 | 23 | # register xfce4-taskmanager app | ||
1596 | 24 | ProcessManager.register_known_application( | ||
1597 | 25 | "xfce4-taskmanager", | ||
1598 | 26 | "xfce4-taskmanager.desktop", | ||
1599 | 27 | "xfce4-taskmanager") | ||
1600 | 28 | |||
1601 | 29 | class xfce4TaskmanagerWindowTests(AutopilotTestCase): | ||
1602 | 30 | """ Window tests for the xfce4-taskmanager """ | ||
1603 | 31 | |||
1604 | 32 | def setUp(self): | ||
1605 | 33 | """ Basic setup instruction to run before each test """ | ||
1606 | 34 | super(xfce4TaskmanagerWindowTests, self).setUp() | ||
1607 | 35 | self.manager = ProcessManager.create('BAMF') | ||
1608 | 36 | self.app = self.manager.start_app("xfce4-taskmanager") | ||
1609 | 37 | # This will make sure Notes window you launched is focused and ready | ||
1610 | 38 | # to accept your keyboard input | ||
1611 | 39 | self.assertTrue(self.app.is_active) | ||
1612 | 40 | |||
1613 | 41 | def test_window_visible(self): | ||
1614 | 42 | """ Check to see if the main window has the proper title """ | ||
1615 | 43 | windows = self.app.get_windows() | ||
1616 | 44 | window = windows[0] | ||
1617 | 45 | |||
1618 | 46 | # We must assert the window title = Task Manager | ||
1619 | 47 | # It fails with assertTrue(self.app.is_focused) | ||
1620 | 48 | self.assertThat(lambda: window.title, Eventually(Contains('Task Manager'))) | ||
1621 | 49 | |||
1622 | 50 | for window in windows: | ||
1623 | 51 | window.close() | ||
1624 | 0 | 52 | ||
1625 | === modified file 'xubuntu_autopilot_tests/xfce4-terminal/__init__.py' | |||
1626 | --- xubuntu_autopilot_tests/xfce4-terminal/__init__.py 2014-01-14 19:00:17 +0000 | |||
1627 | +++ xubuntu_autopilot_tests/xfce4-terminal/__init__.py 2014-03-30 18:20:04 +0000 | |||
1628 | @@ -41,4 +41,4 @@ | |||
1629 | 41 | self.keyboard.type('mkdir /tmp/temp-dir\n') | 41 | self.keyboard.type('mkdir /tmp/temp-dir\n') |
1630 | 42 | self.keyboard.type('touch /tmp/temp-dir/a\n') | 42 | self.keyboard.type('touch /tmp/temp-dir/a\n') |
1631 | 43 | self.keyboard.type('touch /tmp/temp-dir/b\n') | 43 | self.keyboard.type('touch /tmp/temp-dir/b\n') |
1633 | 44 | self.keyboard.type('touch /tmp/temp-dir/c\n') | 44 | self.keyboard.type('touch /tmp/temp-dir/c\n') |
1634 | 45 | \ No newline at end of file | 45 | \ No newline at end of file |
1635 | 46 | 46 | ||
1636 | === modified file 'xubuntu_autopilot_tests/xfce4-terminal/test_terminal.py' | |||
1637 | --- xubuntu_autopilot_tests/xfce4-terminal/test_terminal.py 2014-01-14 19:00:17 +0000 | |||
1638 | +++ xubuntu_autopilot_tests/xfce4-terminal/test_terminal.py 2014-03-30 18:20:04 +0000 | |||
1639 | @@ -1,8 +1,8 @@ | |||
1640 | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- |
1641 | 2 | # | 2 | # |
1643 | 3 | # Copyright (C) 2013 | 3 | # Copyright (C) 2014 |
1644 | 4 | # | 4 | # |
1646 | 5 | # Author: Daniel Chapman daniel@chapman-mail.com | 5 | # Author: Thomas Molloy beetyrootey@gmail.com |
1647 | 6 | # | 6 | # |
1648 | 7 | # This program is free software; you can redistribute it and/or modify | 7 | # This program is free software; you can redistribute it and/or modify |
1649 | 8 | # it under the terms of the GNU Lesser General Public License as published by | 8 | # it under the terms of the GNU Lesser General Public License as published by |
Thanks for these tests! Glad to see you trying out autopilot. I'll leave a few quick comments.
You should change the author to be yourself in these tests :-) __init_ _.py, I'm confused why you have terminalapp classes, etc. Is this correct? Actually it seems all of your __init__.py are this way. They can be blank files instead if you don't have a class to put in them :-)
In gmusicbrowser/
In the gmusicbrowser test;
I take it you want the window to be the only one? get_windows( ) (len(windows) == 1)
windows = self.app.
self.assertTrue
This is ok, but note that mainWindow.title will never change as it's already set (well, the app could change it, but I don't think that's what we're looking for here :-) ) I'm not exactly sure you need the eventually here, but if so you should ensure you get the window as part of the lambda function. (lambda: mainWindow.title, Eventually( Contains( 'gmusicbrowser' )))
mainWindow = windows[0]
self.assertThat
Reviewing several apps at once is a bit hard; ideally split these up in the future :-) Overall this is a great first start. It seems you can't get introspection to work for these apps is that correct? If so, I would still like to see a bit more of the application tested if at all possible. I know using process manager will severely limit you, but it's worthwhile to see how creative you can be. Ping me on IRC @ balloons anytime for help or further info. Looking forward to seeing your tweaks.