Merge lp:~mterry/unity8/timezone-name into lp:unity8

Proposed by Michael Terry
Status: Merged
Approved by: Lukáš Tinkl
Approved revision: 2326
Merged at revision: 2423
Proposed branch: lp:~mterry/unity8/timezone-name
Merge into: lp:unity8
Diff against target: 134 lines (+28/-12)
6 files modified
debian/control (+1/-1)
qml/Wizard/Pages/50-timezone.qml (+5/-2)
tests/mocks/Ubuntu/SystemSettings/TimeDate/CMakeLists.txt (+1/-1)
tests/mocks/Ubuntu/SystemSettings/TimeDate/MockTimeDate.qml (+16/-4)
tests/mocks/Ubuntu/SystemSettings/TimeDate/qmldir (+1/-1)
tests/qmltests/Wizard/tst_Wizard.qml (+4/-3)
To merge this branch: bzr merge lp:~mterry/unity8/timezone-name
Reviewer Review Type Date Requested Status
Lukáš Tinkl (community) Approve
Unity8 CI Bot continuous-integration Needs Fixing
Review via email: mp+291042@code.launchpad.net

Commit message

Use new setTimeZone method to set user-friendly timezone name in the wizard.

Description of the change

Use new setTimeZone method to set user-friendly timezone name in the wizard.

 * Are there any related MPs required for this MP to build/function as expected? Please list.
 https://code.launchpad.net/~mterry/ubuntu-system-settings/timezone-name/+merge/291041

 * Did you perform an exploratory manual test run of your code change and any related functionality?
 Yes

 * Did you make sure that your branch does not contain spurious tags?
 Yes

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
 I'm on that team.

 * If you changed the UI, has there been a design review?
 NA

To post a comment you must log in.
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2326
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/934/
Executed test runs:
    FAILURE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/521/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial,testname=qmluitests.sh/521/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=autopilot.sh/521/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1272
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1243
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/1243
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1241
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1241/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/1241
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/1241/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1241
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1241/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/1241
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/1241/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1241
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1241/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/1241
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/1241/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/934/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :

Looking good, working great (tested this together with the respective u-s-s change in silo 33)

* Did you perform an exploratory manual test run of the code change and any related functionality?

yes

* Did CI run pass? If not, please explain why.

no (unsatisfied deps)

* Did you make sure that the branch does not contain spurious tags?

