Merge lp:~martin-borho/ubuntu-weather-app/SheetsVisuals into lp:ubuntu-weather-app/obsolete.trunk

Proposed by Martin Borho
Status: Merged
Approved by: Raúl Yeguas
Approved revision: 114
Merged at revision: 112
Proposed branch: lp:~martin-borho/ubuntu-weather-app/SheetsVisuals
Merge into: lp:ubuntu-weather-app/obsolete.trunk
Diff against target: 678 lines (+350/-152)
5 files modified
components/AddLocationSheet.qml (+23/-26)
components/CountryCodes.js (+253/-0)
components/LocationManagerSheet.qml (+64/-11)
resources/images/search_item@8.svg (+0/-105)
tests/autopilot/ubuntu_weather_app/tests/test_locationmanager.py (+10/-10)
To merge this branch: bzr merge lp:~martin-borho/ubuntu-weather-app/SheetsVisuals
Reviewer Review Type Date Requested Status
Raúl Yeguas Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+185317@code.launchpad.net

Commit message

Visual improvements and fixes to LocationManagerSheet and AddLocationSheet, fixes bug #1198541 and bug #1221734

Description of the change

* adjusted height of location list fixes, bug #1221734
* modified LocationManager and AddLocationSheet to be more in line with visual design
* added country name to location in listings, bug #1198541

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Raúl Yeguas (neokore) wrote :

