Merge lp:~tpeeters/ubuntu-ui-toolkit/revert-ap16 into lp:ubuntu-ui-toolkit/staging

Proposed by Tim Peeters
Status: Merged
Approved by: Tim Peeters
Approved revision: 1645
Merged at revision: 1646
Proposed branch: lp:~tpeeters/ubuntu-ui-toolkit/revert-ap16
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 624 lines (+56/-152)
16 files modified
tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_common.py (+1/-6)
tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_header.py (+3/-5)
tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_mainview.py (+1/-2)
tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_ubuntulistview.py (+5/-8)
tests/autopilot/ubuntuuitoolkit/tests/__init__.py (+6/-14)
tests/autopilot/ubuntuuitoolkit/tests/components/test_popover.py (+2/-5)
tests/autopilot/ubuntuuitoolkit/tests/components/test_textinput.py (+13/-30)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_actionbar.py (+1/-1)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_dialog.py (+2/-5)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_flickable.py (+8/-34)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_header.py (+7/-23)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_listitem.py (+3/-6)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_main_view.py (+0/-2)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_qquicklistview.py (+1/-4)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_sections.py (+1/-1)
tests/autopilot/ubuntuuitoolkit/tests/gallery/test_ubuntulistview.py (+2/-6)
To merge this branch: bzr merge lp:~tpeeters/ubuntu-ui-toolkit/revert-ap16
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Tim Peeters Approve
Zoltan Balogh Approve
Review via email: mp+272004@code.launchpad.net

Commit message

Undo the MR to support AP1.6.

Description of the change

Undo the MR to support AP1.6 because AP1.6 is not ready yet.

To post a comment you must log in.
Revision history for this message
Zoltan Balogh (bzoltan) wrote :

Do it :)

review: Approve
Revision history for this message
Tim Peeters (tpeeters) wrote :

