diff options
author | Natalia Shubina <natalia.shubina@nokia.com> | 2011-07-07 11:07:32 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-07-08 02:46:28 +0200 |
commit | 46eb4d7229858cea49aa52dc521963a35e17a428 (patch) | |
tree | e612493df025ca3b2489ce3514b448dddf2eed09 | |
parent | 363da8a95c79ac83dc39233aac7686f2d97ca056 (diff) |
adding post code in system tests and qml_mapviewer
Change-Id: I9c9c72e5a7c3e26243d469fdaac649dfa2aa0f7d
Reviewed-on: http://codereview.qt.nokia.com/1256
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Juha Vuolle <juha.vuolle@nokia.com>
-rw-r--r-- | examples/declarative/mapviewer/mapviewer.qml | 7 | ||||
-rw-r--r-- | tests/systemtests/sys_location.qtt | 49 |
2 files changed, 34 insertions, 22 deletions
diff --git a/examples/declarative/mapviewer/mapviewer.qml b/examples/declarative/mapviewer/mapviewer.qml index fb276340..30fb2e28 100644 --- a/examples/declarative/mapviewer/mapviewer.qml +++ b/examples/declarative/mapviewer/mapviewer.qml @@ -401,7 +401,7 @@ FocusScope { z: mainMenu.z + 1 Component.onCompleted: { - var obj = [["Street", "Brandl St"],["District",""],["City", "Eight Mile Plains"], ["County", ""],["State", ""],["Country code",""],["Country","Australia"]] + var obj = [["Street", "Brandl St"],["District",""],["City", "Eight Mile Plains"], ["County", ""],["State", ""],["Country code",""],["Country","Australia"], ["Post code", ""]] setModel(obj) } @@ -419,6 +419,7 @@ FocusScope { geocodeAddress.state = dialogModel.get(4).inputText geocodeAddress.countryCode = dialogModel.get(5).inputText geocodeAddress.country = dialogModel.get(6).inputText + geocodeAddress.postcode = dialogModel.get(7).inputText map.geocodeModel.clear() map.geocodeModel.query = geocodeAddress map.geocodeModel.update(); @@ -553,7 +554,7 @@ FocusScope { } function geocodeMessage(){ - var street, district, city, county, state, countryCode, country, latitude, longitude, text + var street, district, city, county, state, countryCode, country, postcode, latitude, longitude, text latitude = map.geocodeModel.get(0).coordinate.latitude longitude = map.geocodeModel.get(0).coordinate.longitude street = map.geocodeModel.get(0).address.street @@ -563,6 +564,7 @@ FocusScope { state = map.geocodeModel.get(0).address.state countryCode = map.geocodeModel.get(0).address.countryCode country = map.geocodeModel.get(0).address.country + postcode = map.geocodeModel.get(0).address.postcode text = "<b>Latitude:</b> " + latitude + "<br/>" text +="<b>Longitude:</b> " + longitude + "<br/>" + "<br/>" @@ -573,6 +575,7 @@ FocusScope { if (state) text +="<b>State: </b>"+ state + " <br/>" if (countryCode) text +="<b>Country code: </b>"+ countryCode + " <br/>" if (country) text +="<b>Country: </b>"+ country + " <br/>" + if (postcode) text +="<b>Postcode: </b>"+ postcode + " <br/>" return text } diff --git a/tests/systemtests/sys_location.qtt b/tests/systemtests/sys_location.qtt index 06d434f0..d078a675 100644 --- a/tests/systemtests/sys_location.qtt +++ b/tests/systemtests/sys_location.qtt @@ -565,7 +565,7 @@ testcase = { }, /* // \groups BAT,5.0,MOBILITY-2893,RESEARCH - qml_route_travel_mode: function() + qml_travel_mode: function() { prompt(twiki('---+++ QML: Travel mode Note that internet connection is required for this test case @@ -676,7 +676,15 @@ testcase = { | Select Geocode menu item | | | Fill in *USA* in Country field | | | Press Go! button | | - | Wait for message appears on the screen | Verify that *19* points were found |' + | Wait for message appears on the screen | Verify that *19* points were found | + | Press Ok button | + | Press Options button | | + | Select Geocode menu item | | + | Press Clear All button | | + | Fill in *Moscow* in City filed | | + | Fill in *Russia* in Country field | | + | Press Go! button | | + | Wait for message appears on the screen | Verify that geocode was successful with latitude *55.7569*, longitude *37.615* |' )); }, @@ -717,50 +725,51 @@ testcase = { }, // \groups BAT,5.0,MOBILITY-2900,RESEARCH - qml_geocode_unique_city_in_a_country: function() + qml_geocode_request_with_county: function() { - prompt(twiki('---+++ QML: Geocode city which is unique in a country, but not a unique in the world + prompt(twiki('---+++ QML: Geocode county Note that internet connection is required for this test case | *Step* | *Verification* | | Run the qml_mapviewer application | | | Press Options button | | | Select Geocode menu item | | | Press Clear All button | | - | Fill in *Moscow* in City filed | | - | Fill in *Russia* in Country field | | + | Fill in *Norfolk* in County filed | | + | Fill in *United Kingdom* in Country field | | | Press Go! button | | - | Wait for message appears on the screen | Verify that geocode was successful with latitude *55.7569*, longitude *37.615* |' + | Wait for message appears on the screen | Verify that geocode was successful with latitude *52.614*, longitude *0.8864* |' )); }, // \groups BAT,5.0,MOBILITY-2900,RESEARCH - qml_geocode_request_with_county: function() + qml_geocode_request_with_country_code: function() { - prompt(twiki('---+++ QML: Geocode county + prompt(twiki('---+++ QML: Geocode country code Note that internet connection is required for this test case | *Step* | *Verification* | | Run the qml_mapviewer application | | - | Press Options button | | - | Select Geocode menu item | | | Press Clear All button | | - | Fill in *Norfolk* in County filed | | - | Fill in *United Kingdom* in Country field | | + | Fill in *AUS* in Country code field | | | Press Go! button | | - | Wait for message appears on the screen | Verify that geocode was successful with latitude *52.614*, longitude *0.8864* |' + | Wait for message appears on the screen | Verify that geocode is successful |' )); }, // \groups BAT,5.0,MOBILITY-2900,RESEARCH - qml_geocode_request_with_country_code: function() + qml_geocode_request_with_post_code: function() { - prompt(twiki('---+++ QML: Geocode country code + prompt(twiki('---+++ QML: Geocode post code Note that internet connection is required for this test case | *Step* | *Verification* | | Run the qml_mapviewer application | | + | Press Options button | | + | Select Geocode menu item | | | Press Clear All button | | - | Fill in *AUS* in Country code field | | + | Fill in *Brandl st* in Street filed | | + | Fill in *4113* in Post Code field | | + | Fill in *Australia* in Country field | | | Press Go! button | | - | Wait for message appears on the screen | Verify that geocode was successful |' + | Wait for message appears on the screen | Verify that geocode is successful with latitude *-27.5798*, longitude *153.1* |' )); }, @@ -776,7 +785,7 @@ testcase = { | Fill in *-27.575* in Latitude filed | | | Fill in *153.088* in Longitude field | | | Press Go! button | | - | Wait for message appears on the screen | Verify that reverse geocode issuccessful (street: *230 Padstow Rd*, City: *Eight Mile Plains*, State: *AUS-QLD*, Country code: *AUS*, Country: *AUSTRALIA*) |' + | Wait for message appears on the screen | Verify that reverse geocode issuccessful (street: *230 Padstow Rd*, City: *Eight Mile Plains*, State: *AUS-QLD*, Country code: *AUS*, Country: *AUSTRALIA*, Postcode: *4113*) |' )); }, @@ -792,7 +801,7 @@ testcase = { | Fill in *56.3264* in Latitude filed | | | Fill in *44.0048* in Longitude field | | | Press Go! button | | - | Wait for message appears on the screen | Verify that reverse geocode issuccessful (street: *Minina I Pozharskogo Ploshchad\'*, district: *Nizhegorodskiy Rayon*, City: *Nizhniy Novgorod*, Country code: *RUS*, Country: *Russian Federation*) |' + | Wait for message appears on the screen | Verify that reverse geocode issuccessful (street: *Minina I Pozharskogo Ploshchad\'*, district: *Nizhegorodskiy Rayon*, City: *Nizhniy Novgorod*, Country code: *RUS*, Country: *Russian Federation*, Postcode: *603005*) |' )); }, |