Great work, Martin. Now it looks much better.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'components/AddLocationSheet.qml'
2--- components/AddLocationSheet.qml 2013-09-10 12:44:30 +0000
3+++ components/AddLocationSheet.qml 2013-09-12 16:37:53 +0000
4@@ -20,6 +20,7 @@
5 import Ubuntu.Components 0.1
6 import Ubuntu.Components.Popups 0.1
7 import Ubuntu.Components.ListItems 0.1 as ListItem
8+import "CountryCodes.js" as Countries
9
10 Component {
11
12@@ -37,7 +38,7 @@
13 {"coord":{"lon":116.397232,"lat":39.907501},"service_id":1816670,"name":"Beijing","country":"CN","service":"openweathermap"},
14 {"coord":{"lon":-58.377232,"lat":-34.613152},"service_id":3435910,"name":"Buenos Aires","country":"AR","service":"openweathermap"},
15 {"coord":{"lon":31.24967,"lat":30.06263},"service_id":360630,"name":"Cairo","country":"EG","service":"openweathermap"},
16- {"coord":{"lon":18.422,"lat":-33.9191},"service_id":3369157,"name":"Cape Town","country":"South Africa","service":"openweathermap"},
17+ {"coord":{"lon":18.422,"lat":-33.9191},"service_id":3369157,"name":"Cape Town","country":"ZA","service":"openweathermap"},
18 {"coord":{"lon":10,"lat":53.549999},"service_id":2911298,"name":"Hamburg","country":"DE","service":"openweathermap"},
19 {"coord":{"lon":73.043289,"lat":33.721481},"service_id":1176615,"name":"Islamabad","country":"PK","service":"openweathermap"},
20 {"coord":{"lon":-0.12574,"lat":51.50853},"service_id":2643743,"name":"London","country":"GB","service":"openweathermap"},
21@@ -116,7 +117,7 @@
22 TextField {
23 id: locationString
24 objectName: "SearchField"
25- width: parent.width-units.gu(3)
26+ width: parent.width
27 height:parent.height
28 placeholderText: i18n.tr("Enter a city name")
29 hasClearButton: true
30@@ -129,29 +130,13 @@
31 source: Qt.resolvedUrl("../resources/images/search.svg")
32 }
33 }
34- Image {
35- id: searchButton
36- source: Qt.resolvedUrl("../resources/images/search_item.svg")
37- height: parent.height
38- width: parent.height
39- anchors {
40- right: parent.right
41- rightMargin: -units.gu(1)
42- top: parent.top
43- }
44- visible: !searching.running
45- MouseArea {
46- anchors.fill: parent
47- onClicked: doSearch()
48- }
49- }
50 ActivityIndicator {
51 id: searching
52 objectName: "SearchingSpinner"
53 anchors {
54- verticalCenter: searchButton.verticalCenter
55- left: searchButton.left
56- leftMargin: units.gu(1.5)
57+ right: locationString.right
58+ rightMargin: units.gu(2)
59+ verticalCenter: locationString.verticalCenter
60 }
61 }
62 }
63@@ -180,7 +165,7 @@
64 left: parent.left
65 leftMargin: units.gu(1)
66 }
67- font.pointSize: FontUtils.sizeToPixels("medium")
68+ fontSize: "medium"
69 }
70 }
71 }
72@@ -194,16 +179,28 @@
73 section.criteria: ViewSection.FirstCharacter
74 section.delegate: sectionHeading;
75 section.labelPositioning: ViewSection.InlineLabels
76- delegate: ListItem.Standard {
77+ delegate: ListItem.Standard {
78 Label {
79+ id: searchResultName
80 objectName: "searchResult" + index
81- text: i18n.tr(name)+((country) ? ', '+i18n.tr(country): '');
82+ text: name
83+ anchors {
84+ top: parent.top
85+ topMargin: units.gu(0.5)
86+ left: parent.left
87+ leftMargin: units.gu(3)
88+ }
89 fontSize: "large"
90+ }
91+ Label {
92+ text: (Countries.codes[country]) ? i18n.tr(Countries.codes[country]): country
93 anchors {
94+ top: searchResultName.bottom
95+ bottom: parent.bottom
96 left: parent.left
97- leftMargin: units.gu(2)
98- verticalCenter: parent.verticalCenter
99+ leftMargin: units.gu(3)
100 }
101+ fontSize: "small"
102 }
103 onClicked: {
104 var location = citiesModel.get(index)
105
106=== added file 'components/CountryCodes.js'
107--- components/CountryCodes.js 1970-01-01 00:00:00 +0000
108+++ components/CountryCodes.js 2013-09-12 16:37:53 +0000
109@@ -0,0 +1,253 @@
110+.pragma library
111+
112+var codes = {
113+ "AF": "Afghanistan",
114+ "AX": "Åland Islands",
115+ "AL": "Albania",
116+ "DZ": "Algeria",
117+ "AS": "American Samoa",
118+ "AD": "Andorra",
119+ "AO": "Angola",
120+ "AI": "Anguilla",
121+ "AQ": "Antarctica",
122+ "AG": "Antigua and Barbuda",
123+ "AR": "Argentina",
124+ "AM": "Armenia",
125+ "AW": "Aruba",
126+ "AU": "Australia",
127+ "AT": "Austria",
128+ "AZ": "Azerbaijan",
129+ "BS": "Bahamas",
130+ "BH": "Bahrain",
131+ "BD": "Bangladesh",
132+ "BB": "Barbados",
133+ "BY": "Belarus",
134+ "BE": "Belgium",
135+ "BZ": "Belize",
136+ "BJ": "Benin",
137+ "BM": "Bermuda",
138+ "BT": "Bhutan",
139+ "BO": "Bolivia, Plurinational State of",
140+ "BQ": "Bonaire, Sint Eustatius and Saba",
141+ "BA": "Bosnia and Herzegovina",
142+ "BW": "Botswana",
143+ "BV": "Bouvet Island",
144+ "BR": "Brazil",
145+ "IO": "British Indian Ocean Territory",
146+ "BN": "Brunei Darussalam",
147+ "BG": "Bulgaria",
148+ "BF": "Burkina Faso",
149+ "BI": "Burundi",
150+ "KH": "Cambodia",
151+ "CM": "Cameroon",
152+ "CA": "Canada",
153+ "CV": "Cape Verde",
154+ "KY": "Cayman Islands",
155+ "CF": "Central African Republic",
156+ "TD": "Chad",
157+ "CL": "Chile",
158+ "CN": "China",
159+ "CX": "Christmas Island",
160+ "CC": "Cocos (Keeling) Islands",
161+ "CO": "Colombia",
162+ "KM": "Comoros",
163+ "CG": "Congo",
164+ "CD": "Congo, the Democratic Republic of the",
165+ "CK": "Cook Islands",
166+ "CR": "Costa Rica",
167+ "CI": "Côte d'Ivoire",
168+ "HR": "Croatia",
169+ "CU": "Cuba",
170+ "CW": "Curaçao",
171+ "CY": "Cyprus",
172+ "CZ": "Czech Republic",
173+ "DK": "Denmark",
174+ "DJ": "Djibouti",
175+ "DM": "Dominica",
176+ "DO": "Dominican Republic",
177+ "EC": "Ecuador",
178+ "EG": "Egypt",
179+ "SV": "El Salvador",
180+ "GQ": "Equatorial Guinea",
181+ "ER": "Eritrea",
182+ "EE": "Estonia",
183+ "ET": "Ethiopia",
184+ "FK": "Falkland Islands (Malvinas)",
185+ "FO": "Faroe Islands",
186+ "FJ": "Fiji",
187+ "FI": "Finland",
188+ "FR": "France",
189+ "GF": "French Guiana",
190+ "PF": "French Polynesia",
191+ "TF": "French Southern Territories",
192+ "GA": "Gabon",
193+ "GM": "Gambia",
194+ "GE": "Georgia",
195+ "DE": "Germany",
196+ "GH": "Ghana",
197+ "GI": "Gibraltar",
198+ "GR": "Greece",
199+ "GL": "Greenlan",
200+ "GD": "Grenada",
201+ "GP": "Guadeloupe",
202+ "GU": "Guam",
203+ "GT": "Guatemala",
204+ "GG": "Guernsey",
205+ "GN": "Guinea",
206+ "GW": "Guinea-Bissau",
207+ "GY": "Guyana",
208+ "HT": "Haiti",
209+ "HM": "Heard Island and McDonald Islands",
210+ "VA": "Holy See (Vatican City State)",
211+ "HN": "Honduras",
212+ "HK": "Hong Kong",
213+ "HU": "Hungary",
214+ "IS": "Iceland",
215+ "IN": "India",
216+ "ID": "Indonesia",
217+ "IR": "Iran, Islamic Republic of",
218+ "IQ": "Iraq",
219+ "IE": "Ireland",
220+ "IM": "Isle of Man",
221+ "IL": "Israel",
222+ "IT": "Italy",
223+ "JM": "Jamaica",
224+ "JP": "Japan",
225+ "JE": "Jersey",
226+ "JO": "Jordan",
227+ "KZ": "Kazakhstan",
228+ "KE": "Kenya",
229+ "KI": "Kiribati",
230+ "KP": "Korea, Democratic People's Republic of",
231+ "KR": "Korea, Republic of",
232+ "KW": "Kuwait",
233+ "KG": "Kyrgyzstan",
234+ "LA": "Lao People's Democratic Republic",
235+ "LV": "Latvia",
236+ "LB": "Lebanon",
237+ "LS": "Lesotho",
238+ "LR": "Liberia",
239+ "LY": "Libya",
240+ "LI": "Liechtenstein",
241+ "LT": "Lithuania",
242+ "LU": "Luxembourg",
243+ "MO": "Macao",
244+ "MK": "Macedonia, The Former Yugoslav Republic of",
245+ "MG": "Madagascar",
246+ "MW": "Malawi",
247+ "MY": "Malaysia",
248+ "MV": "Maldives",
249+ "ML": "Mali",
250+ "MT": "Malta",
251+ "MH": "Marshall Islands",
252+ "MQ": "Martinique",
253+ "MR": "Mauritania",
254+ "MU": "Mauritius",
255+ "YT": "Mayotte",
256+ "MX": "Mexico",
257+ "FM": "Micronesia, Federated States of",
258+ "MD": "Moldova, Republic of",
259+ "MC": "Monaco",
260+ "MN": "Mongolia",
261+ "ME": "Montenegro",
262+ "MS": "Montserrat",
263+ "MA": "Morocco",
264+ "MZ": "Mozambique",
265+ "MM": "Myanmar",
266+ "NA": "Namibia",
267+ "NR": "Nauru",
268+ "NP": "Nepal",
269+ "NL": "Netherlands",
270+ "NC": "New Caledonia",
271+ "NZ": "New Zealand",
272+ "NI": "Nicaragua",
273+ "NE": "Niger",
274+ "NG": "Nigeria",
275+ "NU": "Niue",
276+ "NF": "Norfolk Island",
277+ "MP": "Northern Mariana Islands",
278+ "NO": "Norway",
279+ "OM": "Oman",
280+ "PK": "Pakistan",
281+ "PW": "Palau",
282+ "PS": "Palestine, State of",
283+ "PA": "Panama",
284+ "PG": "Papua New Guinea",
285+ "PY": "Paraguay",
286+ "PE": "Peru",
287+ "PH": "Philippines",
288+ "PN": "Pitcairn",
289+ "PL": "Poland",
290+ "PT": "Portugal",
291+ "PR": "Puerto Rico",
292+ "QA": "Qatar",
293+ "RE": "Réunion",
294+ "RO": "Romania",
295+ "RU": "Russian Federation",
296+ "RW": "Rwanda",
297+ "BL": "Saint Barthélemy",
298+ "SH": "Saint Helena, Ascension and Tristan da Cunha",
299+ "KN": "Saint Kitts and Nevis",
300+ "LC": "Saint Lucia",
301+ "MF": "Saint Martin (French part)",
302+ "PM": "Saint Pierre and Miquelon",
303+ "VC": "Saint Vincent and the Grenadines",
304+ "WS": "Samoa",
305+ "SM": "San Marino",
306+ "ST": "Sao Tome and Principe",
307+ "SA": "Saudi Arabia",
308+ "SN": "Senegal",
309+ "RS": "Serbia",
310+ "SC": "Seychelles",
311+ "SL": "Sierra Leone",
312+ "SG": "Singapore",
313+ "SX": "Sint Maarten (Dutch part)",
314+ "SK": "Slovakia",
315+ "SI": "Slovenia",
316+ "SB": "Solomon Islands",
317+ "SO": "Somalia",
318+ "ZA": "South Africa",
319+ "GS": "South Georgia and the South Sandwich Islands",
320+ "SS": "South Sudan",
321+ "ES": "Spain",
322+ "LK": "Sri Lanka",
323+ "SD": "Sudan",
324+ "SR": "Suriname",
325+ "SJ": "Svalbard and Jan Mayen",
326+ "SZ": "Swaziland",
327+ "SE": "Sweden",
328+ "CH": "Switzerland",
329+ "SY": "Syrian Arab Republic",
330+ "TW": "Taiwan, Province of China",
331+ "TJ": "Tajikistan",
332+ "TZ": "Tanzania, United Republic of",
333+ "TH": "Thailand",
334+ "TL": "Timor-Leste",
335+ "TG": "Togo",
336+ "TK": "Tokelau",
337+ "TO": "Tonga",
338+ "TT": "Trinidad and Tobago",
339+ "TN": "Tunisia",
340+ "TR": "Turkey",
341+ "TM": "Turkmenistan",
342+ "TC": "Turks and Caicos Islands",
343+ "TV": "Tuvalu",
344+ "UG": "Uganda",
345+ "UA": "Ukraine",
346+ "AE": "United Arab Emirates",
347+ "GB": "United Kingdom",
348+ "US": "United States",
349+ "UM": "United States Minor Outlying Islands",
350+ "UY": "Uruguay",
351+ "UZ": "Uzbekistan",
352+ "VU": "Vanuatu",
353+ "VE": "Venezuela, Bolivarian Republic of",
354+ "VN": "Viet Nam",
355+ "VG": "Virgin Islands, British",
356+ "VI": "Virgin Islands, U.S.",
357+ "WF": "Wallis and Futuna",
358+ "EH": "Western Sahara",
359+ "YE": "Yemen",
360+ "ZM": "Zambia",
361+ "ZW": "Zimbabwe"
362+}
363
364=== modified file 'components/LocationManagerSheet.qml'
365--- components/LocationManagerSheet.qml 2013-08-04 01:23:02 +0000
366+++ components/LocationManagerSheet.qml 2013-09-12 16:37:53 +0000
367@@ -21,6 +21,7 @@
368 import Ubuntu.Components 0.1
369 import Ubuntu.Components.Popups 0.1
370 import Ubuntu.Components.ListItems 0.1 as ListItem
371+import "CountryCodes.js" as Countries
372
373 Component {
374 id: locationManagerComponent
375@@ -80,9 +81,13 @@
376 height: units.gu(5)
377 color: "transparent"
378 Label {
379- anchors.verticalCenter: parent.verticalCenter
380 text: " "+i18n.tr("Current location")
381- fontSize: "large"
382+ anchors {
383+ verticalCenter: parent.verticalCenter
384+ left: parent.left
385+ leftMargin: units.gu(1)
386+ }
387+ fontSize: "medium"
388 }
389 }
390 Rectangle {
391@@ -92,8 +97,16 @@
392 }
393 ListItem.Standard {
394 id: locationLookupItem
395- text: i18n.tr("Lookup location")+" (Dummy)"
396 progression: true
397+ Label {
398+ text: i18n.tr("Lookup location")+" (Dummy)"
399+ anchors {
400+ verticalCenter: parent.verticalCenter
401+ left: parent.left
402+ leftMargin: units.gu(3)
403+ }
404+ fontSize: "large"
405+ }
406 onClicked: {
407 print("TODO: lookup current location")
408 visible = false
409@@ -103,7 +116,15 @@
410 ListItem.Standard {
411 id: currentLocationItem
412 visible: false
413- text: i18n.tr("London")
414+ Label {
415+ text: "London"
416+ anchors {
417+ verticalCenter: parent.verticalCenter
418+ left: parent.left
419+ leftMargin: units.gu(3)
420+ }
421+ fontSize: "large"
422+ }
423 control: Button {
424 objectName: "currentLocationItem"
425 id: lookupItemAddButton
426@@ -124,9 +145,13 @@
427 height: units.gu(5)
428 color: "transparent"
429 Label {
430- anchors.verticalCenter: parent.verticalCenter
431 text: " "+i18n.tr("World")
432- fontSize: "large"
433+ anchors {
434+ verticalCenter: parent.verticalCenter
435+ left: parent.left
436+ leftMargin: units.gu(1)
437+ }
438+ fontSize: "medium"
439 }
440 }
441 Rectangle {
442@@ -138,15 +163,35 @@
443 width: parent.width
444 clip:true
445 color:"transparent"
446- height: units.gu(45)
447-
448+ height: locationManagerSheet.height-locationLookupItem.height-units.gu(19.2)
449 ListView {
450 objectName: "LocationList"
451 anchors.fill: parent
452 model: locationModel
453 delegate: ListItem.Standard {
454- objectName: "existingLocation" + index
455- text: model.name
456+ objectName: "existingLocationItem" + index
457+ Label {
458+ id: searchResultName
459+ objectName: "existingLocation" + index
460+ text: name
461+ anchors {
462+ top: parent.top
463+ topMargin: units.gu(0.5)
464+ left: parent.left
465+ leftMargin: units.gu(3)
466+ }
467+ fontSize: "large"
468+ }
469+ Label {
470+ text: (Countries.codes[country]) ? i18n.tr(Countries.codes[country]): country
471+ anchors {
472+ top: searchResultName.bottom
473+ bottom: parent.bottom
474+ left: parent.left
475+ leftMargin: units.gu(3)
476+ }
477+ fontSize: "small"
478+ }
479 removable: true
480 onItemRemoved: {
481 var location = locationModel.get(index)
482@@ -163,8 +208,16 @@
483 }
484 footer: ListItem.Standard {
485 objectName: "AddCityListItem"
486- text: i18n.tr("Add city")
487 progression: true
488+ Label {
489+ text: i18n.tr("Add city")
490+ anchors {
491+ verticalCenter: parent.verticalCenter
492+ left: parent.left
493+ leftMargin: units.gu(3)
494+ }
495+ fontSize: "large"
496+ }
497 onClicked: {
498 PopupUtils.open(addLocationSheet)
499 }
500
501=== removed file 'resources/images/search_item@8.svg'
502--- resources/images/search_item@8.svg 2013-09-10 08:54:21 +0000
503+++ resources/images/search_item@8.svg 1970-01-01 00:00:00 +0000
504@@ -1,105 +0,0 @@
505-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
506-<!-- Created with Inkscape (http://www.inkscape.org/) -->
507-
508-<svg
509- xmlns:dc="http://purl.org/dc/elements/1.1/"
510- xmlns:cc="http://creativecommons.org/ns#"
511- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
512- xmlns:svg="http://www.w3.org/2000/svg"
513- xmlns="http://www.w3.org/2000/svg"
514- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
515- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
516- id="svg2"
517- version="1.1"
518- inkscape:version="0.48.4 r9939"
519- width="40"
520- height="32"
521- sodipodi:docname="search_item@8.svg">
522- <metadata
523- id="metadata8">
524- <rdf:RDF>
525- <cc:Work
526- rdf:about="">
527- <dc:format>image/svg+xml</dc:format>
528- <dc:type
529- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
530- <dc:title />
531- </cc:Work>
532- </rdf:RDF>
533- </metadata>
534- <defs
535- id="defs6">
536- <linearGradient
537- id="linearGradient4265">
538- <stop
539- style="stop-color:#333333;stop-opacity:1;"
540- offset="0"
541- id="stop4267" />
542- <stop
543- id="stop4273"
544- offset="0.5"
545- style="stop-color:#333333;stop-opacity:0.24855492;" />
546- <stop
547- style="stop-color:#333333;stop-opacity:0;"
548- offset="1"
549- id="stop4269" />
550- </linearGradient>
551- </defs>
552- <sodipodi:namedview
553- pagecolor="#ffffff"
554- bordercolor="#666666"
555- borderopacity="1"
556- objecttolerance="10"
557- gridtolerance="10"
558- guidetolerance="10"
559- inkscape:pageopacity="0"
560- inkscape:pageshadow="2"
561- inkscape:window-width="1855"
562- inkscape:window-height="1056"
563- id="namedview4"
564- showgrid="false"
565- showguides="true"
566- inkscape:guide-bbox="true"
567- inkscape:zoom="45.254834"
568- inkscape:cx="12.76993"
569- inkscape:cy="14.390292"
570- inkscape:window-x="65"
571- inkscape:window-y="24"
572- inkscape:window-maximized="1"
573- inkscape:current-layer="svg2"
574- inkscape:snap-bbox="false">
575- <sodipodi:guide
576- orientation="0,1"
577- position="53.5,37.5"
578- id="guide3007" />
579- </sodipodi:namedview>
580- <rect
581- style="fill:#d05164;fill-opacity:1;stroke:none"
582- id="rect2982-5"
583- width="8.0715103"
584- height="31.993458"
585- x="1.6336422"
586- y="0.0012737503"
587- ry="0" />
588- <rect
589- style="fill:#d05164;fill-opacity:1;stroke:none"
590- id="rect2982"
591- width="36.046421"
592- height="31.998526"
593- x="1.6873904"
594- y="0.0084995022"
595- ry="8.0643663" />
596- <path
597- id="path2987-23-0-9-7-5"
598- style="fill:#ffffff;fill-opacity:1;stroke-width:1.5406878;stroke-miterlimit:4;stroke-dasharray:1.5406878, 6.1627512;stroke-dashoffset:0.7703439"
599- d="m 20.969828,18.441773 c 0,0.888623 -0.720412,1.608978 -1.609035,1.608978 -0.888622,0 -1.608979,-0.720355 -1.608979,-1.608978 0,-0.888624 0.720357,-1.609036 1.608979,-1.609036 0.888623,0 1.609035,0.720412 1.609035,1.609036 z m 2.380792,-3.519786 c 0,0.888623 -0.720356,1.609033 -1.608978,1.609033 -0.888624,0 -1.609036,-0.72041 -1.609036,-1.609033 0,-0.888623 0.720412,-1.60898 1.609036,-1.60898 0.888622,0 1.608978,0.720357 1.608978,1.60898 z m -4.715156,-9.78e-4 c 0,0.888623 -0.720355,1.608978 -1.608978,1.608978 -0.888624,0 -1.608979,-0.720355 -1.608979,-1.608978 0,-0.888623 0.720355,-1.609035 1.608979,-1.609035 0.888623,0 1.608978,0.720412 1.608978,1.609035 z m 7.24089,-3.684795 c 0,0.979475 -0.794056,1.773531 -1.773588,1.773531 -0.979531,0 -1.773586,-0.794056 -1.773586,-1.773531 0,-0.979531 0.794055,-1.7735855 1.773586,-1.7735855 0.979532,0 1.773588,0.7940545 1.773588,1.7735855 z m -4.708009,0.01713 c 0,0.979531 -0.794056,1.773586 -1.773532,1.773586 -0.979531,0 -1.773586,-0.794055 -1.773586,-1.773586 0,-0.979531 0.794055,-1.7735296 1.773586,-1.7735296 0.979476,0 1.773532,0.7939986 1.773532,1.7735296 z m -4.760671,-0.01713 c 0,0.979531 -0.794056,1.773586 -1.773587,1.773586 -0.979531,-1.5e-5 -1.773586,-0.794069 -1.773586,-1.7736 0,-0.979476 0.794055,-1.7735311 1.773586,-1.7735311 0.979531,0 1.773587,0.7940551 1.773587,1.7735311 z"
600- inkscape:connector-curvature="0" />
601- <rect
602- style="fill:#323232;fill-opacity:1;stroke:none"
603- id="rect4263"
604- width="1.6118982"
605- height="32.040779"
606- x="1.6351844"
607- y="0.0034180922"
608- ry="0" />
609-</svg>
610
611=== modified file 'tests/autopilot/ubuntu_weather_app/tests/test_locationmanager.py'
612--- tests/autopilot/ubuntu_weather_app/tests/test_locationmanager.py 2013-09-10 12:44:30 +0000
613+++ tests/autopilot/ubuntu_weather_app/tests/test_locationmanager.py 2013-09-12 16:37:53 +0000
614@@ -87,14 +87,14 @@
615 # LocationManagerPage should be visible and "London" added
616 self.assertThat(lambda: self.main_window.get_object('QQuickListView', 'LocationList'), Eventually(Not(Is(None))))
617 locationList = self.main_window.get_object('QQuickListView', 'LocationList')
618- self.assertThat(lambda: self.main_window.get_object('Standard', 'existingLocation0'), Eventually(Not(Is(None))))
619- addedItem = self.main_window.get_object('Standard', "existingLocation0")
620+ self.assertThat(lambda: self.main_window.get_object('Label', 'existingLocation0'), Eventually(Not(Is(None))))
621+ addedItem = self.main_window.get_object('Label', "existingLocation0")
622 self.assertThat(addedItem.text, Eventually(Equals("London")))
623 self._click_sheet_confirm()
624
625 # back to locations, wait till data is loaded
626 load_indicator = self.main_window.get_object('ActivityIndicator', 'LoadingSpinner')
627- self.assertThat(load_indicator.running, Eventually(Equals(False)))
628+ self.assertThat(load_indicator.running, Eventually(Equals(False), timeout=120))
629
630 # only location is there
631 loadingPage = self.main_window.get_object("Tabs", "rootTabs")
632@@ -116,14 +116,14 @@
633 # LocationManagerPage should be visible and "London" added
634 self.assertThat(lambda: self.main_window.get_object('QQuickListView', 'LocationList'), Eventually(Not(Is(None))))
635 locationList = self.main_window.get_object('QQuickListView', 'LocationList')
636- self.assertThat(lambda: self.main_window.get_object('Standard', 'existingLocation0'), Eventually(Not(Is(None))))
637- addedItem = self.main_window.get_object('Standard', "existingLocation0")
638+ self.assertThat(lambda: self.main_window.get_object('Label', 'existingLocation0'), Eventually(Not(Is(None))))
639+ addedItem = self.main_window.get_object('Label', "existingLocation0")
640 self.assertThat(addedItem.text, Eventually(Equals("Hamburg")))
641 self._click_sheet_confirm()
642
643 # back to locations, wait till data is loaded
644 load_indicator = self.main_window.get_object('ActivityIndicator', 'LoadingSpinner')
645- self.assertThat(load_indicator.running, Eventually(Equals(False)))
646+ self.assertThat(load_indicator.running, Eventually(Equals(False), timeout=120))
647
648 # only location is there
649 loadingPage = self.main_window.get_object("Tabs", "rootTabs")
650@@ -147,7 +147,7 @@
651 self.assertThat(resultsList.visible, Eventually(Equals(True)))
652 self.assertThat(lambda: self.main_window.get_object('Label', 'searchResult0'), Eventually(Not(Is(None))))
653 firstResult = self.select_single_retry("Label", objectName="searchResult0")
654- self.assertThat(firstResult.text, Eventually(Equals("London, GB")))
655+ self.assertThat(firstResult.text, Eventually(Equals("London")))
656
657 # regain focus, clear search field and do another search
658 self.assertThat(lambda: self.main_window.get_object('TextField', 'SearchField'), Eventually(Not(Is(None))))
659@@ -166,7 +166,7 @@
660 self.assertThat(resultsList.visible, Eventually(Equals(True)))
661 self.assertThat(lambda: self.main_window.get_object('Label', 'searchResult0'), Eventually(Not(Is(None))))
662 firstResult = self.select_single_retry("Label", objectName="searchResult0")
663- self.assertThat(firstResult.text, Eventually(Equals("Hamburg, DE")))
664+ self.assertThat(firstResult.text, Eventually(Equals("Hamburg")))
665
666 def test_cancel_adding_location(self):
667 """Cancel the cities search"""
668@@ -209,8 +209,8 @@
669 def _swipe_location_to_remove(self):
670 """Swipe right to delete the first location"""
671 number_of_locations = self._get_number_of_locations()
672- self.assertThat(lambda: self.app.select_single('Standard', objectName='existingLocation0'), Eventually(Not(Is(None))))
673- firstLocation = self.app.select_single("Standard", objectName="existingLocation0")
674+ self.assertThat(lambda: self.app.select_single('Standard', objectName='existingLocationItem0'), Eventually(Not(Is(None))))
675+ firstLocation = self.app.select_single("Standard", objectName="existingLocationItem0")
676
677 x, y, w, h = firstLocation.globalRect
678 tx = x + (w / 8)

Subscribers

People subscribed via source and target branches