Merge lp:~elopio/ubuntu-ui-toolkit/loadItem-no_more into lp:ubuntu-ui-toolkit/staging

Proposed by Leo Arias
Status: Merged
Merged at revision: 1103
Proposed branch: lp:~elopio/ubuntu-ui-toolkit/loadItem-no_more
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 220 lines (+26/-54)
7 files modified
tests/autopilot/ubuntuuitoolkit/tests/__init__.py (+1/-14)
tests/autopilot/ubuntuuitoolkit/tests/gallery/__init__.py (+15/-1)
tests/autopilot/ubuntuuitoolkit/tests/gallery/test_buttons.py (+1/-3)
tests/autopilot/ubuntuuitoolkit/tests/gallery/test_gallery.py (+4/-19)
tests/autopilot/ubuntuuitoolkit/tests/gallery/test_optionselector.py (+1/-3)
tests/autopilot/ubuntuuitoolkit/tests/gallery/test_textinput.py (+2/-6)
tests/autopilot/ubuntuuitoolkit/tests/gallery/test_toggles.py (+2/-8)
To merge this branch: bzr merge lp:~elopio/ubuntu-ui-toolkit/loadItem-no_more
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Ubuntu SDK team Pending
Review via email: mp+221553@code.launchpad.net

This proposal supersedes a proposal from 2014-05-30.

Commit message

Remove the loadItem helper from the gallery autopilot tests.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:1090
http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/313/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/598
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/545
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-amd64-ci/145
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-ci/145
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-ci/145/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-i386-ci/145
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/1040
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/1144
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/1144/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/7954
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/486
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/684
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/684/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/313/rebuild

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

PASSED: Continuous integration, rev:1090
http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/352/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/720
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/666
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-amd64-ci/184
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-ci/184
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-ci/184/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-i386-ci/184
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/1147
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/1358
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/1358/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/8173
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/593
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/805
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/805/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/352/rebuild

