Merge lp:~nick-dedekind/unity8/remove-indicators-client-autopilot into lp:unity8
- remove-indicators-client-autopilot
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Francis Ginther |
Approved revision: | 385 |
Merged at revision: | 393 |
Proposed branch: | lp:~nick-dedekind/unity8/remove-indicators-client-autopilot |
Merge into: | lp:unity8 |
Diff against target: |
341 lines (+0/-287) 8 files modified
CMakeLists.txt (+0/-1) debian/control (+0/-1) tests/autopilot/unity8/indicators_client/__init__.py (+0/-8) tests/autopilot/unity8/indicators_client/emulators/__init__.py (+0/-31) tests/autopilot/unity8/indicators_client/emulators/common.py (+0/-14) tests/autopilot/unity8/indicators_client/emulators/main_window.py (+0/-27) tests/autopilot/unity8/indicators_client/tests/__init__.py (+0/-91) tests/autopilot/unity8/indicators_client/tests/test_battery.py (+0/-114) |
To merge this branch: | bzr merge lp:~nick-dedekind/unity8/remove-indicators-client-autopilot |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Approve | |
Michał Sawicz | Approve | ||
Review via email: mp+189134@code.launchpad.net |
Commit message
Removed indicators-client autopilot tests.
Description of the change
Removed indicators-client autopilot tests.
PS Jenkins bot (ps-jenkins) wrote : | # |
Michał Sawicz (saviq) : | # |
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
None: http://
SUCCESS: http://
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
Francis Ginther (fginther) wrote : | # |
The generic-
PS Jenkins bot (ps-jenkins) : | # |
Preview Diff
1 | === modified file 'CMakeLists.txt' |
2 | --- CMakeLists.txt 2013-09-09 23:02:55 +0000 |
3 | +++ CMakeLists.txt 2013-10-03 17:05:36 +0000 |
4 | @@ -96,7 +96,6 @@ |
5 | # Autopilot tests |
6 | include(autopilot) |
7 | declare_autopilot_test(shell unity8.shell ${CMAKE_SOURCE_DIR}/tests/autopilot/) |
8 | -declare_autopilot_test(indicators_client unity8.indicators_client ${CMAKE_SOURCE_DIR}/tests/autopilot/) |
9 | |
10 | set(SHELL_APP unity8) |
11 | |
12 | |
13 | === modified file 'debian/control' |
14 | --- debian/control 2013-09-26 15:23:37 +0000 |
15 | +++ debian/control 2013-10-03 17:05:36 +0000 |
16 | @@ -90,7 +90,6 @@ |
17 | Package: unity8-autopilot |
18 | Architecture: all |
19 | Depends: gir1.2-glib-2.0, |
20 | - indicators-client (>= ${source:Version}), |
21 | libautopilot-qt, |
22 | libqt5test5, |
23 | libqt5widgets5, |
24 | |
25 | === removed directory 'tests/autopilot/unity8/indicators_client' |
26 | === removed file 'tests/autopilot/unity8/indicators_client/__init__.py' |
27 | --- tests/autopilot/unity8/indicators_client/__init__.py 2013-07-23 09:54:32 +0000 |
28 | +++ tests/autopilot/unity8/indicators_client/__init__.py 1970-01-01 00:00:00 +0000 |
29 | @@ -1,8 +0,0 @@ |
30 | -# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- |
31 | -# Copyright 2013 Canonical |
32 | -# |
33 | -# This program is free software: you can redistribute it and/or modify it |
34 | -# under the terms of the GNU General Public License version 3, as published |
35 | -# by the Free Software Foundation. |
36 | - |
37 | -"""unity indicators-client autopilot tests and emulators - sub level package.""" |
38 | |
39 | === removed directory 'tests/autopilot/unity8/indicators_client/emulators' |
40 | === removed file 'tests/autopilot/unity8/indicators_client/emulators/__init__.py' |
41 | --- tests/autopilot/unity8/indicators_client/emulators/__init__.py 2013-06-07 12:51:16 +0000 |
42 | +++ tests/autopilot/unity8/indicators_client/emulators/__init__.py 1970-01-01 00:00:00 +0000 |
43 | @@ -1,31 +0,0 @@ |
44 | -# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- |
45 | -# Copyright 2013 Canonical |
46 | -# |
47 | -# This program is free software: you can redistribute it and/or modify it |
48 | -# under the terms of the GNU General Public License version 3, as published |
49 | -# by the Free Software Foundation. |
50 | - |
51 | -from autopilot.introspection.dbus import DBusIntrospectionObject |
52 | -from autopilot.input import Mouse, Touch, Pointer |
53 | -from autopilot.platform import model |
54 | - |
55 | -from time import sleep |
56 | - |
57 | -from autopilot.introspection.dbus import IntrospectableObjectMetaclass |
58 | - |
59 | -class IndicatorsIntrospectionObject(DBusIntrospectionObject): |
60 | - |
61 | - """A common class that provides introspection and other helpers to indictors.""" |
62 | - |
63 | - if model() == 'Desktop': |
64 | - scenarios = [ |
65 | - ('with mouse', dict(input_device_class=Mouse)), |
66 | - ] |
67 | - else: |
68 | - scenarios = [ |
69 | - ('with touch', dict(input_device_class=Touch)), |
70 | - ] |
71 | - |
72 | - def setUp(self): |
73 | - self.pointing_device = Pointer(self.input_device_class.create()) |
74 | - super(IndicatorsTestCase, self).setUp() |
75 | |
76 | === removed file 'tests/autopilot/unity8/indicators_client/emulators/common.py' |
77 | --- tests/autopilot/unity8/indicators_client/emulators/common.py 2013-06-12 10:12:31 +0000 |
78 | +++ tests/autopilot/unity8/indicators_client/emulators/common.py 1970-01-01 00:00:00 +0000 |
79 | @@ -1,14 +0,0 @@ |
80 | -# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- |
81 | -# Copyright 2013 Canonical |
82 | -# |
83 | -# This program is free software: you can redistribute it and/or modify it |
84 | -# under the terms of the GNU General Public License version 3, as published |
85 | -# by the Free Software Foundation. |
86 | - |
87 | -from indicators_client.emulators import IndicatorsIntrospectionObject |
88 | - |
89 | -class SwitchMenu(IndicatorsIntrospectionObject): |
90 | - """A switch menu control.""" |
91 | - |
92 | -class Switch(IndicatorsIntrospectionObject): |
93 | - """A switch control.""" |
94 | |
95 | === removed file 'tests/autopilot/unity8/indicators_client/emulators/main_window.py' |
96 | --- tests/autopilot/unity8/indicators_client/emulators/main_window.py 2013-09-09 09:21:55 +0000 |
97 | +++ tests/autopilot/unity8/indicators_client/emulators/main_window.py 1970-01-01 00:00:00 +0000 |
98 | @@ -1,27 +0,0 @@ |
99 | -# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- |
100 | -# Copyright 2013 Canonical |
101 | -# |
102 | -# This program is free software: you can redistribute it and/or modify it |
103 | -# under the terms of the GNU General Public License version 3, as published |
104 | -# by the Free Software Foundation. |
105 | - |
106 | -class MainWindow(object): |
107 | - """An emulator class that makes it easy to interact with the shell""" |
108 | - |
109 | - def __init__(self, app): |
110 | - self.app = app |
111 | - |
112 | - def get_qml_view(self): |
113 | - """Get the main QML view""" |
114 | - return self.app.select_single("QQuickView") |
115 | - |
116 | - def get_indicators_client(self): |
117 | - return self.app.select_single("IndicatorsClient") |
118 | - |
119 | - def get_page_stack(self): |
120 | - """Get the page stack""" |
121 | - return self.app.select_single("PageStack") |
122 | - |
123 | - def get_battery_menu(self): |
124 | - """Get the battery menu from the list""" |
125 | - return self.app.select_single("BaseMenuItem", objectName="indicator-battery"); |
126 | |
127 | === removed directory 'tests/autopilot/unity8/indicators_client/tests' |
128 | === removed file 'tests/autopilot/unity8/indicators_client/tests/__init__.py' |
129 | --- tests/autopilot/unity8/indicators_client/tests/__init__.py 2013-07-23 11:20:31 +0000 |
130 | +++ tests/autopilot/unity8/indicators_client/tests/__init__.py 1970-01-01 00:00:00 +0000 |
131 | @@ -1,91 +0,0 @@ |
132 | -# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- |
133 | -# Copyright 2013 Canonical |
134 | -# |
135 | -# This program is free software: you can redistribute it and/or modify it |
136 | -# under the terms of the GNU General Public License version 3, as published |
137 | -# by the Free Software Foundation. |
138 | - |
139 | -"""indicators-client autopilot tests.""" |
140 | - |
141 | -import os.path |
142 | - |
143 | -from autopilot.input import Mouse, Touch, Pointer |
144 | -from autopilot.testcase import AutopilotTestCase |
145 | -from autopilot.matchers import Eventually |
146 | -from autopilot.platform import model |
147 | -from testtools.matchers import Equals |
148 | - |
149 | -from unity8 import get_binary_path |
150 | -from unity8.indicators_client.emulators.main_window import MainWindow |
151 | -from logging import getLogger |
152 | -import sys |
153 | -from time import sleep |
154 | - |
155 | -log = getLogger(__name__) |
156 | - |
157 | -class FormFactors(object): |
158 | - Phone, Tablet, Desktop = range(3) |
159 | - |
160 | -class IndicatorsTestCase(AutopilotTestCase): |
161 | - |
162 | - """A common test case class that provides several useful methods for indicator tests.""" |
163 | - |
164 | - geometry = None |
165 | - grid_unit = None |
166 | - |
167 | - if model() == 'Desktop': |
168 | - scenarios = [ |
169 | - ('with mouse', dict(input_device_class=Mouse, geometry="400x800", grid_unit="12")), |
170 | - ] |
171 | - else: |
172 | - scenarios = [ |
173 | - ('with touch', dict(input_device_class=Touch)), |
174 | - ] |
175 | - |
176 | - def setUp(self, geometry, grid_size): |
177 | - self.pointing_device = Pointer(self.input_device_class.create()) |
178 | - super(IndicatorsTestCase, self).setUp() |
179 | - if grid_size is not None: |
180 | - self.patch_environment("GRID_UNIT_PX", str(grid_size)) |
181 | - self.grid_size = int(grid_size) |
182 | - else: |
183 | - self.grid_size = int(os.getenv('GRID_UNIT_PX')) |
184 | - |
185 | - if os.path.realpath(__file__).startswith("/usr/"): |
186 | - self.launch_test_installed(geometry) |
187 | - else: |
188 | - self.launch_test_local(geometry) |
189 | - |
190 | - def launch_test_local(self, geometry): |
191 | - if geometry is None: |
192 | - self.app = self.launch_test_application(get_binary_path("indicators-client"), |
193 | - "-geometry", geometry, app_type='qt') |
194 | - else: |
195 | - self.app = self.launch_test_application(get_binary_path("indicators-client"), |
196 | - app_type='qt') |
197 | - |
198 | - def launch_test_installed(self, geometry): |
199 | - if geometry is not None: |
200 | - self.app = self.launch_test_application("indicators-client", "-geometry", geometry, app_type='qt') |
201 | - else: |
202 | - self.app = self.launch_test_application("indicators-client", app_type='qt') |
203 | - |
204 | - def skipWrapper(*args, **kwargs): |
205 | - pass |
206 | - |
207 | - def form_factor(self): |
208 | - return FormFactors.Desktop |
209 | - |
210 | - def __getattribute__(self, attr_name): |
211 | - attr = object.__getattribute__(self, attr_name); |
212 | - if attr_name.startswith("test_"): |
213 | - try: |
214 | - if self.form_factor() in attr.blacklist: |
215 | - return self.skipWrapper |
216 | - except: |
217 | - pass |
218 | - return attr |
219 | - |
220 | - @property |
221 | - def main_window(self): |
222 | - return MainWindow(self.app) |
223 | |
224 | === removed file 'tests/autopilot/unity8/indicators_client/tests/test_battery.py' |
225 | --- tests/autopilot/unity8/indicators_client/tests/test_battery.py 2013-08-15 17:09:16 +0000 |
226 | +++ tests/autopilot/unity8/indicators_client/tests/test_battery.py 1970-01-01 00:00:00 +0000 |
227 | @@ -1,114 +0,0 @@ |
228 | -# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- |
229 | -# Copyright 2013 Canonical |
230 | -# |
231 | -# This program is free software: you can redistribute it and/or modify it |
232 | -# under the terms of the GNU General Public License version 3, as published |
233 | -# by the Free Software Foundation. |
234 | - |
235 | -"""Add tests here if you want to ensure the behaviour of the power indicator menus are correct""" |
236 | - |
237 | -from testtools.matchers import Equals, NotEquals |
238 | -from autopilot.input import Touch |
239 | -from autopilot.matchers import Eventually |
240 | - |
241 | -from unity8.indicators_client.tests import IndicatorsTestCase |
242 | -from time import sleep |
243 | -import random |
244 | -import math |
245 | -import unittest |
246 | - |
247 | -class TestDisplayMenus(IndicatorsTestCase): |
248 | - def setUp(self): |
249 | - super(TestDisplayMenus, self).setUp(self.geometry, self.grid_unit) |
250 | - |
251 | - def tearDown(self): |
252 | - # self.main_window.get_indicators_client().reset() |
253 | - super(TestDisplayMenus, self).tearDown() |
254 | - |
255 | - # START SECTION |
256 | - # We need to move these to emulators once autopilot supports emulators for |
257 | - # applications started with AutopilotTestCase.launch_test_application |
258 | - |
259 | - def open_battery_menu(self): |
260 | - # This opens the messaging menu so you don't have to do that in |
261 | - # every test case |
262 | - self.assertThat(lambda: self.main_window.get_battery_menu(), Eventually(NotEquals(None))); |
263 | - self.pointing_device.move_to_object(self.main_window.get_battery_menu()) |
264 | - self.pointing_device.click() |
265 | - |
266 | - fn_loader = lambda: self.app.select_single("IndicatorsPage/QQuickLoader", objectName="pageLoader"); |
267 | - self.assertThat(fn_loader, Eventually(NotEquals(None))); |
268 | - page_loader = fn_loader(); |
269 | - self.assertThat(page_loader.progress, Eventually(Equals(1.0))) |
270 | - |
271 | - def switch_auto_brightness(self, auto_brightness): |
272 | - ab_switch = auto_brightness.select_single("CheckBox"); |
273 | - self.assertThat(ab_switch, NotEquals(None)) |
274 | - |
275 | - self.pointing_device.move_to_object(ab_switch) |
276 | - self.pointing_device.click() |
277 | - |
278 | - def set_brightness_to_value(self, brightness_menu, new_value): |
279 | - brightness_slider = brightness_menu.select_single("Slider"); |
280 | - self.assertThat(brightness_slider, NotEquals(None)) |
281 | - |
282 | - self.pointing_device.move_to_object(brightness_slider) |
283 | - |
284 | - old_ab_value = brightness_slider.value |
285 | - pixel_ratio = brightness_slider.width / (brightness_slider.maximumValue - brightness_slider.minimumValue) |
286 | - |
287 | - while True: |
288 | - |
289 | - pixels_to_move = int(pixel_ratio * (new_value - old_ab_value) / 15) |
290 | - if pixels_to_move == 0: |
291 | - break; |
292 | - |
293 | - self.pointing_device.drag(self.pointing_device.x, self.pointing_device.y, self.pointing_device.x + pixels_to_move, self.pointing_device.y) |
294 | - |
295 | - old_ab_value = brightness_slider.value |
296 | - |
297 | - @unittest.skip("Battery indicator has been removed.") |
298 | - def test_auto_bright_switch(self): |
299 | - """Test the auto-bright switch""" |
300 | - self.open_battery_menu() |
301 | - |
302 | - # wait for the switch menu item |
303 | - fn_auto_brightness = lambda: self.app.select_single("SwitchMenuItem", objectName="auto-brightness"); |
304 | - # FIXME: this should go away when we switch to indicator-power |
305 | - try: |
306 | - self.assertThat(fn_auto_brightness, Eventually(NotEquals(None))); |
307 | - except AssertionError: |
308 | - self.skipTest("WARNING: test skipped due to missing indicator-battery") |
309 | - auto_brightness = fn_auto_brightness(); |
310 | - |
311 | - old_ab_value = auto_brightness.checked |
312 | - |
313 | - self.switch_auto_brightness(auto_brightness) |
314 | - |
315 | - # TODO - should check backend when it's introspectable. |
316 | - self.assertThat(auto_brightness.checked, Eventually(NotEquals(old_ab_value))) |
317 | - |
318 | - @unittest.skip("Battery indicator has been removed.") |
319 | - def test_brightness_slider(self): |
320 | - """Test the auto-bright switch""" |
321 | - self.open_battery_menu() |
322 | - |
323 | - fn_brightness_menu = lambda: self.app.select_single("SliderMenuItem", objectName="brightness"); |
324 | - # FIXME: this should go away when we switch to indicator-power |
325 | - try: |
326 | - self.assertThat(fn_brightness_menu, Eventually(NotEquals(None))); |
327 | - except AssertionError: |
328 | - self.skipTest("WARNING: test skipped due to missing indicator-battery") |
329 | - brightness_menu = fn_brightness_menu(); |
330 | - |
331 | - old_ab_value = brightness_menu.value |
332 | - # find a new value to do to. At least 1/4 distance away from current value |
333 | - while True: |
334 | - desired_value = random.uniform(brightness_menu.minimumValue, brightness_menu.maximumValue) |
335 | - if (abs(desired_value - old_ab_value) >= (brightness_menu.maximumValue - brightness_menu.minimumValue)/4): |
336 | - break; |
337 | - |
338 | - self.set_brightness_to_value(brightness_menu, desired_value) |
339 | - |
340 | - # TODO - should check backend when it's introspectable. |
341 | - self.assertThat(brightness_menu.value, Eventually(NotEquals(old_ab_value))) |
PASSED: Continuous integration, rev:385 jenkins. qa.ubuntu. com/job/ unity8- ci/1250/ jenkins. qa.ubuntu. com/job/ generic- mediumtests- saucy/4478 jenkins. qa.ubuntu. com/job/ generic- mediumtests- touch/2249 jenkins. qa.ubuntu. com/job/ unity-phablet- qmluitests- saucy/2063 jenkins. qa.ubuntu. com/job/ unity8- saucy-amd64- ci/273 jenkins. qa.ubuntu. com/job/ unity8- saucy-armhf- ci/1250 jenkins. qa.ubuntu. com/job/ unity8- saucy-armhf- ci/1250/ artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ unity8- saucy-i386- ci/1249 jenkins. qa.ubuntu. com/job/ autopilot- testrunner- otto-saucy/ 759 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- saucy-amd64/ 353 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- saucy-amd64/ 353/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- saucy-armhf/ 2251 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- saucy-armhf/ 2251/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ generic- mediumtests- runner- maguro/ 1920 jenkins. qa.ubuntu. com/job/ generic- mediumtests- runner- mako/1937
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins: 8080/job/ unity8- ci/1250/ rebuild
http://