summaryrefslogtreecommitdiff
path: root/tests/system/geocode/sys_geocode.qtt
blob: e985f0c30296b0fa38005a7911b4ac5e4b28cdbf (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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
**
****************************************************************************/

//TESTED_COMPONENT=src/location

testcase = {
    qml_geocode_data: {
        australian_place:["Brandl st", "Eight Mile Plains", "Australia", "-27.5816", "153.0973"],
        russian_place:["Minina I Pozharskogo Ploshchad", "Nizhny Novgorod", "Russia", "56.329", "44.0085"]
    },

    qml_geocode: function(street, city, country, latitude, longitude)
    {
        // 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.";
        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* |
        | Launch [" + testBinary + "] | App launches normally |
        | Select [Tools] button | |
        | Select [Geocode] menu item | |
        | Select [Clear] 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 latitude is [" + latitude + "], longitude is [" + longitude + "]. |"
        ));
    },

    qml_geocode_fictional_place_data: {
        fictional_place:["My street", "The Best City", "Australia"]
    },

    qml_geocode_fictional_place: function(street, city, country)
    {
        // Test meta data
        testTitle = "QML: Maps and Navigation - Geocoding";
        testBinary = "qml_location_mapviewer";
        testSource = "$QTDIR/qtlocation/examples/declarative/mapviewer"
        testGoal = "Verify that location can not be found.";
        testPreconditions = "Internet connection is required for this test case. Pass proxy settings to app if needed.";
        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* |
        | Launch [" + testBinary + "] | App launches normally |
        | Select [Tools] button | |
        | Select [Geocode] menu item | |
        | Select [Clear] 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 place is not found. |"
        ));
    },

    qml_geocode_not_unique_location_data: {
        request:["Moscow", "Idaho","USA", "3", "46.7323", "-117.0005"]
    },

    qml_geocode_not_unique_location: function(city, state, country, places, latitude, longitude)
    {
        // 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.";
        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* |
        | Launch [" + testBinary + "] | App launches normally |
        | Select [Tools] button | |
        | Select [Geocode] menu item | |
        | Select [Clear] button | |
        | Fill in [" + city + "] in City field | |
        | Fill in [" + country + "] in Country field | |
        | Select [Go!] button | |
        | Wait for message appears on the screen | Verify that [" + places + "] locations were found. |
        | Select [Tools] button | |
        | Select [Geocode] menu item | |
        | Fill in [" + state + "] in State field | |
        | Wait for message appears on the screen | Verify that latitude is [" + latitude + "], longitude is [" + longitude + "]. |"
        ));
    },

    qml_geocode_request_with_post_code_data: {
        request:["Brandl", "4113", "Australia", "-27.5816", "153.0973"]
    },

    qml_geocode_request_with_post_code: function(street, postcode, country, latitude, longitude)
    {
        // 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.";
        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* |
        | Launch [" + testBinary + "] | App launches normally |
        | Select [Tools] button | |
        | Select [Geocode] menu item | |
        | Select [Clear] button | |
        | Fill in [" + street + "] in Street field | |
        | 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 latitude is [" + latitude + "], longitude is [" + longitude + "]. |"
        ));
    },

    qml_reverse_geocode_data: {
        australian_place:["-27.575", "153.088", "230 Padstow Rd"],
        russian_place:["56.3264", "44.0048", "Minina i Pozharskogo ploshchad'"]
    },

    qml_reverse_geocode: function(latitude, longitude, street)
    {
        // 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.";
        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* |
        | Launch [" + testBinary + "] | App launches normally |
        | Select [Tools] button | |
        | Select [Reverse] Geocode | |
        | Select [Clear] button | |
        | Fill in [" + latitude + "] in Latitude field | |
        | Fill in [" + longitude + "] in Longitude field | |
        | Select [Go!] button | |
        | Wait for message appears on the screen | Verify that street is [" + street + "] |"
        ));
    },

    qml_reverse_geocode_uninhabited_place_data: {
        uninhabited_place:["-27", "155"]
    },

    qml_reverse_geocode_uninhabited_place: function(latitude, longitude)
    {
        // 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.";
        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* |
        | Launch [" + testBinary + "] | App launches normally |
        | Select [Tools] button | |
        | Select [Reverse] Geocode | |
        | Select [Clear] button | |
        | Fill in [" + latitude + "] in Latitude field | |
        | Fill in [" + longitude + "] in Longitude field | |
        | Select [Go!] button | |
        | Wait for message appears on the screen | Verify that location is not found. |"
        ));
    },

    qml_geocoding_and_locale_data: {
        english:["38", "24", "en", "English"],
        greek:["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.";
        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 Language  button | |
        | Select [Other] | |
        | Fill in [" + locale + "] in Language field | |
        | Select [Go!] | |
        | Select [Tools] button | |
        | 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 [" + language + "] |"
        ));
    }

}  // end of testcase