review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/__init__.py'
--- tests/autopilot/ubuntuuitoolkit/tests/__init__.py 2014-04-23 08:50:20 +0000
+++ tests/autopilot/ubuntuuitoolkit/tests/__init__.py 2014-05-30 14:31:22 +0000
@@ -1,6 +1,6 @@
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 -*-
2#2#
3# Copyright (C) 2012, 2013 Canonical Ltd.3# Copyright (C) 2012, 2013, 2014 Canonical Ltd.
4#4#
5# This program is free software; you can redistribute it and/or modify5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU Lesser General Public License as published by6# it under the terms of the GNU Lesser General Public License as published by
@@ -161,19 +161,6 @@
161 self.assertThat(listView.visible, Eventually(Equals(True)))161 self.assertThat(listView.visible, Eventually(Equals(True)))
162 return (contentLoader, listView)162 return (contentLoader, listView)
163163
164 def loadItem(self, item):
165 self.selectItem(item)
166 contentLoader = self.main_view.select_single(
167 "QQuickLoader", objectName="contentLoader")
168 self.assertThat(contentLoader.progress, Eventually(Equals(1.0)))
169 loadedPage = self.getListItem(item)
170 self.assertThat(loadedPage, Not(Is(None)))
171 #loadedPage is not a page, it is the list item which goes in
172 #background when the item is selected, which changes the visible
173 #property of item in list itself to False. So followin check
174 #fails on Nexus 4. Commenting it for now.
175 #self.assertThat(loadedPage.visible, Eventually(Equals(True)))
176
177 def drag(self, itemText, itemTextTo):164 def drag(self, itemText, itemTextTo):
178 item = self.getListItem(itemText)165 item = self.getListItem(itemText)
179 itemTo = self.getListItem(itemTextTo)166 itemTo = self.getListItem(itemTextTo)
180167
=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/gallery/__init__.py'
--- tests/autopilot/ubuntuuitoolkit/tests/gallery/__init__.py 2013-10-24 11:01:03 +0000
+++ tests/autopilot/ubuntuuitoolkit/tests/gallery/__init__.py 2014-05-30 14:31:22 +0000
@@ -1,6 +1,6 @@
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 -*-
2#2#
3# Copyright (C) 2012, 2013 Canonical Ltd.3# Copyright (C) 2012, 2013, 2014 Canonical Ltd.
4#4#
5# This program is free software; you can redistribute it and/or modify5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU Lesser General Public License as published by6# it under the terms of the GNU Lesser General Public License as published by
@@ -19,6 +19,7 @@
19import os19import os
20import shutil20import shutil
2121
22import ubuntuuitoolkit
22from ubuntuuitoolkit import tests23from ubuntuuitoolkit import tests
2324
2425
@@ -71,6 +72,19 @@
71 else:72 else:
72 return desktop_file_path73 return desktop_file_path
7374
75 def open_page(self, page):
76 """Open a page of the widget gallery.
77
78 :param page: The objectName of the element in the index list that opens
79 the page.
80
81 """
82 list_view = self.main_view.select_single(
83 ubuntuuitoolkit.QQuickListView, objectName="widgetList")
84 list_view.click_element(page)
85 element = self.main_view.select_single('Standard', objectName=page)
86 element.selected.wait_for(True)
87
74 def tearDown(self):88 def tearDown(self):
75 super(GalleryTestCase, self).tearDown()89 super(GalleryTestCase, self).tearDown()
76 # We can't delete the desktop file before we close the application,90 # We can't delete the desktop file before we close the application,
7791
=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/gallery/test_buttons.py'
--- tests/autopilot/ubuntuuitoolkit/tests/gallery/test_buttons.py 2014-02-11 01:55:49 +0000
+++ tests/autopilot/ubuntuuitoolkit/tests/gallery/test_buttons.py 2014-05-30 14:31:22 +0000
@@ -45,9 +45,7 @@
45 ]45 ]
4646
47 def test_buttons(self):47 def test_buttons(self):
48 item = "Buttons"48 self.open_page('buttonsElement')
49 self.loadItem(item)
50 self.checkPageHeader(item)
5149
52 button = self.app.select_single(objectName=self.button_name)50 button = self.app.select_single(objectName=self.button_name)
53 self.assertIsNot(button, None)51 self.assertIsNot(button, None)
5452
=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/gallery/test_gallery.py'
--- tests/autopilot/ubuntuuitoolkit/tests/gallery/test_gallery.py 2014-05-26 12:37:32 +0000
+++ tests/autopilot/ubuntuuitoolkit/tests/gallery/test_gallery.py 2014-05-30 14:31:22 +0000
@@ -19,7 +19,6 @@
19from autopilot.matchers import Eventually19from autopilot.matchers import Eventually
20from testtools.matchers import Is, Not, Equals20from testtools.matchers import Is, Not, Equals
2121
22from ubuntuuitoolkit import emulators
23from ubuntuuitoolkit.tests import gallery22from ubuntuuitoolkit.tests import gallery
2423
2524
@@ -33,15 +32,8 @@
33 self.assertThat(rootItem, Not(Is(None)))32 self.assertThat(rootItem, Not(Is(None)))
34 self.assertThat(rootItem.visible, Eventually(Equals(True)))33 self.assertThat(rootItem.visible, Eventually(Equals(True)))
3534
36 def test_navigation(self):
37 item = "Navigation"
38 self.loadItem(item)
39 self.checkPageHeader(item)
40
41 def test_slider(self):35 def test_slider(self):
42 item = "Slider"36 self.open_page('slidersElement')
43 self.loadItem(item)
44 self.checkPageHeader(item)
4537
46 item_data = [38 item_data = [
47 ["slider_standard"],39 ["slider_standard"],
@@ -57,9 +49,7 @@
57 # TODO: move slider value49 # TODO: move slider value
5850
59 def test_progress_and_activity(self):51 def test_progress_and_activity(self):
60 item = "Progress and activity"52 self.open_page('progressBarsElement')
61 self.loadItem(item)
62 self.checkPageHeader(item)
6353
64 item_data = [54 item_data = [
65 ["progressbar_standard"],55 ["progressbar_standard"],
@@ -79,9 +69,7 @@
79 # FIXME: https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/130897969 # FIXME: https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1308979
80 return70 return
8171
82 item = "Ubuntu Shape"72 self.open_page('ubuntuShapesElement')
83 self.loadItem(item)
84 self.checkPageHeader(item)
8573
86 item_data = [74 item_data = [
87 ["ubuntushape_color_hex"],75 ["ubuntushape_color_hex"],
@@ -115,12 +103,9 @@
115 ]103 ]
116104
117 def test_open_page(self):105 def test_open_page(self):
118 list_view = self.main_view.select_single(106 self.open_page(self.element_name)
119 emulators.QQuickListView, objectName="widgetList")
120 list_view.click_element(self.element_name)
121 element = self.main_view.select_single(107 element = self.main_view.select_single(
122 'Standard', objectName=self.element_name)108 'Standard', objectName=self.element_name)
123 element.selected.wait_for(True)
124 self.checkPageHeader(element.text)109 self.checkPageHeader(element.text)
125 if self.template_name == 'textinputsTemplate':110 if self.template_name == 'textinputsTemplate':
126 page_type = 'TextInputs'111 page_type = 'TextInputs'
127112
=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/gallery/test_optionselector.py'
--- tests/autopilot/ubuntuuitoolkit/tests/gallery/test_optionselector.py 2014-05-23 09:50:42 +0000
+++ tests/autopilot/ubuntuuitoolkit/tests/gallery/test_optionselector.py 2014-05-30 14:31:22 +0000
@@ -24,9 +24,7 @@
2424
25 def setUp(self):25 def setUp(self):
26 super(OptionSelectorTestCase, self).setUp()26 super(OptionSelectorTestCase, self).setUp()
27 item = "Option Selector"27 self.open_page('optionSelectorsElement')
28 self.loadItem(item)
29 self.checkPageHeader(item)
3028
31 def test_select_option_from_collapsed_optionselector(self):29 def test_select_option_from_collapsed_optionselector(self):
32 collapsed_option_selector = self.main_view.select_single(30 collapsed_option_selector = self.main_view.select_single(
3331
=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/gallery/test_textinput.py'
--- tests/autopilot/ubuntuuitoolkit/tests/gallery/test_textinput.py 2014-04-30 09:40:17 +0000
+++ tests/autopilot/ubuntuuitoolkit/tests/gallery/test_textinput.py 2014-05-30 14:31:22 +0000
@@ -54,9 +54,7 @@
54 # Apply the user locale from the environment54 # Apply the user locale from the environment
55 # The UITK does the same, so the test must be localized55 # The UITK does the same, so the test must be localized
56 locale.setlocale(locale.LC_ALL, "")56 locale.setlocale(locale.LC_ALL, "")
57 item = 'Text Field'57 self.open_page('textinputsElement')
58 self.loadItem(item)
59 self.checkPageHeader(item)
6058
61 def test_write_on_textfield_must_update_text(self):59 def test_write_on_textfield_must_update_text(self):
62 textfield = self.main_view.select_single(60 textfield = self.main_view.select_single(
@@ -78,9 +76,7 @@
7876
79 def setUp(self):77 def setUp(self):
80 super(DisabledTextInputTestCase, self).setUp()78 super(DisabledTextInputTestCase, self).setUp()
81 item = 'Text Field'79 self.open_page('textinputsElement')
82 self.loadItem(item)
83 self.checkPageHeader(item)
8480
85 def test_textfield_disabled(self):81 def test_textfield_disabled(self):
86 textfield_disabled = self.main_view.select_single(82 textfield_disabled = self.main_view.select_single(
8783
=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/gallery/test_toggles.py'
--- tests/autopilot/ubuntuuitoolkit/tests/gallery/test_toggles.py 2013-11-01 15:15:30 +0000
+++ tests/autopilot/ubuntuuitoolkit/tests/gallery/test_toggles.py 2014-05-30 14:31:22 +0000
@@ -35,10 +35,7 @@
3535
36 def setUp(self):36 def setUp(self):
37 super(EnabledTogglesTestCase, self).setUp()37 super(EnabledTogglesTestCase, self).setUp()
38 item = "Toggles"38 self.open_page('togglesElement')
39 self.checkListItem(item)
40 self.loadItem(item)
41 self.checkPageHeader(item)
4239
43 def test_change_toggles_state(self):40 def test_change_toggles_state(self):
44 toggle = self.main_view.select_single(41 toggle = self.main_view.select_single(
@@ -65,10 +62,7 @@
6562
66 def setUp(self):63 def setUp(self):
67 super(DisabledTogglesTestCase, self).setUp()64 super(DisabledTogglesTestCase, self).setUp()
68 item = "Toggles"65 self.open_page('togglesElement')
69 self.checkListItem(item)
70 self.loadItem(item)
71 self.checkPageHeader(item)
7266
73 def test_change_toggles_state(self):67 def test_change_toggles_state(self):
74 toggle = self.main_view.select_single(68 toggle = self.main_view.select_single(

Subscribers

People subscribed via source and target branches