yes

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2016-03-30 22:34:41 +0000
3+++ debian/control 2016-04-05 20:31:10 +0000
4@@ -106,7 +106,7 @@
5 qtdeclarative5-qtmir-plugin (>= 0.4.8),
6 qtdeclarative5-ubuntu-telephony0.1,
7 qtdeclarative5-ubuntu-web-plugin,
8- ubuntu-system-settings,
9+ ubuntu-system-settings (>= 0.4),
10 unity-launcher-impl-7,
11 unity8-common (= ${source:Version}),
12 unity8-private (= ${binary:Version}),
13
14=== modified file 'qml/Wizard/Pages/50-timezone.qml'
15--- qml/Wizard/Pages/50-timezone.qml 2016-03-16 11:38:39 +0000
16+++ qml/Wizard/Pages/50-timezone.qml 2016-04-05 20:31:10 +0000
17@@ -18,7 +18,7 @@
18 import QtQuick.Layouts 1.1
19 import Ubuntu.Components 1.3
20 import Wizard 0.1
21-import Ubuntu.SystemSettings.TimeDate 1.0
22+import Ubuntu.SystemSettings.TimeDate 1.1
23 import Utils 0.1 as Utils
24 import ".." as LocalComponents
25
26@@ -30,6 +30,7 @@
27 forwardButtonSourceComponent: forwardButton
28
29 property string selectedTimeZone: ""
30+ property string selectedTimeZoneName: ""
31 readonly property bool showingMap: wideMode && width >= units.gu(110)
32
33 // for testing
34@@ -67,6 +68,7 @@
35
36 function resetViews() {
37 selectedTimeZone = ""
38+ selectedTimeZoneName = ""
39 tzList.currentIndex = -1
40 highlightImage.source = ""
41 pinImage.x = 0;
42@@ -144,6 +146,7 @@
43 highlightTimezone(offset);
44 ListView.view.currentIndex = index;
45 selectedTimeZone = timeZone;
46+ selectedTimeZoneName = city;
47 //print("Clicked at city with coords:", longitude, latitude);
48 //print("Clicked on TZ:", timeZone);
49 //print("Highlight at (x,y):", longitudeToX(longitude, map.width), latitudeToY(latitude, map.height));
50@@ -267,7 +270,7 @@
51 text: i18n.tr("Next")
52 enabled: selectedTimeZone != ""
53 onClicked: {
54- timeDatePanel.timeZone = selectedTimeZone;
55+ timeDatePanel.setTimeZone(selectedTimeZone, selectedTimeZoneName);
56 pageStack.next();
57 }
58 }
59
60=== modified file 'tests/mocks/Ubuntu/SystemSettings/TimeDate/CMakeLists.txt'
61--- tests/mocks/Ubuntu/SystemSettings/TimeDate/CMakeLists.txt 2015-12-04 14:13:49 +0000
62+++ tests/mocks/Ubuntu/SystemSettings/TimeDate/CMakeLists.txt 2016-04-05 20:31:10 +0000
63@@ -1,1 +1,1 @@
64-add_unity8_mock(Ubuntu.SystemSettings.TimeDate 1.0 Ubuntu/SystemSettings/TimeDate)
65+add_unity8_mock(Ubuntu.SystemSettings.TimeDate 1.1 Ubuntu/SystemSettings/TimeDate)
66
67=== modified file 'tests/mocks/Ubuntu/SystemSettings/TimeDate/MockTimeDate.qml'
68--- tests/mocks/Ubuntu/SystemSettings/TimeDate/MockTimeDate.qml 2015-12-06 14:58:57 +0000
69+++ tests/mocks/Ubuntu/SystemSettings/TimeDate/MockTimeDate.qml 2016-04-05 20:31:10 +0000
70@@ -18,8 +18,20 @@
71
72 Item {
73 id: root
74- property string timeZone: "Europe/Prague"
75- onTimeZoneChanged: root.timeZoneChangedCalled(root.timeZone);
76-
77- signal timeZoneChangedCalled(string tz);
78+ readonly property alias timeZone: d.timeZone
79+ readonly property alias timeZoneName: d.timeZoneName
80+
81+ signal timeZoneChangedCalled(string tz, string name) // only in mock
82+
83+ function setTimeZone(tz, name) {
84+ d.timeZone = tz;
85+ d.timeZoneName = name;
86+ timeZoneChangedCalled(tz, name);
87+ }
88+
89+ QtObject {
90+ id: d
91+ property string timeZone: "Europe/Prague"
92+ property string timeZoneName: "Prague"
93+ }
94 }
95
96=== modified file 'tests/mocks/Ubuntu/SystemSettings/TimeDate/qmldir'
97--- tests/mocks/Ubuntu/SystemSettings/TimeDate/qmldir 2015-12-04 14:13:49 +0000
98+++ tests/mocks/Ubuntu/SystemSettings/TimeDate/qmldir 2016-04-05 20:31:10 +0000
99@@ -1,2 +1,2 @@
100 module Ubuntu.SystemSettings.TimeDate
101-UbuntuTimeDatePanel 1.0 MockTimeDate.qml
102+UbuntuTimeDatePanel 1.1 MockTimeDate.qml
103
104=== modified file 'tests/qmltests/Wizard/tst_Wizard.qml'
105--- tests/qmltests/Wizard/tst_Wizard.qml 2016-03-16 23:26:58 +0000
106+++ tests/qmltests/Wizard/tst_Wizard.qml 2016-04-05 20:31:10 +0000
107@@ -21,7 +21,7 @@
108 import QMenuModel 0.1
109 import Ubuntu.Components 1.3
110 import Ubuntu.SystemSettings.SecurityPrivacy 1.0
111-import Ubuntu.SystemSettings.TimeDate 1.0
112+import Ubuntu.SystemSettings.TimeDate 1.1
113 import Unity.Test 0.1 as UT
114 import Wizard 0.1
115 import "../../../qml/Wizard"
116@@ -463,7 +463,7 @@
117 var tzFilter = findChild(page, "tzFilter");
118 verify(tzFilter);
119 tap(tzFilter);
120- typeString("London");
121+ typeString("Belfa");
122
123 var tzList = findChild(page, "tzList");
124 verify(tzList);
125@@ -477,7 +477,8 @@
126 // go next and verify the (mock) signal got fired
127 tap(findChild(page, "forwardButton"));
128 tryCompare(timezoneSpy, "count", 1);
129- tryCompare(page.tdModule, "timeZone", timezoneSpy.signalArguments[0][0]);
130+ compare(timezoneSpy.signalArguments[0][0], "Europe/London");
131+ compare(timezoneSpy.signalArguments[0][1], "Belfast");
132 }
133
134 function test_accountPage() {

Subscribers

People subscribed via source and target branches