I tried some random AP tests that were broken by r1642 and they work again.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_common.py'
2--- tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_common.py 2015-09-21 11:19:06 +0000
3+++ tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_common.py 2015-09-22 15:58:52 +0000
4@@ -29,7 +29,6 @@
5 platform
6 )
7 from autopilot.introspection import dbus
8-import ubuntuuitoolkit
9
10 logger = logging.getLogger(__name__)
11
12@@ -243,7 +242,6 @@
13 parent = self.get_parent()
14 root = self.get_root_instance()
15 while parent.id != root.id:
16- parent = ubuntuuitoolkit.QQuickFlickable.from_proxy_object(parent)
17 if parent.is_flickable():
18 return parent
19 parent = parent.get_parent()
20@@ -265,7 +263,4 @@
21 if top_container is None:
22 raise ToolkitException('Could not find the top-most container.')
23 else:
24- from ubuntuuitoolkit._custom_proxy_objects._mainview import (
25- MainView
26- )
27- return MainView.from_proxy_object(top_container)
28+ return top_container
29
30=== modified file 'tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_header.py'
31--- tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_header.py 2015-09-21 13:54:37 +0000
32+++ tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_header.py 2015-09-22 15:58:52 +0000
33@@ -20,10 +20,8 @@
34 from autopilot.introspection import dbus
35
36 from ubuntuuitoolkit._custom_proxy_objects import (
37- _actionbar,
38 _common,
39- _sections,
40- _tabbar,
41+ _tabbar
42 )
43
44
45@@ -92,7 +90,7 @@
46 try:
47 # Ubuntu.Components >=1.3
48 sections = self.select_single(
49- _sections.Sections, objectName='headerSectionsItem')
50+ 'Sections', objectName='headerSectionsItem')
51 sections.click_section_button(index)
52 except dbus.StateNotFoundError:
53 # Ubuntu.Components < 1.3, has no headerSectionsItem.
54@@ -252,7 +250,7 @@
55 try:
56 # for Ubuntu.Components 1.3
57 actionbar = self.select_single(
58- _actionbar.ActionBar, objectName='headerActionBar')
59+ 'ActionBar', objectName='headerActionBar')
60 actionbar.click_action_button(action_object_name)
61 except dbus.StateNotFoundError:
62 # for Ubuntu.Components < 1.3
63
64=== modified file 'tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_mainview.py'
65--- tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_mainview.py 2015-09-21 11:19:06 +0000
66+++ tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_mainview.py 2015-09-22 15:58:52 +0000
67@@ -23,7 +23,6 @@
68 from autopilot import introspection
69
70 from ubuntuuitoolkit._custom_proxy_objects import (
71- AppHeader,
72 _common,
73 popups,
74 _tabs,
75@@ -65,7 +64,7 @@
76 def get_header(self):
77 """Return the AppHeader custom proxy object of the MainView."""
78 try:
79- return self.select_single(AppHeader, objectName='MainView_Header')
80+ return self.select_single(objectName='MainView_Header')
81 except dbus.StateNotFoundError:
82 raise _common.ToolkitException('The main view has no header.')
83
84
85=== modified file 'tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_ubuntulistview.py'
86--- tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_ubuntulistview.py 2015-06-19 05:28:48 +0000
87+++ tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_ubuntulistview.py 2015-09-22 15:58:52 +0000
88@@ -14,21 +14,18 @@
89 # You should have received a copy of the GNU Lesser General Public License
90 # along with this program. If not, see <http://www.gnu.org/licenses/>.
91
92-from ubuntuuitoolkit._custom_proxy_objects import (
93- _flickable,
94- _qquicklistview
95-)
96+from ubuntuuitoolkit._custom_proxy_objects import _qquicklistview
97
98
99 class UbuntuListView11(_qquicklistview.QQuickListView):
100 """Autopilot helper for the UbuntuListView 1.1."""
101
102 def pull_to_refresh_enabled(self):
103- refresh = self.select_single(_flickable.PullToRefresh)
104+ refresh = self.select_single('PullToRefresh')
105 return refresh.enabled
106
107 def manual_refresh_wait(self):
108- refresh = self.select_single(_flickable.PullToRefresh)
109+ refresh = self.select_single('PullToRefresh')
110 if refresh.enabled:
111 self.pull_to_refresh()
112 refresh.wait_for_refresh()
113@@ -36,14 +33,14 @@
114 return False
115
116 def manual_refresh_nowait(self):
117- refresh = self.select_single(_flickable.PullToRefresh)
118+ refresh = self.select_single('PullToRefresh')
119 if refresh.enabled:
120 self.pull_to_refresh()
121 return True
122 return False
123
124 def wait_refresh_completed(self):
125- refresh = self.select_single(_flickable.PullToRefresh)
126+ refresh = self.select_single('PullToRefresh')
127 if refresh.enabled:
128 refresh.wait_for_refresh()
129 return True
130
131=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/__init__.py'
132--- tests/autopilot/ubuntuuitoolkit/tests/__init__.py 2015-09-22 10:13:12 +0000
133+++ tests/autopilot/ubuntuuitoolkit/tests/__init__.py 2015-09-22 15:58:52 +0000
134@@ -25,7 +25,6 @@
135
136 import ubuntuuitoolkit
137 from ubuntuuitoolkit import base, fixture_setup
138-from ubuntuuitoolkit._custom_proxy_objects._mainview import MainView
139
140
141 _DESKTOP_FILE_CONTENTS = ("""[Desktop Entry]
142@@ -109,8 +108,7 @@
143 application_name, _ = os.path.splitext(desktop_file_name)
144 self.app = self.launch_upstart_application(
145 application_name,
146- proxy_class=ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase
147- )
148+ emulator_base=ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase)
149
150 def use_local_modules(self, local_modules_path):
151 env_vars = [
152@@ -127,9 +125,8 @@
153 class QMLStringAppTestCase(UbuntuUIToolkitWithFakeAppRunningTestCase):
154 """Base test case for self tests that define the QML on an string."""
155
156- def setUp(self, mainview_class=MainView):
157+ def setUp(self):
158 super().setUp()
159- self.mainview_class = mainview_class
160 self.assertThat(
161 self.main_view.visible, Eventually(Equals(True)))
162
163@@ -143,9 +140,7 @@
164 QML code used for testing must define the objectName
165 of the MainView to be 'mainView'.
166 """
167- return self.mainview_class.from_proxy_object(
168- self.app.select_single(objectName='mainView')
169- )
170+ return self.app.select_single(objectName='mainView')
171
172
173 class FlickDirection:
174@@ -160,10 +155,8 @@
175 test_qml_file_path = '/path/to/file.qml'
176 desktop_file_path = None
177
178- def setUp(self, mainview_class=MainView):
179+ def setUp(self):
180 super().setUp()
181- # Allow a test case to use a different CPO
182- self.mainview_class = mainview_class
183 self.pointing_device = Pointer(self.input_device_class.create())
184 self.launch_application()
185
186@@ -180,6 +173,7 @@
187 ]
188 self.app = self.launch_test_application(
189 *self.get_command_line(command_line),
190+ emulator_base=ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase,
191 app_type='qt')
192
193 self.assertThat(
194@@ -201,9 +195,7 @@
195 QML code used for testing must define the objectName
196 of the MainView to be 'mainView'.
197 """
198- return self.mainview_class.from_proxy_object(
199- self.app.select_single(objectName='mainView')
200- )
201+ return self.app.select_single(objectName='mainView')
202
203 def getOrientationHelper(self):
204 orientationHelper = self.main_view.select_many(
205
206=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/components/test_popover.py'
207--- tests/autopilot/ubuntuuitoolkit/tests/components/test_popover.py 2015-06-19 05:28:48 +0000
208+++ tests/autopilot/ubuntuuitoolkit/tests/components/test_popover.py 2015-09-22 15:58:52 +0000
209@@ -18,10 +18,7 @@
210
211 import os
212
213-from ubuntuuitoolkit import (
214- QQuickFlickable,
215- tests
216-)
217+from ubuntuuitoolkit import tests
218
219
220 class DialogScrollTestCase(tests.QMLFileAppTestCase):
221@@ -43,7 +40,7 @@
222 button = self.main_view.select_single(objectName='button_huge')
223 self.pointing_device.click_object(button)
224 dialog = self.main_view.select_single(objectName='dialog_huge')
225- flickable = dialog.select_single(QQuickFlickable)
226+ flickable = dialog.select_single('QQuickFlickable')
227 buttlet = dialog.select_single(objectName='buttlet49')
228 # We can scroll
229 self.assertFalse(flickable.atYEnd)
230
231=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/components/test_textinput.py'
232--- tests/autopilot/ubuntuuitoolkit/tests/components/test_textinput.py 2015-07-20 23:40:12 +0000
233+++ tests/autopilot/ubuntuuitoolkit/tests/components/test_textinput.py 2015-09-22 15:58:52 +0000
234@@ -23,11 +23,7 @@
235 from autopilot.input._common import get_center_point
236 from autopilot import platform
237
238-from ubuntuuitoolkit import (
239- TextArea,
240- TextField,
241- tests
242-)
243+from ubuntuuitoolkit import tests
244
245
246 class CaretTextInputTestCase(tests.QMLFileAppTestCase):
247@@ -46,20 +42,16 @@
248 scenarios = [
249 ('textfield',
250 dict(test_qml_file_path=textfield_qml_file_path,
251- objectName='textfield',
252- cpo_class=TextField)),
253+ objectName='textfield')),
254 ('textarea',
255 dict(test_qml_file_path=textarea_qml_file_path,
256- objectName='textarea',
257- cpo_class=TextArea)),
258+ objectName='textarea')),
259 ('customfield',
260 dict(test_qml_file_path=customfield_qml_file_path,
261- objectName='textfield',
262- cpo_class=TextField)),
263+ objectName='textfield')),
264 ('header',
265 dict(test_qml_file_path=header_qml_file_path,
266- objectName='textfield',
267- cpo_class=TextField)),
268+ objectName='textfield')),
269 ]
270
271 def get_command_line(self, command_line):
272@@ -68,10 +60,8 @@
273
274 def setUp(self):
275 super().setUp()
276- # Create either a TextField or TextArea.
277- self.textfield = self.cpo_class.from_proxy_object(
278- self.main_view.select_single(objectName=self.objectName)
279- )
280+ self.textfield = self.main_view.select_single(
281+ objectName=self.objectName)
282 self.assertFalse(self.textfield.focus)
283
284 def select_cursor(self, positionProperty):
285@@ -132,20 +122,16 @@
286 scenarios = [
287 ('textfield',
288 dict(test_qml_file_path=textfield_qml_file_path,
289- objectName='textfield',
290- cpo_class=TextField)),
291+ objectName='textfield')),
292 ('textarea',
293 dict(test_qml_file_path=textarea_qml_file_path,
294- objectName='textarea',
295- cpo_class=TextField)),
296+ objectName='textarea')),
297 ('customfield',
298 dict(test_qml_file_path=customfield_qml_file_path,
299- objectName='textfield',
300- cpo_class=TextField)),
301+ objectName='textfield')),
302 ('header',
303 dict(test_qml_file_path=header_qml_file_path,
304- objectName='textfield',
305- cpo_class=TextField)),
306+ objectName='textfield')),
307 ]
308
309 def get_command_line(self, command_line):
310@@ -153,12 +139,9 @@
311 return command_line
312
313 def setUp(self):
314-
315 super().setUp()
316- # textfield will either be a textfield or textarea.
317- self.textfield = self.cpo_class.from_proxy_object(
318- self.main_view.select_single(objectName=self.objectName)
319- )
320+ self.textfield = self.main_view.select_single(
321+ objectName=self.objectName)
322 self.assertFalse(self.textfield.focus)
323
324 def assert_buttons(self, texts):
325
326=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_actionbar.py'
327--- tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_actionbar.py 2015-07-20 23:19:04 +0000
328+++ tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_actionbar.py 2015-09-22 15:58:52 +0000
329@@ -29,7 +29,7 @@
330 def setUp(self):
331 super().setUp()
332 self.actionbar = self.app.select_single(
333- ubuntuuitoolkit.ActionBar, objectName='ActionBar')
334+ 'ActionBar', objectName='ActionBar')
335 self.label = self.app.select_single(
336 'Label', objectName='Label')
337 self.assertEqual(self.label.text, 'No action triggered.')
338
339=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_dialog.py'
340--- tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_dialog.py 2015-06-16 04:21:58 +0000
341+++ tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_dialog.py 2015-09-22 15:58:52 +0000
342@@ -16,10 +16,7 @@
343
344 import os
345
346-from ubuntuuitoolkit import (
347- TextArea,
348- tests
349-)
350+from ubuntuuitoolkit import tests
351
352
353 class DialogTestCase(tests.QMLFileAppTestCase):
354@@ -34,7 +31,7 @@
355 self.pointing_device.click_object(open_button)
356 dialog = self.main_view.wait_select_single('Dialog',
357 title="Dialog")
358- text_area = dialog.wait_select_single(TextArea,
359+ text_area = dialog.wait_select_single('TextArea',
360 objectName='textfield_standard')
361 text_area.write('test')
362 self.assertEqual(text_area.text, 'test')
363
364=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_flickable.py'
365--- tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_flickable.py 2015-07-21 06:37:52 +0000
366+++ tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_flickable.py 2015-09-22 15:58:52 +0000
367@@ -79,33 +79,16 @@
368 }
369 """)
370
371- class Label(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase):
372- pass
373-
374 scenarios = [
375- ('main view', dict(
376- cpo_class=ubuntuuitoolkit.MainView,
377- object_name='mainView',
378- is_flickable=False)),
379- ('flickable', dict(
380- cpo_class=ubuntuuitoolkit.QQuickFlickable,
381- object_name='flickable',
382- is_flickable=True)),
383- ('list view', dict(
384- cpo_class=ubuntuuitoolkit.QQuickListView,
385- object_name='listView',
386- is_flickable=True)),
387- ('label', dict(
388- cpo_class=Label,
389- object_name='label',
390- is_flickable=False))
391+ ('main view', dict(object_name='mainView', is_flickable=False)),
392+ ('flickable', dict(object_name='flickable', is_flickable=True)),
393+ ('list view', dict(object_name='listView', is_flickable=True)),
394+ ('label', dict(object_name='label', is_flickable=False))
395 ]
396
397 def test_is_flickable(self):
398 """Test that is_flickable identifies the elements correctly."""
399- element = self.app.select_single(
400- self.cpo_class,
401- objectName=self.object_name)
402+ element = self.app.select_single(objectName=self.object_name)
403 self.assertEqual(element.is_flickable(), self.is_flickable)
404
405
406@@ -160,9 +143,6 @@
407 }
408 """)
409
410- class Button(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase):
411- pass
412-
413 def setUp(self):
414 super().setUp()
415 self.flickable = self.main_view.select_single(
416@@ -174,9 +154,7 @@
417 def test_swipe_into_view_bottom_element(self):
418 self.main_view.close_toolbar()
419
420- button = self.main_view.select_single(
421- self.Button,
422- objectName='bottomButton')
423+ button = self.main_view.select_single(objectName='bottomButton')
424 button.swipe_into_view()
425
426 self.pointing_device.click_object(button)
427@@ -184,14 +162,10 @@
428
429 def test_swipe_into_view_top_element(self):
430 self.main_view.close_toolbar()
431- bottomButton = self.main_view.select_single(
432- self.Button,
433- objectName='bottomButton')
434+ bottomButton = self.main_view.select_single(objectName='bottomButton')
435 bottomButton.swipe_into_view()
436
437- topButton = self.main_view.select_single(
438- self.Button,
439- objectName='topButton')
440+ topButton = self.main_view.select_single(objectName='topButton')
441 topButton.swipe_into_view()
442
443 self.pointing_device.click_object(topButton)
444
445=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_header.py'
446--- tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_header.py 2015-06-17 23:26:34 +0000
447+++ tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_header.py 2015-09-22 15:58:52 +0000
448@@ -22,12 +22,7 @@
449 from autopilot import introspection
450
451 import ubuntuuitoolkit
452-from ubuntuuitoolkit import (
453- CheckBox,
454- MainView,
455- UbuntuUIToolkitCustomProxyObjectBase as ProxyBase,
456- tests
457-)
458+from ubuntuuitoolkit import tests
459
460
461 class HideShowTestCase(tests.QMLFileAppTestCase):
462@@ -77,12 +72,8 @@
463 def setUp(self):
464 super().setUp()
465 self.header = self.main_view.get_header()
466- self.label = ProxyBase.from_proxy_object(
467- self.app.select_single(
468- 'Label',
469- objectName='clicked_label'
470- )
471- )
472+ self.label = self.app.select_single(
473+ 'Label', objectName='clicked_label')
474 self.assertEqual(self.label.text, 'No button clicked.')
475
476 def test_header_custom_proxy_object(self):
477@@ -114,9 +105,7 @@
478 self.assertEqual(self.label.text, 'Cancel button clicked.')
479
480 def test_click_header_action_button_with_hidden_header(self):
481- bottom_label = ProxyBase.from_proxy_object(
482- self.main_view.select_single(objectName='end_label')
483- )
484+ bottom_label = self.main_view.select_single(objectName='end_label')
485 bottom_label.swipe_into_view()
486 self.assertFalse(self.header._is_visible())
487 self.header.click_action_button('action0')
488@@ -157,7 +146,7 @@
489
490 def test_select_sections_with_sections_disabled(self):
491 sectionsEnabledSwitch = self.app.select_single(
492- CheckBox, objectName='sections_enabled_switch')
493+ 'CheckBox', objectName='sections_enabled_switch')
494 sectionsEnabledSwitch.uncheck()
495 for index in [1, 0, 2]:
496 self.header.switch_to_section_by_index(index)
497@@ -194,7 +183,7 @@
498
499 def test_select_sections_with_sections_disabled(self):
500 sectionsEnabledSwitch = self.app.select_single(
501- CheckBox, objectName='sections_enabled_switch')
502+ 'CheckBox', objectName='sections_enabled_switch')
503 sectionsEnabledSwitch.uncheck()
504 error = self.assertRaises(
505 ubuntuuitoolkit.ToolkitException,
506@@ -223,12 +212,7 @@
507
508 @property
509 def main_view(self):
510- # This change will allow the test to pass, but I don't feel this test
511- # is really relevant as it is really testing the from_proxy_method to
512- # create a MainView object.
513- return MainView.from_proxy_object(
514- self.app.select_single(objectName='customMainView')
515- )
516+ return self.app.select_single(objectName='customMainView')
517
518 def test_get_header_from_custom_main_view(self):
519 """Test that we can get the header from a custom main view.
520
521=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_listitem.py'
522--- tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_listitem.py 2015-07-02 18:41:11 +0000
523+++ tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_listitem.py 2015-09-22 15:58:52 +0000
524@@ -17,9 +17,7 @@
525 import os
526
527 import ubuntuuitoolkit
528-from ubuntuuitoolkit import (
529- tests
530-)
531+from ubuntuuitoolkit import tests
532
533
534 class ListItemTestCase(tests.QMLFileAppTestCase):
535@@ -29,12 +27,11 @@
536 dir_path, 'test_listitem.ListItemTestCase.qml')
537
538 def setUp(self):
539-
540 super().setUp()
541 self.list_view = self.main_view.select_single(
542 ubuntuuitoolkit.QQuickListView, objectName='test_view')
543 self.test_listitem = self.main_view.select_single(
544- ubuntuuitoolkit.UCListItem, objectName='listitem0')
545+ 'UCListItem', objectName='listitem0')
546 self.test_page = self.main_view.select_single(
547 objectName='test_page')
548 self.assertEqual(self.test_page.title, 'No action triggered')
549@@ -96,6 +93,6 @@
550 self.assertTrue(self.test_listitem.selected)
551 # select an other one
552 listItem3 = self.main_view.select_single(
553- ubuntuuitoolkit.UCListItem, objectName='listitem3')
554+ 'UCListItem', objectName='listitem3')
555 listItem3.toggle_selected()
556 self.assertTrue(listItem3.selected)
557
558=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_main_view.py'
559--- tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_main_view.py 2015-06-18 04:17:48 +0000
560+++ tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_main_view.py 2015-09-22 15:58:52 +0000
561@@ -76,8 +76,6 @@
562
563
564 class MainView12TestCase(tests.QMLStringAppTestCase):
565- # veebers: Note some of these tests might be unneeded due to how the CPOs
566- # work now.
567
568 test_qml = ("""
569 import QtQuick 2.3
570
571=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_qquicklistview.py'
572--- tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_qquicklistview.py 2015-07-02 18:41:11 +0000
573+++ tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_qquicklistview.py 2015-09-22 15:58:52 +0000
574@@ -23,9 +23,7 @@
575 from autopilot.introspection import dbus
576
577 import ubuntuuitoolkit
578-from ubuntuuitoolkit import (
579- tests
580-)
581+from ubuntuuitoolkit import tests
582
583
584 class QQuickListViewTestCase(tests.QMLStringAppTestCase):
585@@ -206,7 +204,6 @@
586
587 def setUp(self):
588 super().setUp()
589-
590 self.list_view = self.main_view.select_single(
591 ubuntuuitoolkit.QQuickListView, objectName='testListView')
592 self.label = self.main_view.select_single(
593
594=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_sections.py'
595--- tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_sections.py 2015-07-20 23:19:04 +0000
596+++ tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_sections.py 2015-09-22 15:58:52 +0000
597@@ -29,7 +29,7 @@
598 def setUp(self):
599 super().setUp()
600 self.sections = self.app.select_single(
601- ubuntuuitoolkit.Sections, objectName='sections')
602+ 'Sections', objectName='sections')
603 self.label = self.app.select_single(
604 'Label', objectName='label')
605 self.assertEqual(self.label.text, 'Section 0 is selected.')
606
607=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/gallery/test_ubuntulistview.py'
608--- tests/autopilot/ubuntuuitoolkit/tests/gallery/test_ubuntulistview.py 2015-06-19 05:28:48 +0000
609+++ tests/autopilot/ubuntuuitoolkit/tests/gallery/test_ubuntulistview.py 2015-09-22 15:58:52 +0000
610@@ -32,12 +32,8 @@
611 self.checkPageHeader(element.text)
612 self.main_view.wait_select_single(
613 "Template", objectName="ubuntuListViewTemplate")
614- self.listView = ubuntuuitoolkit.UbuntuListView11.from_proxy_object(
615- self.main_view.select_single(
616- ubuntuuitoolkit.UbuntuListView11,
617- objectName="ubuntuListView"
618- )
619- )
620+ self.listView = self.main_view.select_single(
621+ ubuntuuitoolkit.UbuntuListView11, objectName="ubuntuListView")
622
623 def test_pull_to_refresh_enabled(self):
624 self._open_page()

Subscribers

People subscribed via source and target branches