summaryrefslogtreecommitdiff
path: root/tests/system/geocode/sys_geocode.qtt
blob: ffe865a90df70783227b9bbbe1bd618a7ebc5e8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/

//TESTED_COMPONENT=src/location

testcase = {
    qml_geocode_data: {
        australian_place:["Brandl st", "Eight Mile Plains", "Australia", "http://loc.desktop.maps.svc.ovi.com/geocoder/gc/2.0?referer=qtlocationapi&token=152022572f0e44e07489c35cd46fa246&lg=eng&country=Australia&city=Eight Mile Plains&street=Brandl St"],
        russian_place:["Minina I Pozharskogo Ploshchad", "Nizhny Novgorod", "Russia", "http://loc.desktop.maps.svc.ovi.com/geocoder/gc/2.0?referer=qtlocationapi&token=152022572f0e44e07489c35cd46fa246&lg=eng&country=Russia&city=Nizhny Novgorod&street=Minina I Pozharskogo Ploshchad"],
        fictional_place:["My street", "The Best City", "Australia", "http://loc.desktop.maps.svc.ovi.com/geocoder/gc/2.0?referer=qtlocationapi&token=152022572f0e44e07489c35cd46fa246&lg=eng&country=Australia&city=The Best City&street=My street"]
    },

    qml_geocode: function(street, city, country, url)
    {
        // Test meta data
        testTitle = "QML: Maps and Navigation - Geocoding";
        testBinary = "qml_location_mapviewer";
        testSource = "$QTDIR/qtlocation/examples/declarative/mapviewer"
        testGoal = "Verify that location can be geocoded.";
        testPreconditions = "Internet connection is required for this test case. Pass proxy settings to app if needed '--plugin.places.proxy http://172.16.9.165:8080/'";
        testGroups = "BAT, 5.0";
        testRequirements = "MTMW-236: QML Geocoding";

        // Test steps
        prompt(twiki("---+++ " + testTitle + "<br><br>
        *Goal:* " + testGoal + "<br>
        *Pre-Requisites:* " + testPreconditions + "<br>
        *Tested Binary:* " + testBinary + "<br>
        *Requirements:* " + testRequirements + "<br>

        | *Step* | *Verification* |
        | Open " + url + " url in a desktop browser | |
        | Launch " + testBinary + " | App launches normally |
        | Select Tools button | |
        | Select Geocode menu item | |
        | Select Clear All button | |
        | Fill in " + street + " in Street field | |
        | Fill in " + city + " in City field | |
        | Fill in " + country + " in Country field | |
        | Select Go! button | |
        | Wait for message appears on the screen | Verify that result corresponds to the open web page with latitude and longitude rounded to 4 places |"
        ));
    },

    qml_geocode_not_unique_location_data: {
        request:["Moscow", "Idaho","USA", "http://loc.desktop.maps.svc.ovi.com/geocoder/gc/2.0?referer=qtlocationapi&token=152022572f0e44e07489c35cd46fa246&lg=eng&country=France&city=The Best City",
                 "http://loc.desktop.maps.svc.ovi.com/geocoder/gc/2.0?referer=qtlocationapi&token=152022572f0e44e07489c35cd46fa246&lg=eng&country=USA&state=Idaho&city=Moscow"]
    },

    qml_geocode_not_unique_location: function(city, state, country, url1, url2)
    {
        // Test meta data
        testTitle = "QML: Maps and Navigation - Geocoding of non-unique address";
        testBinary = "qml_location_mapviewer";
        testSource = "$QTDIR/qtlocation/examples/declarative/mapviewer"
        testGoal = "Verify that location can be geocoded.";
        testPreconditions = "Internet connection is required for this test case. Pass proxy settings to app if needed '--plugin.places.proxy http://172.16.9.165:8080/'";
        testGroups = "BAT, 5.0";
        testRequirements = "MTMW-236: QML Geocoding";

        // Test steps
        prompt(twiki("---+++ " + testTitle + "<br><br>
        *Goal:* " + testGoal + "<br>
        *Pre-Requisites:* " + testPreconditions + "<br>
        *Tested Binary:* " + testBinary + "<br>
        *Requirements:* " + testRequirements + "<br>

        | *Step* | *Verification* |
        | Open " + url1 + " url in a desktop browser | |
        | Launch " + testBinary + " | App launches normally |
        | Select Tools button | |
        | Select Geocode menu item | |
        | Fill in " + city + " in City field | |
        | Fill in " + country + " in Country field | |
        | Select Go! button | |
        | Wait for message appears on the screen | Verify that several locations were found, number of locations is the same as in the open web page |
        | Open " + url2 + " url in a desktop browser | |
        | Select Tools button | |
        | Select Geocode menu item | |
        | Fill in " + state + " in State field | |
        | Wait for message appears on the screen | Verify that result corresponds to the open web page with latitude and longitude rounded to 4 places |"
        ));
    },

    qml_geocode_request_with_post_code_data: {
        request:["4113", "Australia", "http://loc.desktop.maps.svc.ovi.com/geocoder/gc/2.0?referer=qtlocationapi&token=152022572f0e44e07489c35cd46fa246&lg=eng&country=Australia&zip=4113"]
    },

    qml_geocode_request_with_post_code: function(postcode, country, url)
    {
        // Test meta data
        testTitle = "QML: Maps and Navigation - Geocode post code";
        testBinary = "qml_location_mapviewer";
        testSource = "$QTDIR/qtlocation/examples/declarative/mapviewer"
        testGoal = "Verify that location can be geocoded.";
        testPreconditions = "Internet connection is required for this test case. Pass proxy settings to app if needed '--plugin.places.proxy http://172.16.9.165:8080/'";
        testGroups = "BAT, 5.0";
        testRequirements = "MTMW-236: QML Geocoding";

        // Test steps
        prompt(twiki("---+++ " + testTitle + "<br><br>
        *Goal:* " + testGoal + "<br>
        *Pre-Requisites:* " + testPreconditions + "<br>
        *Tested Binary:* " + testBinary + "<br>
        *Requirements:* " + testRequirements + "<br>

        | *Step* | *Verification* |
        | Open " + url + " url in a desktop browser | |
        | Launch " + testBinary + " | App launches normally |
        | Select Tools button | |
        | Select Geocode menu item | |
        | Select Clear All button | |
        | Fill in " + postcode + " in Post Code field | |
        | Fill in " + country + " in Country field | |
        | Select Go! button | |
        | Wait for message appears on the screen | Verify that result corresponds to the open web page with latitude and longitude rounded to 4 places |"
        ));
    },

    qml_reverse_geocode_data: {
        australian_place:["-27.575", "153.088", "http://loc.desktop.maps.svc.ovi.com/geocoder/rgc/2.0?referer=qtlocationapi&token=152022572f0e44e07489c35cd46fa246&long=153.088&lat=-27.575&lg=eng"],
        russian_place:["56.3264", "44.0048", "http://loc.desktop.maps.svc.ovi.com/geocoder/rgc/2.0?referer=qtlocationapi&token=152022572f0e44e07489c35cd46fa246&long=44.0048&lat=56.3264&lg=eng"],
        uninhabited_place:["-26.8890", "154.6696", "http://loc.desktop.maps.svc.ovi.com/geocoder/rgc/2.0?referer=qtlocationapi&token=152022572f0e44e07489c35cd46fa246&long=154.6696&lat=-26.889&lg=eng"]
    },

    qml_reverse_geocode: function(latitude, longitude, url)
    {
        // Test meta data
        testTitle = "QML: Maps and Navigation - Reverse geocode";
        testBinary = "qml_location_mapviewer";
        testSource = "$QTDIR/qtlocation/examples/declarative/mapviewer"
        testGoal = "Verify that location can be geocoded.";
        testPreconditions = "Internet connection is required for this test case. Pass proxy settings to app if needed '--plugin.places.proxy http://172.16.9.165:8080/'";
        testGroups = "BAT, 5.0";
        testRequirements = "MTMW-237:QML Reverse geocoding";

        // Test steps
        prompt(twiki("---+++ " + testTitle + "<br><br>
        *Goal:* " + testGoal + "<br>
        *Pre-Requisites:* " + testPreconditions + "<br>
        *Tested Binary:* " + testBinary + "<br>
        *Requirements:* " + testRequirements + "<br>

        | *Step* | *Verification* |
        | Open " + url + " url in a desktop browser | |
        | Launch " + testBinary + " | App launches normally |
        | Select Tools button | |
        | Select Reverse Geocode | |
        | Fill in " + latitude + " in Latitude field | |
        | Fill in " + longitude + " in Longitude field | |
        | Select Go! button | |
        | Wait for message appears on the screen | Verify that result corresponds to the open web page with latitude and longitude rounded to 4 places |"
        ));
    },
    qml_geocoding_and_locale_data: {
        greek_place:["38", "24", "el", "Greek"]
    },

    qml_geocoding_and_locale: function(latitude, longitude, locale, language)
    {
        // Test meta data
        testTitle = "QML: Geocoding - Locale handling";
        testBinary = "qml_location_places";
        testSource = "$QTDIR/qtlocation/examples/declarative/places"
        testGoal = "Verify that geocode information can be present in different languages.";
        testPreconditions = "Internet connection is required for this test case. Pass proxy settings to app if needed '--plugin.places.proxy http://172.16.9.165:8080/'";
        testGroups = "BAT,5.0";
        testRequirements = "MOBILITY-2861";

        // Test steps
        prompt(twiki("---+++ " + testTitle + "<br><br>
        *Goal:* " + testGoal + "<br>
        *Pre-Requisites:* " + testPreconditions + "<br>
        *Tested Binary:* " + testBinary + "<br>
        *Requirements:* " + testRequirements + "<br>

        | *Step* | *Verification* |
        | Launch " + testBinary + " | App launches normally |
        | Select Reverse geocode | |
        | Fill in " + latitude + " in Latitude field | |
        | Fill in " + longitude + " in Longitude field | |
        | Select Go! | |
        | Wait for success geocode message | Verify that address is in English|
        | Select *en* button | |
        | Select Other | |
        | Fill in " + locale + " in Language field | |
        | Select Go! | |
        | Select Reverse geocode | |
        | Select Go! | |
        | Wait for success geocode message | Verify that address is in " + language + " |"
        ));
    }

}  // end of testcase