Merge lp:~ahayzen/ubuntu-weather-app/fix-control-depends-01 into lp:ubuntu-weather-app

Proposed by Andrew Hayzen
Status: Needs review
Proposed branch: lp:~ahayzen/ubuntu-weather-app/fix-control-depends-01
Merge into: lp:ubuntu-weather-app
Diff against target: 175 lines (+88/-4)
6 files modified
app/components/NoAPIKeyErrorStateComponent.qml (+2/-2)
debian/changelog (+1/-0)
debian/control (+2/-0)
tests/autopilot/ubuntu_weather_app/__init__.py (+26/-0)
tests/autopilot/ubuntu_weather_app/fixture_setup.py (+52/-0)
tests/autopilot/ubuntu_weather_app/tests/__init__.py (+5/-2)
To merge this branch: bzr merge lp:~ahayzen/ubuntu-weather-app/fix-control-depends-01
Reviewer Review Type Date Requested Status
Jenkins Bot continuous-integration Needs Fixing
Victor Thompson Needs Information
Review via email: mp+282241@code.launchpad.net

Commit message

* Fixes for missing packages in debian/control

Description of the change

* Fixes for missing packages in debian/control

On a blank install in Wily I had to manually install these packages to get the weather-app to run.

To post a comment you must log in.
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Victor Thompson (vthompson) wrote :

I'm not sure why this is failing--but it looks good to me.

Could you also fix app/components/NoAPIKeyErrorStateComponent.qml to use Ubuntu.Components 1.3. Not sure how that got set to 1.5... Seems silly to make an MP just for that.

review: Needs Information
Revision history for this message
Andrew Hayzen (ahayzen) wrote :

The first failure is due to the location allow/deny appearing, the same as clock. The other two appear to be due to not enough locations in the list, I assume because it has no current location or it wasn't added correctly.

Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :

FAILED: Autolanding.
More details in the following jenkins job:
https://core-apps-jenkins.ubuntu.com/job/weather-app-autolanding/412/
Executed test runs:
    None: https://core-apps-jenkins.ubuntu.com/job/generic-land-mp/1565/console

review: Needs Fixing (continuous-integration)

Unmerged revisions

202. By Andrew Hayzen

* Extra debugging

201. By Andrew Hayzen

* Add GeolocationPermissionRequest helper

200. By Andrew Hayzen

* Split stop and start commands

199. By Andrew Hayzen

* Run location service in background

198. By Andrew Hayzen

* Add fixture to fix location issues
* Update copyright years

197. By Andrew Hayzen

* Fix for incorrect Ubuntu.Components version

196. By Andrew Hayzen

