Merge lp:~martin-borho/ubuntu-weather-app/icon_codes into lp:ubuntu-weather-app/obsolete.trunk
- icon_codes
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Martin Borho |
Approved revision: | 90 |
Merged at revision: | 90 |
Proposed branch: | lp:~martin-borho/ubuntu-weather-app/icon_codes |
Merge into: | lp:ubuntu-weather-app/obsolete.trunk |
Diff against target: |
741 lines (+274/-221) 10 files modified
components/AddLocationSheet.qml (+13/-11) components/LocationTab.qml (+1/-1) components/WeatherApi.js (+26/-1) components/WeatherConditionIconComponent.qml (+194/-197) tests/autopilot/ubuntu_weather_app/tests/__init__.py (+2/-2) tests/autopilot/ubuntu_weather_app/tests/test_locationmanager.py (+18/-4) tests/autopilot/ubuntu_weather_app/tests/test_mainview.py (+1/-1) tests/autopilot/ubuntu_weather_app/tests/test_settings.py (+2/-2) tests/autopilot/ubuntu_weather_app/tests/weatherdata.py (+2/-2) ubuntu-weather-app.qml (+15/-0) |
To merge this branch: | bzr merge lp:~martin-borho/ubuntu-weather-app/icon_codes |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Nicholas Skaggs (community) | Approve | ||
Ubuntu Phone Apps Jenkins Bot | continuous-integration | Approve | |
Review via email: mp+179453@code.launchpad.net |
Commit message
own icon codes added, ActivityIndicator is shown while searching for location, notification when http calls are failing
Description of the change
* added ActivityIndicator for location search
* showing a notification when http calls are failing
* using own icon-codes in weather data
* added assertions to detect when network connection is missing
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
- 89. By Martin Borho
-
autopilot: added assertions to detect when network connection is missing
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:89
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Nicholas Skaggs (nskaggs) wrote : | # |
Going to try this out -- is this ready to merge?
Nicholas Skaggs (nskaggs) : | # |
Nicholas Skaggs (nskaggs) wrote : | # |
Martin, I'll wait for you on this.. Can we bump all the timeout's to like 2 mins? Look at where it's failing in the smoke tests and bump those timeouts to 2 mins just in case there's SOME odd reason the lab device is running really really slow.
- 90. By Martin Borho
-
autopilot: increased timeouts to 120 secs
Martin Borho (martin-borho) wrote : | # |
Nicholas, the timeouts now 120 seconds!
Preview Diff
1 | === modified file 'components/AddLocationSheet.qml' | |||
2 | --- components/AddLocationSheet.qml 2013-08-02 22:35:44 +0000 | |||
3 | +++ components/AddLocationSheet.qml 2013-08-12 18:18:29 +0000 | |||
4 | @@ -34,26 +34,24 @@ | |||
5 | 34 | id: searchWorker | 34 | id: searchWorker |
6 | 35 | source: "./WeatherApi.js" | 35 | source: "./WeatherApi.js" |
7 | 36 | onMessage: { | 36 | onMessage: { |
8 | 37 | searching.running = false; | ||
9 | 37 | if(!messageObject.error) { | 38 | if(!messageObject.error) { |
10 | 38 | listView.visible = true | 39 | listView.visible = true |
11 | 39 | messageObject.result.locations.forEach(function(loc) { | 40 | messageObject.result.locations.forEach(function(loc) { |
12 | 40 | citiesModel.append(loc); | 41 | citiesModel.append(loc); |
13 | 41 | noCityError.visible = false | 42 | noCityError.visible = false |
14 | 42 | }); | 43 | }); |
15 | 44 | if (!citiesModel.count) { | ||
16 | 45 | noCityError.visible = true | ||
17 | 46 | noCityError.text = i18n.tr("No location was found for ") + locationString.text | ||
18 | 47 | } | ||
19 | 43 | } else { | 48 | } else { |
20 | 44 | console.log(messageObject.error.msg+" / "+messageObject.error.request.url) | 49 | console.log(messageObject.error.msg+" / "+messageObject.error.request.url) |
25 | 45 | } | 50 | httpFailedDialog.show(); |
22 | 46 | if (!citiesModel.count) { | ||
23 | 47 | noCityError.visible = true | ||
24 | 48 | noCityError.text = i18n.tr("No location was found for ") + locationString.text | ||
26 | 49 | } | 51 | } |
27 | 50 | } | 52 | } |
28 | 51 | } | 53 | } |
29 | 52 | 54 | ||
30 | 53 | Component.onCompleted: { | ||
31 | 54 | |||
32 | 55 | } | ||
33 | 56 | |||
34 | 57 | function clear() { | 55 | function clear() { |
35 | 58 | locationString.text = ''; | 56 | locationString.text = ''; |
36 | 59 | citiesModel.clear(); | 57 | citiesModel.clear(); |
37 | @@ -81,6 +79,7 @@ | |||
38 | 81 | hasClearButton: true | 79 | hasClearButton: true |
39 | 82 | onAccepted: { | 80 | onAccepted: { |
40 | 83 | citiesModel.clear(); | 81 | citiesModel.clear(); |
41 | 82 | searching.running = true; | ||
42 | 84 | searchWorker.sendMessage({ | 83 | searchWorker.sendMessage({ |
43 | 85 | action: "searchByName", | 84 | action: "searchByName", |
44 | 86 | params: {name:locationString.text, units:"metric"} | 85 | params: {name:locationString.text, units:"metric"} |
45 | @@ -116,11 +115,8 @@ | |||
46 | 116 | progression: true; | 115 | progression: true; |
47 | 117 | onClicked: { | 116 | onClicked: { |
48 | 118 | var location = citiesModel.get(index) | 117 | var location = citiesModel.get(index) |
49 | 119 | //locationManager.addLocation(location) | ||
50 | 120 | //mainView.newLocationAdded(location) | ||
51 | 121 | locationManagerSheet.addLocation(location) | 118 | locationManagerSheet.addLocation(location) |
52 | 122 | PopupUtils.close(addLocationSheet) | 119 | PopupUtils.close(addLocationSheet) |
53 | 123 | //pageStack.pop() | ||
54 | 124 | clear() | 120 | clear() |
55 | 125 | } | 121 | } |
56 | 126 | } | 122 | } |
57 | @@ -129,6 +125,12 @@ | |||
58 | 129 | align: Qt.AlignTrailing; | 125 | align: Qt.AlignTrailing; |
59 | 130 | } | 126 | } |
60 | 131 | } | 127 | } |
61 | 128 | ActivityIndicator{ | ||
62 | 129 | id:searching | ||
63 | 130 | objectName: "SearchingSpinner" | ||
64 | 131 | running: false | ||
65 | 132 | anchors.centerIn: parent | ||
66 | 133 | } | ||
67 | 132 | } | 134 | } |
68 | 133 | } | 135 | } |
69 | 134 | } | 136 | } |
70 | 135 | 137 | ||
71 | === modified file 'components/LocationTab.qml' | |||
72 | --- components/LocationTab.qml 2013-08-05 18:53:33 +0000 | |||
73 | +++ components/LocationTab.qml 2013-08-12 18:18:29 +0000 | |||
74 | @@ -81,7 +81,7 @@ | |||
75 | 81 | tempMax: (dailyForecasts[x]["current"] !== undefined) ? dailyForecasts[x][units].tempMax : | 81 | tempMax: (dailyForecasts[x]["current"] !== undefined) ? dailyForecasts[x][units].tempMax : |
76 | 82 | null, | 82 | null, |
77 | 83 | cond: dailyForecasts[x].condition.id, | 83 | cond: dailyForecasts[x].condition.id, |
79 | 84 | condIcon: dailyForecasts[x].condition.icon, | 84 | condIcon: dailyForecasts[x].icon, |
80 | 85 | wind_speed: dailyForecasts[x][units].windSpeed, | 85 | wind_speed: dailyForecasts[x][units].windSpeed, |
81 | 86 | wind_dir: direction, | 86 | wind_dir: direction, |
82 | 87 | humid: dailyForecasts[x].humidity, | 87 | humid: dailyForecasts[x].humidity, |
83 | 88 | 88 | ||
84 | === modified file 'components/WeatherApi.js' | |||
85 | --- components/WeatherApi.js 2013-08-05 18:53:33 +0000 | |||
86 | +++ components/WeatherApi.js 2013-08-12 18:18:29 +0000 | |||
87 | @@ -3,7 +3,7 @@ | |||
88 | 3 | * Version of the response data format. | 3 | * Version of the response data format. |
89 | 4 | * Increase this number to force a refresh. | 4 | * Increase this number to force a refresh. |
90 | 5 | */ | 5 | */ |
92 | 6 | var RESPONSE_DATA_VERSION = 20130801; | 6 | var RESPONSE_DATA_VERSION = 20130808; |
93 | 7 | 7 | ||
94 | 8 | /** | 8 | /** |
95 | 9 | * Helper functions | 9 | * Helper functions |
96 | @@ -21,12 +21,35 @@ | |||
97 | 21 | return ms*3.6; | 21 | return ms*3.6; |
98 | 22 | } | 22 | } |
99 | 23 | 23 | ||
100 | 24 | |||
101 | 25 | |||
102 | 24 | var OpenWeatherMapApi = (function() { | 26 | var OpenWeatherMapApi = (function() { |
103 | 25 | /** | 27 | /** |
104 | 26 | provides neccessary methods for requesting and preparing data from OpenWeatherMap.org | 28 | provides neccessary methods for requesting and preparing data from OpenWeatherMap.org |
105 | 27 | */ | 29 | */ |
106 | 28 | var _baseUrl = "http://api.openweathermap.org/data/2.5/"; | 30 | var _baseUrl = "http://api.openweathermap.org/data/2.5/"; |
107 | 29 | // | 31 | // |
108 | 32 | var _icon_map = { | ||
109 | 33 | "01d": "clear_day", | ||
110 | 34 | "01n": "clear_night", | ||
111 | 35 | "02d": "few_clouds_day", | ||
112 | 36 | "02n": "few_clouds_night", | ||
113 | 37 | "03d": "scattered_clouds_day", | ||
114 | 38 | "03n": "scattered_clouds_night", | ||
115 | 39 | "04d": "broken_clouds_day", | ||
116 | 40 | "04n": "broken_clouds_night", | ||
117 | 41 | "09d": "shower_rain_day", | ||
118 | 42 | "09n": "shower_rain_night", | ||
119 | 43 | "10d": "rain_day", | ||
120 | 44 | "10n": "rain_night", | ||
121 | 45 | "11d": "thunderstorm_day", | ||
122 | 46 | "11n": "thunderstorm_night", | ||
123 | 47 | "13d": "snow_day", | ||
124 | 48 | "13n": "snow_night", | ||
125 | 49 | "50d": "mist_day", | ||
126 | 50 | "50n": "mist_night" | ||
127 | 51 | } | ||
128 | 52 | // | ||
129 | 30 | function _buildSearchResult(request, data) { | 53 | function _buildSearchResult(request, data) { |
130 | 31 | var searchResult = { locations: [], request: request }; | 54 | var searchResult = { locations: [], request: request }; |
131 | 32 | if(data.cod === "200" && data.list) { | 55 | if(data.cod === "200" && data.list) { |
132 | @@ -53,6 +76,7 @@ | |||
133 | 53 | humidity: data.main.humidity, | 76 | humidity: data.main.humidity, |
134 | 54 | pressure: data.main.pressure, | 77 | pressure: data.main.pressure, |
135 | 55 | windDeg: data.main.deg, | 78 | windDeg: data.main.deg, |
136 | 79 | icon: _icon_map[data.weather[0].icon], | ||
137 | 56 | condition: data.weather[0] | 80 | condition: data.weather[0] |
138 | 57 | }; | 81 | }; |
139 | 58 | if(data.id !== undefined) { | 82 | if(data.id !== undefined) { |
140 | @@ -80,6 +104,7 @@ | |||
141 | 80 | }, | 104 | }, |
142 | 81 | pressure: data.pressure, | 105 | pressure: data.pressure, |
143 | 82 | humidity: data.humidity, | 106 | humidity: data.humidity, |
144 | 107 | icon: _icon_map[data.weather[0].icon], | ||
145 | 83 | condition: data.weather[0], | 108 | condition: data.weather[0], |
146 | 84 | windDeg: data.deg, | 109 | windDeg: data.deg, |
147 | 85 | hourly: [] | 110 | hourly: [] |
148 | 86 | 111 | ||
149 | === modified file 'components/WeatherConditionIconComponent.qml' | |||
150 | --- components/WeatherConditionIconComponent.qml 2013-06-14 15:34:09 +0000 | |||
151 | +++ components/WeatherConditionIconComponent.qml 2013-08-12 18:18:29 +0000 | |||
152 | @@ -19,9 +19,6 @@ | |||
153 | 19 | property bool __fog: false | 19 | property bool __fog: false |
154 | 20 | 20 | ||
155 | 21 | onConditionChanged: { | 21 | onConditionChanged: { |
156 | 22 | // hotfix for inaccurate api data | ||
157 | 23 | // see http://bugs.openweathermap.org/issues/72 | ||
158 | 24 | if(condition === "10") condition ="10d" | ||
159 | 25 | weatherCondition.state = condition | 22 | weatherCondition.state = condition |
160 | 26 | } | 23 | } |
161 | 27 | 24 | ||
162 | @@ -575,7 +572,7 @@ | |||
163 | 575 | 572 | ||
164 | 576 | states: [ | 573 | states: [ |
165 | 577 | State { | 574 | State { |
167 | 578 | name: "01d" | 575 | name: "clear_day" |
168 | 579 | StateChangeScript { | 576 | StateChangeScript { |
169 | 580 | script: { | 577 | script: { |
170 | 581 | if(__moon) anim_moon2sun.start(); else if(!__sun) anim_sunIn.start(); | 578 | if(__moon) anim_moon2sun.start(); else if(!__sun) anim_sunIn.start(); |
171 | @@ -590,7 +587,7 @@ | |||
172 | 590 | } | 587 | } |
173 | 591 | }, | 588 | }, |
174 | 592 | State { | 589 | State { |
176 | 593 | name: "01n" | 590 | name: "clear_night" |
177 | 594 | StateChangeScript { | 591 | StateChangeScript { |
178 | 595 | script: { | 592 | script: { |
179 | 596 | if(__sun) anim_sun2moon.start(); else if(!__moon) anim_moonIn.start(); | 593 | if(__sun) anim_sun2moon.start(); else if(!__moon) anim_moonIn.start(); |
180 | @@ -605,7 +602,7 @@ | |||
181 | 605 | } | 602 | } |
182 | 606 | }, | 603 | }, |
183 | 607 | State { | 604 | State { |
185 | 608 | name: "02d" | 605 | name: "few_clouds_day" |
186 | 609 | StateChangeScript { | 606 | StateChangeScript { |
187 | 610 | script: { | 607 | script: { |
188 | 611 | if(__moon) anim_moon2sun.start(); else if(!__sun) anim_sunIn.start(); | 608 | if(__moon) anim_moon2sun.start(); else if(!__sun) anim_sunIn.start(); |
189 | @@ -620,7 +617,7 @@ | |||
190 | 620 | } | 617 | } |
191 | 621 | }, | 618 | }, |
192 | 622 | State { | 619 | State { |
194 | 623 | name: "02n" | 620 | name: "few_clouds_night" |
195 | 624 | StateChangeScript { | 621 | StateChangeScript { |
196 | 625 | script: { | 622 | script: { |
197 | 626 | if(__sun) anim_sun2moon.start(); else if(!__moon) anim_moonIn.start(); | 623 | if(__sun) anim_sun2moon.start(); else if(!__moon) anim_moonIn.start(); |
198 | @@ -640,195 +637,195 @@ | |||
199 | 640 | } | 637 | } |
200 | 641 | }, | 638 | }, |
201 | 642 | State { | 639 | State { |
391 | 643 | name: "03d" | 640 | name: "scattered_clouds_day" |
392 | 644 | StateChangeScript { | 641 | StateChangeScript { |
393 | 645 | script: { | 642 | script: { |
394 | 646 | if(__moon) anim_moon2sun.start(); else if(!__sun) anim_sunIn.start(); | 643 | if(__moon) anim_moon2sun.start(); else if(!__sun) anim_sunIn.start(); |
395 | 647 | if(__fewClouds) anim_fewCloudsOut.start(); | 644 | if(__fewClouds) anim_fewCloudsOut.start(); |
396 | 648 | if(__rain) anim_rainOut.start(); | 645 | if(__rain) anim_rainOut.start(); |
397 | 649 | if(__storm) anim_stormOut.start(); | 646 | if(__storm) anim_stormOut.start(); |
398 | 650 | if(__snow) anim_snowOut.start(); | 647 | if(__snow) anim_snowOut.start(); |
399 | 651 | if(__broken) anim_brokenCloudsOut.start(); | 648 | if(__broken) anim_brokenCloudsOut.start(); |
400 | 652 | if(__fog) anim_fogOut.start(); | 649 | if(__fog) anim_fogOut.start(); |
401 | 653 | if(!__scattered) anim_scatCloudsIn.start(); | 650 | if(!__scattered) anim_scatCloudsIn.start(); |
402 | 654 | } | 651 | } |
403 | 655 | } | 652 | } |
404 | 656 | }, | 653 | }, |
405 | 657 | State { | 654 | State { |
406 | 658 | name: "03n" | 655 | name: "scattered_clouds_night" |
407 | 659 | StateChangeScript { | 656 | StateChangeScript { |
408 | 660 | script: { | 657 | script: { |
409 | 661 | if(__sun) anim_sun2moon.start(); else if(!__moon) anim_moonIn.start(); | 658 | if(__sun) anim_sun2moon.start(); else if(!__moon) anim_moonIn.start(); |
410 | 662 | if(__fewClouds) anim_fewCloudsOut.start(); | 659 | if(__fewClouds) anim_fewCloudsOut.start(); |
411 | 663 | if(__rain) anim_rainOut.start(); | 660 | if(__rain) anim_rainOut.start(); |
412 | 664 | if(__storm) anim_stormOut.start(); | 661 | if(__storm) anim_stormOut.start(); |
413 | 665 | if(__snow) anim_snowOut.start(); | 662 | if(__snow) anim_snowOut.start(); |
414 | 666 | if(__broken) anim_brokenCloudsOut.start(); | 663 | if(__broken) anim_brokenCloudsOut.start(); |
415 | 667 | if(__fog) anim_fogOut.start(); | 664 | if(__fog) anim_fogOut.start(); |
416 | 668 | if(!__scattered) anim_scatCloudsIn.start(); | 665 | if(!__scattered) anim_scatCloudsIn.start(); |
417 | 669 | } | 666 | } |
418 | 670 | } | 667 | } |
419 | 671 | }, | 668 | }, |
420 | 672 | State { | 669 | State { |
421 | 673 | name: "04d" | 670 | name: "broken_clouds_day" |
422 | 674 | StateChangeScript { | 671 | StateChangeScript { |
423 | 675 | script: { | 672 | script: { |
424 | 676 | if(__moon) anim_moonOut.start(); | 673 | if(__moon) anim_moonOut.start(); |
425 | 677 | if(__sun) anim_sunOut.start(); | 674 | if(__sun) anim_sunOut.start(); |
426 | 678 | if(__fewClouds) anim_fewCloudsOut.start(); | 675 | if(__fewClouds) anim_fewCloudsOut.start(); |
427 | 679 | if(__scattered) anim_scatCloudsOut.start(); | 676 | if(__scattered) anim_scatCloudsOut.start(); |
428 | 680 | if(__rain) anim_rainOut.start(); | 677 | if(__rain) anim_rainOut.start(); |
429 | 681 | if(__storm) anim_stormOut.start(); | 678 | if(__storm) anim_stormOut.start(); |
430 | 682 | if(__snow) anim_snowOut.start(); | 679 | if(__snow) anim_snowOut.start(); |
431 | 683 | if(__fog) anim_fogOut.start(); | 680 | if(__fog) anim_fogOut.start(); |
432 | 684 | if(!__broken) anim_brokenCloudsIn.start(); | 681 | if(!__broken) anim_brokenCloudsIn.start(); |
433 | 685 | } | 682 | } |
434 | 686 | } | 683 | } |
435 | 687 | }, | 684 | }, |
436 | 688 | State { | 685 | State { |
437 | 689 | name: "04n" | 686 | name: "broken_clouds_night" |
438 | 690 | StateChangeScript { | 687 | StateChangeScript { |
439 | 691 | script: { | 688 | script: { |
440 | 692 | if(__moon) anim_moonOut.start(); | 689 | if(__moon) anim_moonOut.start(); |
441 | 693 | if(__sun) anim_sunOut.start(); | 690 | if(__sun) anim_sunOut.start(); |
442 | 694 | if(__fewClouds) anim_fewCloudsOut.start(); | 691 | if(__fewClouds) anim_fewCloudsOut.start(); |
443 | 695 | if(__scattered) anim_scatCloudsOut.start(); | 692 | if(__scattered) anim_scatCloudsOut.start(); |
444 | 696 | if(__rain) anim_rainOut.start(); | 693 | if(__rain) anim_rainOut.start(); |
445 | 697 | if(__storm) anim_stormOut.start(); | 694 | if(__storm) anim_stormOut.start(); |
446 | 698 | if(__snow) anim_snowOut.start(); | 695 | if(__snow) anim_snowOut.start(); |
447 | 699 | if(__fog) anim_fogOut.start(); | 696 | if(__fog) anim_fogOut.start(); |
448 | 700 | if(!__broken) anim_brokenCloudsIn.start(); | 697 | if(!__broken) anim_brokenCloudsIn.start(); |
449 | 701 | } | 698 | } |
450 | 702 | } | 699 | } |
451 | 703 | }, | 700 | }, |
452 | 704 | State { | 701 | State { |
453 | 705 | name: "09d" | 702 | name: "shower_rain_day" |
454 | 706 | StateChangeScript { | 703 | StateChangeScript { |
455 | 707 | script: { | 704 | script: { |
456 | 708 | if(__moon) anim_moonOut.start(); | 705 | if(__moon) anim_moonOut.start(); |
457 | 709 | if(__sun) anim_sunOut.start(); | 706 | if(__sun) anim_sunOut.start(); |
458 | 710 | if(__fewClouds) anim_fewCloudsOut.start(); | 707 | if(__fewClouds) anim_fewCloudsOut.start(); |
459 | 711 | if(__scattered) anim_scatCloudsOut.start(); | 708 | if(__scattered) anim_scatCloudsOut.start(); |
460 | 712 | if(__storm) anim_stormOut.start(); | 709 | if(__storm) anim_stormOut.start(); |
461 | 713 | if(__snow) anim_snowOut.start(); | 710 | if(__snow) anim_snowOut.start(); |
462 | 714 | if(__fog) anim_fogOut.start(); | 711 | if(__fog) anim_fogOut.start(); |
463 | 715 | if(!__broken) anim_brokenCloudsIn.start(); | 712 | if(!__broken) anim_brokenCloudsIn.start(); |
464 | 716 | if(!__rain) anim_rainIn.start(); | 713 | if(!__rain) anim_rainIn.start(); |
465 | 717 | } | 714 | } |
466 | 718 | } | 715 | } |
467 | 719 | }, | 716 | }, |
468 | 720 | State { | 717 | State { |
469 | 721 | name: "09n" | 718 | name: "shower_rain_night" |
470 | 722 | StateChangeScript { | 719 | StateChangeScript { |
471 | 723 | script: { | 720 | script: { |
472 | 724 | if(__moon) anim_moonOut.start(); | 721 | if(__moon) anim_moonOut.start(); |
473 | 725 | if(__sun) anim_sunOut.start(); | 722 | if(__sun) anim_sunOut.start(); |
474 | 726 | if(__fewClouds) anim_fewCloudsOut.start(); | 723 | if(__fewClouds) anim_fewCloudsOut.start(); |
475 | 727 | if(__scattered) anim_scatCloudsOut.start(); | 724 | if(__scattered) anim_scatCloudsOut.start(); |
476 | 728 | if(__storm) anim_stormOut.start(); | 725 | if(__storm) anim_stormOut.start(); |
477 | 729 | if(__snow) anim_snowOut.start(); | 726 | if(__snow) anim_snowOut.start(); |
478 | 730 | if(__fog) anim_fogOut.start(); | 727 | if(__fog) anim_fogOut.start(); |
479 | 731 | if(!__broken) anim_brokenCloudsIn.start(); | 728 | if(!__broken) anim_brokenCloudsIn.start(); |
480 | 732 | if(!__rain) anim_rainIn.start(); | 729 | if(!__rain) anim_rainIn.start(); |
481 | 733 | } | 730 | } |
482 | 734 | } | 731 | } |
483 | 735 | }, | 732 | }, |
484 | 736 | State { | 733 | State { |
485 | 737 | name: "10d" | 734 | name: "rain_day" |
486 | 738 | StateChangeScript { | 735 | StateChangeScript { |
487 | 739 | script: { | 736 | script: { |
488 | 740 | if(__moon) anim_moon2sun.start(); else if(!__sun) anim_sunIn.start(); | 737 | if(__moon) anim_moon2sun.start(); else if(!__sun) anim_sunIn.start(); |
489 | 741 | if(__fewClouds) anim_fewCloudsOut.start(); | 738 | if(__fewClouds) anim_fewCloudsOut.start(); |
490 | 742 | if(__broken) anim_brokenCloudsOut.start(); | 739 | if(__broken) anim_brokenCloudsOut.start(); |
491 | 743 | if(__storm) anim_stormOut.start(); | 740 | if(__storm) anim_stormOut.start(); |
492 | 744 | if(__snow) anim_snowOut.start(); | 741 | if(__snow) anim_snowOut.start(); |
493 | 745 | if(__fog) anim_fogOut.start(); | 742 | if(__fog) anim_fogOut.start(); |
494 | 746 | if(!__scattered) anim_scatCloudsIn.start(); | 743 | if(!__scattered) anim_scatCloudsIn.start(); |
495 | 747 | if(!__rain) anim_rainIn.start(); | 744 | if(!__rain) anim_rainIn.start(); |
496 | 748 | } | 745 | } |
497 | 749 | } | 746 | } |
498 | 750 | }, | 747 | }, |
499 | 751 | State { | 748 | State { |
500 | 752 | name: "10n" | 749 | name: "rain_night" |
501 | 753 | StateChangeScript { | 750 | StateChangeScript { |
502 | 754 | script: { | 751 | script: { |
503 | 755 | if(__sun) anim_sun2moon.start(); else if(!__moon) anim_moonIn.start(); | 752 | if(__sun) anim_sun2moon.start(); else if(!__moon) anim_moonIn.start(); |
504 | 756 | if(__fewClouds) anim_fewCloudsOut.start(); | 753 | if(__fewClouds) anim_fewCloudsOut.start(); |
505 | 757 | if(__broken) anim_brokenCloudsOut.start(); | 754 | if(__broken) anim_brokenCloudsOut.start(); |
506 | 758 | if(__storm) anim_stormOut.start(); | 755 | if(__storm) anim_stormOut.start(); |
507 | 759 | if(__snow) anim_snowOut.start(); | 756 | if(__snow) anim_snowOut.start(); |
508 | 760 | if(__fog) anim_fogOut.start(); | 757 | if(__fog) anim_fogOut.start(); |
509 | 761 | if(!__scattered) anim_scatCloudsIn.start(); | 758 | if(!__scattered) anim_scatCloudsIn.start(); |
510 | 762 | if(!__rain) anim_rainIn.start(); | 759 | if(!__rain) anim_rainIn.start(); |
511 | 763 | } | 760 | } |
512 | 764 | } | 761 | } |
513 | 765 | }, | 762 | }, |
514 | 766 | State { | 763 | State { |
515 | 767 | name: "11d" | 764 | name: "thunderstorm_day" |
516 | 768 | StateChangeScript { | 765 | StateChangeScript { |
517 | 769 | script: { | 766 | script: { |
518 | 770 | if(__moon) anim_moonOut.start(); | 767 | if(__moon) anim_moonOut.start(); |
519 | 771 | if(__sun) anim_sunOut.start(); | 768 | if(__sun) anim_sunOut.start(); |
520 | 772 | if(__fewClouds) anim_fewCloudsOut.start(); | 769 | if(__fewClouds) anim_fewCloudsOut.start(); |
521 | 773 | if(__scattered) anim_scatCloudsOut.start(); | 770 | if(__scattered) anim_scatCloudsOut.start(); |
522 | 774 | if(__rain) anim_rainOut.start(); | 771 | if(__rain) anim_rainOut.start(); |
523 | 775 | if(__snow) anim_snowOut.start(); | 772 | if(__snow) anim_snowOut.start(); |
524 | 776 | if(__fog) anim_fogOut.start(); | 773 | if(__fog) anim_fogOut.start(); |
525 | 777 | if(!__broken) anim_brokenCloudsIn.start(); | 774 | if(!__broken) anim_brokenCloudsIn.start(); |
526 | 778 | if(!__storm) anim_stormIn.start(); | 775 | if(!__storm) anim_stormIn.start(); |
527 | 779 | } | 776 | } |
528 | 780 | } | 777 | } |
529 | 781 | }, | 778 | }, |
530 | 782 | State { | 779 | State { |
531 | 783 | name: "11n" | 780 | name: "thunderstorm_night" |
532 | 784 | StateChangeScript { | 781 | StateChangeScript { |
533 | 785 | script: { | 782 | script: { |
534 | 786 | if(__moon) anim_moonOut.start(); | 783 | if(__moon) anim_moonOut.start(); |
535 | 787 | if(__sun) anim_sunOut.start(); | 784 | if(__sun) anim_sunOut.start(); |
536 | 788 | if(__fewClouds) anim_fewCloudsOut.start(); | 785 | if(__fewClouds) anim_fewCloudsOut.start(); |
537 | 789 | if(__scattered) anim_scatCloudsOut.start(); | 786 | if(__scattered) anim_scatCloudsOut.start(); |
538 | 790 | if(__rain) anim_rainOut.start(); | 787 | if(__rain) anim_rainOut.start(); |
539 | 791 | if(__snow) anim_snowOut.start(); | 788 | if(__snow) anim_snowOut.start(); |
540 | 792 | if(__fog) anim_fogOut.start(); | 789 | if(__fog) anim_fogOut.start(); |
541 | 793 | if(!__broken) anim_brokenCloudsIn.start(); | 790 | if(!__broken) anim_brokenCloudsIn.start(); |
542 | 794 | if(!__storm) anim_stormIn.start(); | 791 | if(!__storm) anim_stormIn.start(); |
543 | 795 | } | 792 | } |
544 | 796 | } | 793 | } |
545 | 797 | }, | 794 | }, |
546 | 798 | State { | 795 | State { |
547 | 799 | name: "13d" | 796 | name: "snow_day" |
548 | 800 | StateChangeScript { | 797 | StateChangeScript { |
549 | 801 | script: { | 798 | script: { |
550 | 802 | if(__moon) anim_moonOut.start(); | 799 | if(__moon) anim_moonOut.start(); |
551 | 803 | if(__sun) anim_sunOut.start(); | 800 | if(__sun) anim_sunOut.start(); |
552 | 804 | if(__fewClouds) anim_fewCloudsOut.start(); | 801 | if(__fewClouds) anim_fewCloudsOut.start(); |
553 | 805 | if(__scattered) anim_scatCloudsOut.start(); | 802 | if(__scattered) anim_scatCloudsOut.start(); |
554 | 806 | if(__rain) anim_rainOut.start(); | 803 | if(__rain) anim_rainOut.start(); |
555 | 807 | if(__storm) anim_stormOut.start(); | 804 | if(__storm) anim_stormOut.start(); |
556 | 808 | if(__fog) anim_fogOut.start(); | 805 | if(__fog) anim_fogOut.start(); |
557 | 809 | if(!__broken) anim_brokenCloudsIn.start(); | 806 | if(!__broken) anim_brokenCloudsIn.start(); |
558 | 810 | if(!__snow) anim_snowIn.start(); | 807 | if(!__snow) anim_snowIn.start(); |
559 | 811 | } | 808 | } |
560 | 812 | } | 809 | } |
561 | 813 | }, | 810 | }, |
562 | 814 | State { | 811 | State { |
563 | 815 | name: "13n" | 812 | name: "snow_night" |
564 | 816 | StateChangeScript { | 813 | StateChangeScript { |
565 | 817 | script: { | 814 | script: { |
566 | 818 | if(__moon) anim_moonOut.start(); | 815 | if(__moon) anim_moonOut.start(); |
567 | 819 | if(__sun) anim_sunOut.start(); | 816 | if(__sun) anim_sunOut.start(); |
568 | 820 | if(__fewClouds) anim_fewCloudsOut.start(); | 817 | if(__fewClouds) anim_fewCloudsOut.start(); |
569 | 821 | if(__scattered) anim_scatCloudsOut.start(); | 818 | if(__scattered) anim_scatCloudsOut.start(); |
570 | 822 | if(__rain) anim_rainOut.start(); | 819 | if(__rain) anim_rainOut.start(); |
571 | 823 | if(__storm) anim_stormOut.start(); | 820 | if(__storm) anim_stormOut.start(); |
572 | 824 | if(__fog) anim_fogOut.start(); | 821 | if(__fog) anim_fogOut.start(); |
573 | 825 | if(!__broken) anim_brokenCloudsIn.start(); | 822 | if(!__broken) anim_brokenCloudsIn.start(); |
574 | 826 | if(!__snow) anim_snowIn.start(); | 823 | if(!__snow) anim_snowIn.start(); |
575 | 827 | } | 824 | } |
576 | 828 | } | 825 | } |
577 | 829 | }, | 826 | }, |
578 | 830 | State { | 827 | State { |
579 | 831 | name: "50d" | 828 | name: "mist_day" |
580 | 832 | StateChangeScript { | 829 | StateChangeScript { |
581 | 833 | script: { | 830 | script: { |
582 | 834 | if(__moon) anim_moonOut.start(); | 831 | if(__moon) anim_moonOut.start(); |
583 | @@ -844,7 +841,7 @@ | |||
584 | 844 | } | 841 | } |
585 | 845 | }, | 842 | }, |
586 | 846 | State { | 843 | State { |
588 | 847 | name: "50n" | 844 | name: "mist_night" |
589 | 848 | StateChangeScript { | 845 | StateChangeScript { |
590 | 849 | script: { | 846 | script: { |
591 | 850 | if(__moon) anim_moonOut.start(); | 847 | if(__moon) anim_moonOut.start(); |
592 | 851 | 848 | ||
593 | === modified file 'tests/autopilot/ubuntu_weather_app/tests/__init__.py' | |||
594 | --- tests/autopilot/ubuntu_weather_app/tests/__init__.py 2013-08-04 11:09:32 +0000 | |||
595 | +++ tests/autopilot/ubuntu_weather_app/tests/__init__.py 2013-08-12 18:18:29 +0000 | |||
596 | @@ -88,11 +88,11 @@ | |||
597 | 88 | """A mixin to to give access to common sheet elements""" | 88 | """A mixin to to give access to common sheet elements""" |
598 | 89 | def _click_sheet_confirm(self): | 89 | def _click_sheet_confirm(self): |
599 | 90 | """Clicks the confirm button""" | 90 | """Clicks the confirm button""" |
601 | 91 | self.pointing_device.click_object(self.main_window.select_many('Button')[1]) | 91 | self.pointing_device.click_object(self.main_window.select_many('Button')[2]) |
602 | 92 | 92 | ||
603 | 93 | def _click_sheet_cancel(self): | 93 | def _click_sheet_cancel(self): |
604 | 94 | """Clicks the cancel button""" | 94 | """Clicks the cancel button""" |
606 | 95 | self.pointing_device.click_object(self.main_window.select_many('Button')[0]) | 95 | self.pointing_device.click_object(self.main_window.select_many('Button')[1]) |
607 | 96 | 96 | ||
608 | 97 | class DatabaseMixin(object): | 97 | class DatabaseMixin(object): |
609 | 98 | 98 | ||
610 | 99 | 99 | ||
611 | === modified file 'tests/autopilot/ubuntu_weather_app/tests/test_locationmanager.py' | |||
612 | --- tests/autopilot/ubuntu_weather_app/tests/test_locationmanager.py 2013-08-09 21:01:16 +0000 | |||
613 | +++ tests/autopilot/ubuntu_weather_app/tests/test_locationmanager.py 2013-08-12 18:18:29 +0000 | |||
614 | @@ -73,8 +73,12 @@ | |||
615 | 73 | self.search_for_city("London") | 73 | self.search_for_city("London") |
616 | 74 | 74 | ||
617 | 75 | # wait for results and click on the first item | 75 | # wait for results and click on the first item |
618 | 76 | http_failed = self.main_window.get_object('Dialog', 'HTTPFailedDialog') | ||
619 | 77 | self.assertThat(lambda: http_failed.visible, Eventually(NotEquals(True))) | ||
620 | 78 | load_indicator = self.main_window.get_object('ActivityIndicator', 'SearchingSpinner') | ||
621 | 79 | self.assertThat(load_indicator.running, Eventually(Equals(False), timeout=120)) | ||
622 | 76 | resultsList = self.main_window.get_object('QQuickListView', 'SearchResultList') | 80 | resultsList = self.main_window.get_object('QQuickListView', 'SearchResultList') |
624 | 77 | self.assertThat(resultsList.visible, Eventually(Equals(True), timeout=30)) | 81 | self.assertThat(resultsList.visible, Eventually(Equals(True))) |
625 | 78 | firstResult = self.main_window.get_object('Standard', 'searchResult0') | 82 | firstResult = self.main_window.get_object('Standard', 'searchResult0') |
626 | 79 | self.assertThat(lambda: firstResult, Eventually(NotEquals(None))) | 83 | self.assertThat(lambda: firstResult, Eventually(NotEquals(None))) |
627 | 80 | self.pointing_device.move_to_object(firstResult) | 84 | self.pointing_device.move_to_object(firstResult) |
628 | @@ -106,8 +110,12 @@ | |||
629 | 106 | searchField = self.search_for_city("London") | 110 | searchField = self.search_for_city("London") |
630 | 107 | 111 | ||
631 | 108 | # wait for results and click on the first item | 112 | # wait for results and click on the first item |
632 | 113 | http_failed = self.main_window.get_object('Dialog', 'HTTPFailedDialog') | ||
633 | 114 | self.assertThat(lambda: http_failed.visible, Eventually(NotEquals(True))) | ||
634 | 115 | load_indicator = self.main_window.get_object('ActivityIndicator', 'SearchingSpinner') | ||
635 | 116 | self.assertThat(load_indicator.running, Eventually(Equals(False), timeout=120)) | ||
636 | 109 | resultsList = self.main_window.get_object('QQuickListView', 'SearchResultList') | 117 | resultsList = self.main_window.get_object('QQuickListView', 'SearchResultList') |
638 | 110 | self.assertThat(resultsList.visible, Eventually(Equals(True), timeout=30)) | 118 | self.assertThat(resultsList.visible, Eventually(Equals(True))) |
639 | 111 | firstResult = self.select_single_retry("Standard", objectName="searchResult0") | 119 | firstResult = self.select_single_retry("Standard", objectName="searchResult0") |
640 | 112 | self.assertThat(lambda: firstResult, Eventually(NotEquals(None))) | 120 | self.assertThat(lambda: firstResult, Eventually(NotEquals(None))) |
641 | 113 | self.assertThat(firstResult.text, Eventually(Equals("London, GB"))) | 121 | self.assertThat(firstResult.text, Eventually(Equals("London, GB"))) |
642 | @@ -121,7 +129,9 @@ | |||
643 | 121 | self.pointing_device.click_object(searchField) | 129 | self.pointing_device.click_object(searchField) |
644 | 122 | self.keyboard.type("Hamburg") | 130 | self.keyboard.type("Hamburg") |
645 | 123 | self.keyboard.press_and_release('Enter') | 131 | self.keyboard.press_and_release('Enter') |
647 | 124 | self.assertThat(resultsList.visible, Eventually(Equals(True), timeout=30)) | 132 | load_indicator = self.main_window.get_object('ActivityIndicator', 'SearchingSpinner') |
648 | 133 | self.assertThat(load_indicator.running, Eventually(Equals(False), timeout=120)) | ||
649 | 134 | self.assertThat(resultsList.visible, Eventually(Equals(True))) | ||
650 | 125 | firstResult = self.select_single_retry("Standard", objectName="searchResult0") | 135 | firstResult = self.select_single_retry("Standard", objectName="searchResult0") |
651 | 126 | self.assertThat(lambda: firstResult, Eventually(NotEquals(None))) | 136 | self.assertThat(lambda: firstResult, Eventually(NotEquals(None))) |
652 | 127 | self.assertThat(firstResult.text, Eventually(Equals("Hamburg, DE"))) | 137 | self.assertThat(firstResult.text, Eventually(Equals("Hamburg, DE"))) |
653 | @@ -141,8 +151,12 @@ | |||
654 | 141 | self.search_for_city("UbuntuCity") | 151 | self.search_for_city("UbuntuCity") |
655 | 142 | 152 | ||
656 | 143 | # wait for result and look if label is shown | 153 | # wait for result and look if label is shown |
657 | 154 | http_failed = self.main_window.get_object('Dialog', 'HTTPFailedDialog') | ||
658 | 155 | self.assertThat(lambda: http_failed.visible, Eventually(NotEquals(True))) | ||
659 | 156 | load_indicator = self.main_window.get_object('ActivityIndicator', 'SearchingSpinner') | ||
660 | 157 | self.assertThat(load_indicator.running, Eventually(Equals(False), timeout=120)) | ||
661 | 144 | errorLabel = self.main_window.get_object('Label', 'noCityError') | 158 | errorLabel = self.main_window.get_object('Label', 'noCityError') |
663 | 145 | self.assertThat(errorLabel.visible, Eventually(Equals(True), timeout=30)) | 159 | self.assertThat(errorLabel.visible, Eventually(Equals(True))) |
664 | 146 | 160 | ||
665 | 147 | 161 | ||
666 | 148 | class TestLocationManagerWithLocation(WeatherTestCase, DatabaseMixin, SheetMixin): | 162 | class TestLocationManagerWithLocation(WeatherTestCase, DatabaseMixin, SheetMixin): |
667 | 149 | 163 | ||
668 | === modified file 'tests/autopilot/ubuntu_weather_app/tests/test_mainview.py' | |||
669 | --- tests/autopilot/ubuntu_weather_app/tests/test_mainview.py 2013-08-09 21:01:16 +0000 | |||
670 | +++ tests/autopilot/ubuntu_weather_app/tests/test_mainview.py 2013-08-12 18:18:29 +0000 | |||
671 | @@ -60,7 +60,7 @@ | |||
672 | 60 | # refresh and wait till loading has finished | 60 | # refresh and wait till loading has finished |
673 | 61 | self.main_window.open_toolbar().click_button("RefreshButton") | 61 | self.main_window.open_toolbar().click_button("RefreshButton") |
674 | 62 | load_indicator = self.main_window.get_object('ActivityIndicator', 'LoadingSpinner') | 62 | load_indicator = self.main_window.get_object('ActivityIndicator', 'LoadingSpinner') |
676 | 63 | self.assertThat(load_indicator.running, Eventually(Equals(False))) | 63 | self.assertThat(load_indicator.running, Eventually(Equals(False), timeout=120)) |
677 | 64 | 64 | ||
678 | 65 | # get the data from the refreshed tabs, have to be new | 65 | # get the data from the refreshed tabs, have to be new |
679 | 66 | refreshed_dates = self.main_window.get_objects('Label','DayDateLabel') | 66 | refreshed_dates = self.main_window.get_objects('Label','DayDateLabel') |
680 | 67 | 67 | ||
681 | === modified file 'tests/autopilot/ubuntu_weather_app/tests/test_settings.py' | |||
682 | --- tests/autopilot/ubuntu_weather_app/tests/test_settings.py 2013-08-07 17:27:32 +0000 | |||
683 | +++ tests/autopilot/ubuntu_weather_app/tests/test_settings.py 2013-08-12 18:18:29 +0000 | |||
684 | @@ -39,10 +39,10 @@ | |||
685 | 39 | current_temps = self.main_window.get_objects('QQuickText', 'CurrentTempText') | 39 | current_temps = self.main_window.get_objects('QQuickText', 'CurrentTempText') |
686 | 40 | if units == "imperial": | 40 | if units == "imperial": |
687 | 41 | self.assertThat(current_temps[0].text, Eventually(Equals(u'70°F'))) | 41 | self.assertThat(current_temps[0].text, Eventually(Equals(u'70°F'))) |
689 | 42 | self.assertThat(current_temps[2].text, Eventually(Equals(u'72°F'))) | 42 | self.assertThat(current_temps[2].text, Eventually(Equals(u'73°F'))) |
690 | 43 | else: | 43 | else: |
691 | 44 | self.assertThat(current_temps[0].text, Eventually(Equals(u'21°C'))) | 44 | self.assertThat(current_temps[0].text, Eventually(Equals(u'21°C'))) |
693 | 45 | self.assertThat(current_temps[2].text, Eventually(Equals(u'22°C'))) | 45 | self.assertThat(current_temps[2].text, Eventually(Equals(u'23°C'))) |
694 | 46 | 46 | ||
695 | 47 | def test_switch_scale(self): | 47 | def test_switch_scale(self): |
696 | 48 | """Tests switching the scale in the settings""" | 48 | """Tests switching the scale in the settings""" |
697 | 49 | 49 | ||
698 | === modified file 'tests/autopilot/ubuntu_weather_app/tests/weatherdata.py' | |||
699 | --- tests/autopilot/ubuntu_weather_app/tests/weatherdata.py 2013-08-06 19:35:53 +0000 | |||
700 | +++ tests/autopilot/ubuntu_weather_app/tests/weatherdata.py 2013-08-12 18:18:29 +0000 | |||
701 | @@ -6,7 +6,7 @@ | |||
702 | 6 | # by the Free Software Foundation. | 6 | # by the Free Software Foundation. |
703 | 7 | locations_data = [] | 7 | locations_data = [] |
704 | 8 | 8 | ||
706 | 9 | locations_data.append("""{"location":{"service_id":2643743,"name":"London","country":"GB","service":"openweathermap"},"db":{"updated":"2013-08-06T18:31:16.155Z","id":1},"format":20130801,"data":[{"date":"2013-08-06","timestamp":1375738207,"metric":{"tempMin":17.38,"tempMax":21.29,"windSpeed":5.22},"imperial":{"tempMin":63.284,"tempMax":70.322,"windSpeed":3.248,"rain":null},"pressure":1020.63,"humidity":58,"condition":{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03d"},"windDeg":272,"hourly":[],"current":{"timestamp":1375813805,"date":"2013-08-06 20:30","metric":{"temp":21.29,"windSpeed":null},"imperial":{"temp":70.322,"windSpeed":null,"rain":null},"humidity":56,"pressure":1013,"condition":{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03d"},"service":"openweathermap","service_id":2643743}},{"date":"2013-08-07","timestamp":1375876800,"metric":{"tempMin":14.25,"tempMax":22.14,"windSpeed":9.54},"imperial":{"tempMin":57.650000000000006,"tempMax":71.852,"windSpeed":5.936,"rain":null},"pressure":1019.36,"humidity":58,"condition":{"id":803,"main":"Clouds","description":"broken clouds","icon":"04d"},"windDeg":66,"hourly":[]},{"date":"2013-08-08","timestamp":1375963200,"metric":{"tempMin":13.13,"tempMax":22.86,"windSpeed":5.796},"imperial":{"tempMin":55.634,"tempMax":73.148,"windSpeed":3.6064000000000007,"rain":null},"pressure":1026.02,"humidity":58,"condition":{"id":800,"main":"Clear","description":"sky is clear","icon":"01d"},"windDeg":357,"hourly":[]},{"date":"2013-08-09","timestamp":1376049600,"metric":{"tempMin":14.09,"tempMax":23.71,"windSpeed":12.276000000000002},"imperial":{"tempMin":57.362,"tempMax":74.678,"windSpeed":7.638400000000001,"rain":null},"pressure":1025.05,"humidity":56,"condition":{"id":800,"main":"Clear","description":"sky is clear","icon":"01d"},"windDeg":260,"hourly":[]},{"date":"2013-08-10","timestamp":1376136000,"metric":{"tempMin":11.82,"tempMax":21.31,"windSpeed":9.395999999999999,"rain":1},"imperial":{"tempMin":53.275999999999996,"tempMax":70.358,"windSpeed":5.8464,"rain":0.03937007874015748},"pressure":1026.7,"humidity":69,"condition":{"id":500,"main":"Rain","description":"light rain","icon":"10d"},"windDeg":224,"hourly":[]},{"date":"2013-08-11","timestamp":1376222400,"metric":{"tempMin":15.38,"tempMax":22.5,"windSpeed":11.916},"imperial":{"tempMin":59.684,"tempMax":72.5,"windSpeed":7.4144000000000005,"rain":null},"pressure":1021.58,"humidity":61,"condition":{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03d"},"windDeg":255,"hourly":[]},{"date":"2013-08-12","timestamp":1376308800,"metric":{"tempMin":12.79,"tempMax":20.71,"windSpeed":14.148000000000001,"rain":1.14},"imperial":{"tempMin":55.022,"tempMax":69.278,"windSpeed":8.8032,"rain":0.04488188976377953},"pressure":1025.21,"humidity":0,"condition":{"id":500,"main":"Rain","description":"light rain","icon":"10d"},"windDeg":40,"hourly":[]},{"date":"2013-08-13","timestamp":1376395200,"metric":{"tempMin":11.61,"tempMax":22.22,"windSpeed":11.448,"rain":0.73},"imperial":{"tempMin":52.897999999999996,"tempMax":71.99600000000001,"windSpeed":7.123200000000001,"rain":0.02874015748031496},"pressure":1025.5,"humidity":0,"condition":{"id":500,"main":"Rain","description":"light rain","icon":"10d"},"windDeg":201,"hourly":[]},{"date":"2013-08-14","timestamp":1376481600,"metric":{"tempMin":16.09,"tempMax":22.97,"windSpeed":28.08,"rain":0.21},"imperial":{"tempMin":60.962,"tempMax":73.346,"windSpeed":17.472,"rain":0.00826771653543307},"pressure":1023.75,"humidity":0,"condition":{"id":500,"main":"Rain","description":"light rain","icon":"10d"},"windDeg":252,"hourly":[]},{"date":"2013-08-15","timestamp":1376568000,"metric":{"tempMin":14.36,"tempMax":22.61,"windSpeed":16.02,"rain":1.08},"imperial":{"tempMin":57.848,"tempMax":72.69800000000001,"windSpeed":9.968000000000002,"rain":0.042519685039370085},"pressure":1023.89,"humidity":0,"condition":{"id":500,"main":"Rain","description":"light rain","icon":"10d"},"windDeg":229,"hourly":[]}],"save":true}""") | 9 | locations_data.append("""{"updated":1375990401745,"save":false,"db":{"updated":"2013-08-08T19:33:21.745Z","id":1},"data":[{"icon":"broken_clouds_day","timestamp":1375963200,"hourly":[],"windDeg":233,"pressure":1023.82,"current":{"icon":"clear_day","timestamp":1375987800,"pressure":1019,"service_id":2643743,"metric":{"temp":21.25,"windSpeed":null},"date":"2013-08-08 20:50","condition":{"icon":"01d","description":"Sky is Clear","id":800,"main":"Clear"},"humidity":53,"imperial":{"rain":null,"temp":70.25,"windSpeed":null},"service":"openweathermap"},"metric":{"tempMin":16.51,"windSpeed":13.5,"tempMax":21.25},"date":"2013-08-08","condition":{"icon":"04d","description":"overcast clouds","id":804,"main":"Clouds"},"humidity":44,"imperial":{"rain":null,"tempMin":61.718,"windSpeed":8.4,"tempMax":70.25}},{"icon":"rain_day","timestamp":1376049600,"hourly":[],"windDeg":269,"pressure":1022.18,"metric":{"rain":1.5,"tempMin":14.27,"windSpeed":7.416,"tempMax":22.75},"date":"2013-08-09","condition":{"icon":"10d","description":"light rain","id":500,"main":"Rain"},"humidity":68,"imperial":{"rain":0.05905511811023623,"tempMin":57.686,"windSpeed":4.614400000000001,"tempMax":72.95}},{"icon":"few_clouds_day","timestamp":1376136000,"hourly":[],"windDeg":275,"pressure":1027.61,"metric":{"tempMin":11.26,"windSpeed":5.796,"tempMax":21.17},"date":"2013-08-10","condition":{"icon":"02d","description":"few clouds","id":801,"main":"Clouds"},"humidity":63,"imperial":{"rain":null,"tempMin":52.268,"windSpeed":3.6064000000000007,"tempMax":70.106}},{"icon":"rain_day","timestamp":1376222400,"hourly":[],"windDeg":218,"pressure":1021.06,"metric":{"rain":1.5,"tempMin":14.67,"windSpeed":16.956,"tempMax":20.26},"date":"2013-08-11","condition":{"icon":"10d","description":"light rain","id":500,"main":"Rain"},"humidity":80,"imperial":{"rain":0.05905511811023623,"tempMin":58.406,"windSpeed":10.550400000000002,"tempMax":68.468}},{"icon":"few_clouds_day","timestamp":1376308800,"hourly":[],"windDeg":293,"pressure":1024.95,"metric":{"tempMin":10.61,"windSpeed":10.44,"tempMax":19.58},"date":"2013-08-12","condition":{"icon":"02d","description":"few clouds","id":801,"main":"Clouds"},"humidity":62,"imperial":{"rain":null,"tempMin":51.098,"windSpeed":6.496,"tempMax":67.244}},{"icon":"broken_clouds_day","timestamp":1376395200,"hourly":[],"windDeg":241,"pressure":1025.32,"metric":{"tempMin":10.71,"windSpeed":12.96,"tempMax":21.34},"date":"2013-08-13","condition":{"icon":"04d","description":"broken clouds","id":803,"main":"Clouds"},"humidity":60,"imperial":{"rain":null,"tempMin":51.278000000000006,"windSpeed":8.064000000000002,"tempMax":70.412}},{"icon":"clear_day","timestamp":1376481600,"hourly":[],"windDeg":327,"pressure":1031.59,"metric":{"tempMin":11.87,"windSpeed":14.832,"tempMax":21.43},"date":"2013-08-14","condition":{"icon":"01d","description":"sky is clear","id":800,"main":"Clear"},"humidity":0,"imperial":{"rain":null,"tempMin":53.366,"windSpeed":9.228800000000001,"tempMax":70.574}},{"icon":"rain_day","timestamp":1376568000,"hourly":[],"windDeg":247,"pressure":1032.73,"metric":{"tempMin":11.77,"windSpeed":15.840000000000002,"tempMax":23.18},"date":"2013-08-15","condition":{"icon":"10d","description":"light rain","id":500,"main":"Rain"},"humidity":0,"imperial":{"rain":null,"tempMin":53.186,"windSpeed":9.856000000000002,"tempMax":73.724}},{"icon":"clear_day","timestamp":1376654400,"hourly":[],"windDeg":294,"pressure":1031.85,"metric":{"tempMin":15.81,"windSpeed":12.708,"tempMax":24.87},"date":"2013-08-16","condition":{"icon":"01d","description":"sky is clear","id":800,"main":"Clear"},"humidity":0,"imperial":{"rain":null,"tempMin":60.458,"windSpeed":7.9072000000000005,"tempMax":76.766}},{"icon":"rain_day","timestamp":1376740800,"hourly":[],"windDeg":295,"pressure":1029.08,"metric":{"rain":1.02,"tempMin":16.39,"windSpeed":12.024,"tempMax":25.05},"date":"2013-08-17","condition":{"icon":"10d","description":"light rain","id":500,"main":"Rain"},"humidity":0,"imperial":{"rain":0.040157480314960636,"tempMin":61.502,"windSpeed":7.4816,"tempMax":77.09}}],"format":20130808,"location":{"service_id":2643743,"name":"London","country":"GB","service":"openweathermap"}}""") |
707 | 10 | 10 | ||
709 | 11 | locations_data.append("""{"location":{"coord":{"lon":10,"lat":53.549999},"service_id":2911298,"name":"Hamburg","country":"DE","service":"openweathermap"},"db":{"updated":"2013-08-06T18:35:14.332Z","id":2},"format":20130801,"data":[{"date":"2013-08-06","timestamp":1375738207,"metric":{"tempMin":13.37,"tempMax":20,"windSpeed":18.18},"imperial":{"tempMin":56.066,"tempMax":68,"windSpeed":11.312000000000001,"rain":null},"pressure":1024.52,"humidity":55,"condition":{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03d"},"windDeg":302,"hourly":[],"current":{"timestamp":1375813203,"date":"2013-08-06 20:20","metric":{"temp":20,"windSpeed":null},"imperial":{"temp":68,"windSpeed":null,"rain":null},"humidity":64,"pressure":1015,"condition":{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03d"},"service":"openweathermap","service_id":2911298}},{"date":"2013-08-07","timestamp":1375873200,"metric":{"tempMin":11.38,"tempMax":16.98,"windSpeed":13.860000000000001,"rain":22},"imperial":{"tempMin":52.484,"tempMax":62.564,"windSpeed":8.624,"rain":0.8661417322834646},"pressure":1025.03,"humidity":100,"condition":{"id":502,"main":"Rain","description":"heavy intensity rain","icon":"10d"},"windDeg":7,"hourly":[]},{"date":"2013-08-08","timestamp":1375959600,"metric":{"tempMin":13.56,"tempMax":15.36,"windSpeed":15.515999999999998,"rain":13},"imperial":{"tempMin":56.408,"tempMax":59.647999999999996,"windSpeed":9.6544,"rain":0.5118110236220472},"pressure":1026.42,"humidity":100,"condition":{"id":502,"main":"Rain","description":"heavy intensity rain","icon":"10d"},"windDeg":31,"hourly":[]},{"date":"2013-08-09","timestamp":1376046000,"metric":{"tempMin":11.19,"tempMax":20.06,"windSpeed":14.436},"imperial":{"tempMin":52.141999999999996,"tempMax":68.108,"windSpeed":8.9824,"rain":null},"pressure":1030.49,"humidity":91,"condition":{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03d"},"windDeg":304,"hourly":[]},{"date":"2013-08-10","timestamp":1376132400,"metric":{"tempMin":13.81,"tempMax":21.32,"windSpeed":17.136},"imperial":{"tempMin":56.858000000000004,"tempMax":70.376,"windSpeed":10.6624,"rain":null},"pressure":1030.51,"humidity":80,"condition":{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03d"},"windDeg":250,"hourly":[]},{"date":"2013-08-11","timestamp":1376218800,"metric":{"tempMin":16.51,"tempMax":23.68,"windSpeed":22.715999999999998,"rain":3},"imperial":{"tempMin":61.718,"tempMax":74.624,"windSpeed":14.134400000000001,"rain":0.11811023622047245},"pressure":1024.9,"humidity":68,"condition":{"id":500,"main":"Rain","description":"light rain","icon":"10d"},"windDeg":238,"hourly":[]},{"date":"2013-08-12","timestamp":1376305200,"metric":{"tempMin":14.79,"tempMax":20.61,"windSpeed":10.044,"rain":0.59},"imperial":{"tempMin":58.622,"tempMax":69.098,"windSpeed":6.249600000000001,"rain":0.023228346456692913},"pressure":1028.45,"humidity":0,"condition":{"id":500,"main":"Rain","description":"light rain","icon":"10d"},"windDeg":275,"hourly":[]},{"date":"2013-08-13","timestamp":1376391600,"metric":{"tempMin":13.23,"tempMax":21.47,"windSpeed":5.184},"imperial":{"tempMin":55.814,"tempMax":70.646,"windSpeed":3.2256,"rain":null},"pressure":1029.35,"humidity":0,"condition":{"id":500,"main":"Rain","description":"light rain","icon":"10d"},"windDeg":48,"hourly":[]},{"date":"2013-08-14","timestamp":1376478000,"metric":{"tempMin":15.49,"tempMax":22.37,"windSpeed":7.704000000000001,"rain":0.33},"imperial":{"tempMin":59.882000000000005,"tempMax":72.266,"windSpeed":4.7936000000000005,"rain":0.01299212598425197},"pressure":1027.6,"humidity":0,"condition":{"id":500,"main":"Rain","description":"light rain","icon":"10d"},"windDeg":226,"hourly":[]},{"date":"2013-08-15","timestamp":1376564400,"metric":{"tempMin":15.3,"tempMax":23.26,"windSpeed":26.316},"imperial":{"tempMin":59.540000000000006,"tempMax":73.868,"windSpeed":16.3744,"rain":null},"pressure":1027.33,"humidity":0,"condition":{"id":500,"main":"Rain","description":"light rain","icon":"10d"},"windDeg":253,"hourly":[]}],"save":true}""") | 11 | locations_data.append("""{"updated":1375990401770,"save":false,"db":{"updated":"2013-08-08T19:33:21.770Z","id":2},"data":[{"icon":"broken_clouds_day","timestamp":1375959600,"hourly":[],"windDeg":293,"pressure":1025.28,"current":{"icon":"scattered_clouds_day","timestamp":1375987800,"pressure":1018,"service_id":2911298,"metric":{"temp":17.5,"windSpeed":null},"date":"2013-08-08 20:50","condition":{"icon":"03d","description":"scattered clouds","id":802,"main":"Clouds"},"humidity":67,"imperial":{"rain":null,"temp":63.5,"windSpeed":null},"service":"openweathermap"},"metric":{"tempMin":13.44,"windSpeed":21.06,"tempMax":16.5},"date":"2013-08-08","condition":{"icon":"04d","description":"broken clouds","id":803,"main":"Clouds"},"humidity":71,"imperial":{"rain":null,"tempMin":56.192,"windSpeed":13.104000000000001,"tempMax":61.7}},{"icon":"few_clouds_day","timestamp":1376046000,"hourly":[],"windDeg":262,"pressure":1028.74,"metric":{"tempMin":13.02,"windSpeed":13.895999999999999,"tempMax":18.91},"date":"2013-08-09","condition":{"icon":"02d","description":"few clouds","id":801,"main":"Clouds"},"humidity":79,"imperial":{"rain":null,"tempMin":55.436,"windSpeed":8.6464,"tempMax":66.03800000000001}},{"icon":"rain_day","timestamp":1376132400,"hourly":[],"windDeg":228,"pressure":1028.09,"metric":{"rain":1,"tempMin":12.4,"windSpeed":14.076,"tempMax":20.13},"date":"2013-08-10","condition":{"icon":"10d","description":"light rain","id":500,"main":"Rain"},"humidity":80,"imperial":{"rain":0.03937007874015748,"tempMin":54.32,"windSpeed":8.758400000000002,"tempMax":68.23400000000001}},{"icon":"rain_day","timestamp":1376218800,"hourly":[],"windDeg":249,"pressure":1028.28,"metric":{"rain":1,"tempMin":15.2,"windSpeed":12.636,"tempMax":20.18},"date":"2013-08-11","condition":{"icon":"10d","description":"light rain","id":500,"main":"Rain"},"humidity":87,"imperial":{"rain":0.03937007874015748,"tempMin":59.36,"windSpeed":7.8624,"tempMax":68.324}},{"icon":"broken_clouds_day","timestamp":1376305200,"hourly":[],"windDeg":283,"pressure":1022.93,"metric":{"tempMin":14.51,"windSpeed":29.880000000000003,"tempMax":19.23},"date":"2013-08-12","condition":{"icon":"04d","description":"overcast clouds","id":804,"main":"Clouds"},"humidity":84,"imperial":{"rain":null,"tempMin":58.117999999999995,"windSpeed":18.592000000000002,"tempMax":66.614}},{"icon":"rain_day","timestamp":1376391600,"hourly":[],"windDeg":275,"pressure":1027.51,"metric":{"rain":1,"tempMin":14.66,"windSpeed":24.3,"tempMax":18.18},"date":"2013-08-13","condition":{"icon":"10d","description":"light rain","id":500,"main":"Rain"},"humidity":79,"imperial":{"rain":0.03937007874015748,"tempMin":58.388000000000005,"windSpeed":15.120000000000001,"tempMax":64.724}},{"icon":"rain_day","timestamp":1376478000,"hourly":[],"windDeg":306,"pressure":1029.36,"metric":{"rain":2.46,"tempMin":13.09,"windSpeed":25.2,"tempMax":17.76},"date":"2013-08-14","condition":{"icon":"10d","description":"light rain","id":500,"main":"Rain"},"humidity":0,"imperial":{"rain":0.09685039370078741,"tempMin":55.562,"windSpeed":15.680000000000001,"tempMax":63.968}},{"icon":"rain_day","timestamp":1376564400,"hourly":[],"windDeg":275,"pressure":1034.36,"metric":{"rain":3.75,"tempMin":15.32,"windSpeed":15.048,"tempMax":19.03},"date":"2013-08-15","condition":{"icon":"10d","description":"moderate rain","id":501,"main":"Rain"},"humidity":0,"imperial":{"rain":0.14763779527559057,"tempMin":59.576,"windSpeed":9.3632,"tempMax":66.254}},{"icon":"rain_day","timestamp":1376650800,"hourly":[],"windDeg":286,"pressure":1027.6,"metric":{"rain":2.84,"tempMin":15.45,"windSpeed":27.791999999999998,"tempMax":20.46},"date":"2013-08-16","condition":{"icon":"10d","description":"light rain","id":500,"main":"Rain"},"humidity":0,"imperial":{"rain":0.11181102362204724,"tempMin":59.81,"windSpeed":17.2928,"tempMax":68.828}},{"icon":"rain_day","timestamp":1376737200,"hourly":[],"windDeg":297,"pressure":1028.67,"metric":{"rain":2.18,"tempMin":14.79,"windSpeed":28.836,"tempMax":19.03},"date":"2013-08-17","condition":{"icon":"10d","description":"light rain","id":500,"main":"Rain"},"humidity":0,"imperial":{"rain":0.08582677165354331,"tempMin":58.622,"windSpeed":17.942400000000003,"tempMax":66.254}}],"format":20130808,"location":{"coord":{"lon":10,"lat":53.549999},"service_id":2911298,"name":"Hamburg","country":"DE","service":"openweathermap"}}""") |
710 | 12 | 12 | ||
711 | 13 | 13 | ||
712 | === modified file 'ubuntu-weather-app.qml' | |||
713 | --- ubuntu-weather-app.qml 2013-07-20 16:52:37 +0000 | |||
714 | +++ ubuntu-weather-app.qml 2013-08-12 18:18:29 +0000 | |||
715 | @@ -55,6 +55,8 @@ | |||
716 | 55 | } | 55 | } |
717 | 56 | } else { | 56 | } else { |
718 | 57 | console.log(messageObject.error.msg+" / "+messageObject.error.request.url) | 57 | console.log(messageObject.error.msg+" / "+messageObject.error.request.url) |
719 | 58 | httpFailedDialog.show(); | ||
720 | 59 | refreshData(true, null); | ||
721 | 58 | } | 60 | } |
722 | 59 | } | 61 | } |
723 | 60 | } | 62 | } |
724 | @@ -149,4 +151,17 @@ | |||
725 | 149 | height:parent.height | 151 | height:parent.height |
726 | 150 | } | 152 | } |
727 | 151 | 153 | ||
728 | 154 | Dialog { | ||
729 | 155 | id:httpFailedDialog | ||
730 | 156 | objectName: "HTTPFailedDialog" | ||
731 | 157 | title: i18n.tr("Something went wrong!") | ||
732 | 158 | text: i18n.tr("Please make sure, you are connected to the internet.") | ||
733 | 159 | z:10 | ||
734 | 160 | Button { | ||
735 | 161 | text: i18n.tr("OK") | ||
736 | 162 | onClicked: PopupUtils.close(httpFailedDialog) | ||
737 | 163 | } | ||
738 | 164 | } | ||
739 | 165 | |||
740 | 166 | |||
741 | 152 | } | 167 | } |
PASSED: Continuous integration, rev:88 91.189. 93.70:8080/ job/ubuntu- weather- app-ci/ 31/ 91.189. 93.70:8080/ job/ubuntu- weather- app-precise- amd64-ci/ 23 91.189. 93.70:8080/ job/ubuntu- weather- app-quantal- amd64-ci/ 30 91.189. 93.70:8080/ job/ubuntu- weather- app-raring- amd64-ci/ 30 91.189. 93.70:8080/ job/ubuntu- weather- app-saucy- amd64-ci/ 23
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild: 91.189. 93.70:8080/ job/ubuntu- weather- app-ci/ 31/rebuild
http://