Fixes for missing packages in debian/control

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'app/components/NoAPIKeyErrorStateComponent.qml'
--- app/components/NoAPIKeyErrorStateComponent.qml 2015-11-12 01:45:36 +0000
+++ app/components/NoAPIKeyErrorStateComponent.qml 2016-01-20 16:35:28 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright (C) 2015 Canonical Ltd2 * Copyright (C) 2015, 2016 Canonical Ltd
3 *3 *
4 * This file is part of Ubuntu Weather App4 * This file is part of Ubuntu Weather App
5 *5 *
@@ -17,7 +17,7 @@
17 */17 */
1818
19import QtQuick 2.419import QtQuick 2.4
20import Ubuntu.Components 1.520import Ubuntu.Components 1.3
21import "../components"21import "../components"
2222
2323
2424
=== modified file 'debian/changelog'
--- debian/changelog 2015-12-17 02:29:07 +0000
+++ debian/changelog 2016-01-20 16:35:28 +0000
@@ -2,6 +2,7 @@
22
3 [ Andrew Hayzen ]3 [ Andrew Hayzen ]
4 * Release 3.1 and bump version to 3.24 * Release 3.1 and bump version to 3.2
5 * Fixes for missing packages in debian/control
56
6 [ Girish Rawat ]7 [ Girish Rawat ]
7 * Added new READMEs8 * Added new READMEs
89
=== modified file 'debian/control'
--- debian/control 2015-02-09 16:36:43 +0000
+++ debian/control 2016-01-20 16:35:28 +0000
@@ -22,6 +22,8 @@
22Depends: qmlscene,22Depends: qmlscene,
23 qtdeclarative5-localstorage-plugin,23 qtdeclarative5-localstorage-plugin,
24 qml-module-qt-labs-settings,24 qml-module-qt-labs-settings,
25 qtdeclarative5-qtlocation-plugin,
26 qtdeclarative5-qtpositioning-plugin,
25 qtdeclarative5-qtquick2-plugin,27 qtdeclarative5-qtquick2-plugin,
26 qtdeclarative5-ubuntu-ui-toolkit-plugin | qt-components-ubuntu,28 qtdeclarative5-ubuntu-ui-toolkit-plugin | qt-components-ubuntu,
27 suru-icon-theme | ubuntu-mobile-icons,29 suru-icon-theme | ubuntu-mobile-icons,
2830
=== modified file 'tests/autopilot/ubuntu_weather_app/__init__.py'
--- tests/autopilot/ubuntu_weather_app/__init__.py 2015-11-03 00:38:48 +0000
+++ tests/autopilot/ubuntu_weather_app/__init__.py 2016-01-20 16:35:28 +0000
@@ -98,6 +98,16 @@
9898
99 self.pointing_device.drag(start_x, start_y,99 self.pointing_device.drag(start_x, start_y,
100 start_x, stop_y, rate=2)100 start_x, stop_y, rate=2)
101
102 # If the GeoLocation dialog appears select allow
103 try:
104 location = self.main_view.wait_select_single(
105 GeolocationPermissionRequest)
106 location.click_allow_button()
107 location.wait_until_destroyed()
108 except dbus.StateNotFoundError as e:
109 logger.error("Could not allow location (%s)" % e)
110
101 self.isReady.wait_for(True)111 self.isReady.wait_for(True)
102 except dbus.StateNotFoundError:112 except dbus.StateNotFoundError:
103 logger.error('BottomEdge element not found.')113 logger.error('BottomEdge element not found.')
@@ -179,6 +189,22 @@
179 objectName="windForecast").value189 objectName="windForecast").value
180190
181191
192class GeolocationPermissionRequest(UbuntuUIToolkitCustomProxyObjectBase):
193 @click_object
194 def click_allow_button(self):
195 return self.get_allow_button()
196
197 @click_object
198 def click_deny_button(self):
199 return self.get_deny_button()
200
201 def get_allow_button(self):
202 return self.select_single("Button", objectName="allow")
203
204 def get_deny_button(self):
205 return self.select_single("Button", objectName="deny")
206
207
182class HomePage(PageWithBottomEdge):208class HomePage(PageWithBottomEdge):
183 """Autopilot helper for HomePage."""209 """Autopilot helper for HomePage."""
184 def __init__(self, *args, **kwargs):210 def __init__(self, *args, **kwargs):
185211
=== added file 'tests/autopilot/ubuntu_weather_app/fixture_setup.py'
--- tests/autopilot/ubuntu_weather_app/fixture_setup.py 1970-01-01 00:00:00 +0000
+++ tests/autopilot/ubuntu_weather_app/fixture_setup.py 2016-01-20 16:35:28 +0000
@@ -0,0 +1,52 @@
1# Copyright (C) 2014, 2016 Canonical Ltd
2#
3# This file is part of Ubuntu Weather App
4#
5# Ubuntu Clock App is free software: you can redistribute it and/or modify
6# it under the terms of the GNU General Public License version 3 as
7# published by the Free Software Foundation.
8#
9# Ubuntu Clock App is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with this program. If not, see <http://www.gnu.org/licenses/>.
16
17"""Clock app autopilot fixtures."""
18
19import fixtures
20import logging
21import subprocess
22
23
24class LocationServiceTestEnvironment(fixtures.Fixture):
25
26 def setUp(self):
27 super(LocationServiceTestEnvironment, self).setUp()
28 self._set_location_service_testing(True)
29 self.addCleanup(self._set_location_service_testing, False)
30
31 def _set_location_service_testing(self, test_mode):
32 test = 'true' if test_mode else 'false'
33 logger = logging.getLogger(__name__)
34
35 try:
36 subprocess.check_call(
37 "sudo service ubuntu-location-service stop",
38 shell=True)
39 except subprocess.CalledProcessError as e:
40 logger.error('Unable to stop location service (%s).' % e)
41
42 try:
43 subprocess.check_call(
44 "sudo /usr/bin/ubuntu-location-serviced"
45 " --bus system --provider dummy::Provider"
46 " --dummy::Provider::ReferenceLocationLat=51.50853"
47 " --dummy::Provider::ReferenceLocationLon=-0.12574 & disown",
48 shell=True)
49 except subprocess.CalledProcessError as e:
50 logger.error('Unable to start location service in testing mode '
51 'tests may fail as a result. (%s)' % e)
52
053
=== modified file 'tests/autopilot/ubuntu_weather_app/tests/__init__.py'
--- tests/autopilot/ubuntu_weather_app/tests/__init__.py 2015-08-18 23:48:51 +0000
+++ tests/autopilot/ubuntu_weather_app/tests/__init__.py 2016-01-20 16:35:28 +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) 2013, 2014, 2015 Canonical Ltd3# Copyright (C) 2013, 2014, 2015, 2016 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 General Public License version 3 as6# it under the terms of the GNU General Public License version 3 as
@@ -24,7 +24,7 @@
24import logging24import logging
2525
26import fixtures26import fixtures
27from ubuntu_weather_app import UbuntuWeatherApp27from ubuntu_weather_app import fixture_setup, UbuntuWeatherApp
28import ubuntu_weather_app28import ubuntu_weather_app
2929
30from autopilot import logging as autopilot_logging30from autopilot import logging as autopilot_logging
@@ -65,6 +65,9 @@
6565
66 def setUp(self):66 def setUp(self):
67 super(BaseTestCaseWithPatchedHome, self).setUp()67 super(BaseTestCaseWithPatchedHome, self).setUp()
68
69 self.useFixture(fixture_setup.LocationServiceTestEnvironment())
70
68 self.launcher, self.test_type = self.get_launcher_method_and_type()71 self.launcher, self.test_type = self.get_launcher_method_and_type()
69 self.home_dir = self._patch_home()72 self.home_dir = self._patch_home()
7073

Subscribers

People subscribed via source and target branches

to all changes: