summaryrefslogtreecommitdiffstats
path: root/tests/system/location/sys_location.qtt
blob: 1ec172bc9e603caebbf59791e370c547d35e43df (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
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
/****************************************************************************
**
** 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_select_service_provider: function()
    {
        // Test meta data
        testTitle = "QML: Maps and Navigation - Select Service Provider";
        testBinary = "qml_location_mapviewer";
        testSource = "$QTDIR/qtlocation/examples/declarative/mapviewer"
        testGoal = "Verify that service provider can be selected";
        testPreconditions = "Several service providers should be available. Internet connection is required for this test case.";
        testGroups = "BAT, 5.0";
        testRequirements = "MOBILITY-2861, MOBILITY-538: Maps and Navigation";

        // 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. Map is displayed on the screen |
        | Pan the map | |
        | Select Provider button | Verify that one of the providers is indicated as current service provider |
        | Select other provider | Verify that map is displayed on the screen, Nokia point is at the centre of the map. |
        "));
    },

    qml_capturing_coordinates:function()
    {
        // Test meta data
        testTitle = "QML: Maps and Navigation - Coordinate Capturing";
        testBinary = "qml_location_mapviewer";
        testSource = "$QTDIR/qtlocation/examples/declarative/mapviewer"
        testGoal = "Verify that coordinates can be captured when selecting a location on the map.";
        testPreconditions = "internet connection is required for this test case.";
        testGroups = "BAT, 5.0";
        testRequirements = "MOBILITY-2861, MOBILITY-538: Maps and Navigation";

        // 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 Provider button | |
        | Select nokia provider | Map is displayed on the screen |
        | Press and Hold on the dot which represents Brisbane | |
        | Select 'Get coordinate' menu item | Verify that dialog with coordinates appears on the screen. Latitude is about -27.46, longitude is about 153.02 |"
        ));
    },

    qml_map_types: function()
    {
        // Test meta data
        testTitle = "QML: Maps and Navigation - Map View options";
        testBinary = "qml_location_mapviewer";
        testSource = "$QTDIR/qtlocation/examples/declarative/mapviewer"
        testGoal = "Verify that maps can be shown in different modes.";
        testPreconditions = "internet connection is required for this test case";
        testGroups = "BAT, 5.0";
        testRequirements = "MOBILITY-2861, QTMOBILITY-796: QML for Maps & Navigation: mapping";

        // 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 + " | Verify that map is loaded in 'Street' view. Nokia point is a centre of the map |
        | Select Provider button | |
        | Select nokia provider | Verify that map is displayed in 'Street' view |
        | Select 'Map Type' button | |
        | Select 'Satelite Map(day)' | Verify that map is displayed in 'Satelite (day)' view |
        | Pan map | Verify that new map tiles are in 'Satelite (day)' view |
        | Zoom in map | Verify that new map tiles are in 'Satelite (day)' view |
        | Select 'Map Type' button | |
        | Select 'Terrain Map' | Verify that map is displayed in 'Terrain' view, centre of the map is not changed |
        | Select 'Map Type' button | |
        | Select 'Hybrid Map' | Verify that map is displayed in 'Hybrid' view |
        | Select 'Map Type' button | |
        | Select 'Transit Map' | Verify that map is displayed in 'Transit' view |
        | Select 'Map Type' button | |
        | Select Gray Street Map | Verify that map is displayed in 'Gray Street' view |
        | Select 'Map Type' button | |
        | Select 'Mobile Street Map' | Verify that map is displayed in 'Mobile Street' view |
        | Select 'Map Type' button | |
        | Select Mobile Terrain Map | Verify that map is displayed in 'Mobile Terrain' view |
        | Select 'Map Type' button | |
        | Select Mobile Hybrid Map | Verify that map is displayed in 'Mobile Hybrid' view |
        | Select 'Map Type' button | |
        | Select 'Mobile Transit Map' | Verify that map is displayed in 'Mobile Transit' view |
        | Select 'Map Type' button | |
        | Select 'Mobile Gray Street Map' | Verify that map is displayed in 'Mobile Gray Street' view |
        | Select 'Map Type' button | |
        | Select 'Street Map' | Verify that map is displayed in 'Street (day)' view |"
        ));
    },

    qml_flick_a_map: function()
    {
        // Test meta data
        testTitle = "QML: Maps and Navigation - Flick";
        testBinary = "qml_location_mapviewer";
        testSource = "$QTDIR/qtlocation/examples/declarative/mapviewer"
        testGoal = "Verify that flick gesture works correctly with map.";
        testPreconditions = "internet connection is required for this test case";
        testGroups = "BAT, 5.0";
        testRequirements = "MTMW-239: QML for maps";

        // 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 + " | Verify that map is loaded with the center next to Brisbane  |
        | Make a long flick gesture from the right side the left | Verify that map center was moving to the left with dropping speed at the end |
        | Make a short flick gesture from the left side the right | Verify that map center was moving to the rigth with dropping speed at the end. Verify that map center has been moved to the less distance in comparing with previous step |
        | Make a flick gesture 2 o'clock direction | Verify that map center was following flick gesture. |
        | Zoom in map close to the maximum zoom level | |
        | Flick map | Verify that flick gesture worked as expected. |
        | Select Tools button | |
        | Select Minimap | |
        | Make a flick gesture | Verify that flick gesture worked as expected, there is no dirt on the screen |"
        ));
    },

    qml_pinch_a_map: function()
    {
        // Test meta data
        testTitle = "QML: Maps and Navigation - Pinch";
        testBinary = "qml_location_mapviewer";
        testSource = "$QTDIR/qtlocation/examples/declarative/mapviewer"
        testGoal = "Verify that pinch gesture works correctly with map.";
        testPreconditions = "internet connection is required for this test case";
        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 + " | Verify that map is loaded with the center next to Brisbane  |
        | Make a long zooming in pinch gesture | Verify that map is zoomed in. Verify that centre of the pinch gesture is between touchpoints. |
        | Make a short zooming out pinch gesture | Verify that map is zoomed out to less degree in comparing with previous step. |"
        ));
    },

    qml_pan_a_map: function()
    {
        // Test meta data
        testTitle = "QML: Maps and Navigation - Pan";
        testBinary = "qml_location_mapviewer";
        testSource = "$QTDIR/qtlocation/examples/declarative/mapviewer"
        testGoal = "Verify that pan gesture works correctly";
        testPreconditions = "internet connection is required for this test case";
        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 + " | Verify that map is loaded with the center next to Brisbane  |
        | Pan a map | Verify that map center followed the finger/cursor. Verify that new tiles is uploaded if needed. |
        | Zoom in map close to the maximum zoom level | |
        | Pan map | Verify that pan gesture worked as expected. |"
        ));
    },

    qml_zoom_a_map: function()
    {
        // Test meta data
        testTitle = "QML: Maps and Navigation - Zooming";
        testBinary = "qml_location_mapviewer";
        testSource = "$QTDIR/qtlocation/examples/declarative/mapviewer"
        testGoal = "Verify that maps can be zoomed in and out.";
        testPreconditions = "internet connection is required for this test case";
        testGroups = "BAT, 5.0";
        testRequirements = "MOBILITY-2861, QTMOBILITY-796: QML for Maps & Navigation: mapping";

        // 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 + " | Verify that map is loaded with Nokia at the center |
        | Move slider to the right | Verify that map is zoomed in |
        | Move slider to the left | Verify that map is zoomed out |
        | Move slider to have zoom level between 8 and 9 | |
        | Move slider the right to have zoom level less than 9 | Verify that map is scaled |
        | Move slider the right to jump over 9 zoom level but less than 10 | Verify that new tiles are displayed to reflect bigger zoom level |
        | Zoom in to the maximum level | Verify that map is not blurry |"
        ));
    },

    qml_distance_between_points_data: {
        points:["-27", "153", "-27.5", "153.1", "56.5"]
    },

    qml_distance_between_points:function(lat1, long1, lat2, long2, distance)
    {
        // Test meta data
        testTitle = "QML: Maps and Navigation - Distance between points";
        testBinary = "qml_location_mapviewer";
        testSource = "$QTDIR/qtlocation/examples/declarative/mapviewer"
        testGoal = "Verify that distance between points can be calculated.";
        testPreconditions = "Internet connection is required for this test case.";
        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 |
        | Long press on the map | |
        | Select 'Add Marker' menu item | |
        | Long Press on the marker | |
        | Select 'Move to' menu item | |
        | Fill in " + lat1 + " in Latitude field | |
        | Fill in " + long1 + " in Longitude | |
        | Select Go! button | |
        | Create another Marker via Long Press | |
        | Long Press on the second marker | |
        | Select 'Move to' menu item | |
        | Fill in " + lat2 + " in Latitude field | |
        | Fill in " + long2 + " in Longitude | |
        | Select Go! button | |
        | Long Press on the first marker | |
        | Select 'Distance to the next point' | Verify that distance is " + distance + " |"
        ));
    },

    qml_border_wrapping_data: {
        markers:["-27", "150", "-27", "-170"]
    },

    qml_border_wrapping: function(lat1, long1, lat2, long2)
    {
        // Test meta data
        testTitle = "QML: Maps and Navigation - Border wrapping";
        testBinary = "qml_location_mapviewer";
        testSource = "$QTDIR/qtlocation/examples/declarative/mapviewer"
        testGoal = "Verify that border wrapping works correctly for map and map items.";
        testPreconditions = "Internet connection is required for this test case";
        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 |
        | Zoom out map to about level 3 | |
        | Long press on the map | |
        | Select 'Add Marker' menu item | |
        | Long Press on the marker | |
        | Select 'Move to' menu item | |
        | Fill in " + lat1 + " in Latitude field | |
        | Fill in " + long1 + " in Longitude | |
        | Select Go! button | |
        | Create another Marker via Long Press | |
        | Long Press on the second marker | |
        | Select 'Move to' menu item | |
        | Fill in " + lat2 + " in Latitude field | |
        | Fill in " + long2 + " in Longitude | |
        | Select Go! button | |
        | Pan map to the right so the map center crosses dateline | Verify that there are 2 markers on the screen |
        | Zoom out the map to zoom level 0 | |
        | Pan map to make round-the-world trip | Verify that map looks and behaves as unfolded cylinder. Verify that there are no markers. |
        | Flick map from right to left to make round-the-world trip | Verify that map doesn't bounce to the right.|
        | Pan map from North pole to the South pole | Verify that all markers visible and drawn correctly. |"
        ));
    },

    qml_several_maps:function()
    {
        // Test meta data
        testTitle = "QML: Maps and Navigation - Several maps";
        testBinary = "qml_location_mapviewer";
        testSource = "$QTDIR/qtlocation/examples/declarative/mapviewer"
        testGoal = "Verify several maps can be displayed at the same time.";
        testPreconditions = "Several service providers should be available. Internet connection is required for this test case.";
        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. Map is displayed on the screen |
        | Select Provider button | |
        | Select nokia provider | Verify that map is displayed on the screen with default location next to Brisbane |
        | Select Tools button | |
        | Select Minimap button | Verify that another smaller map above the base map. |
        | | Verify that minimap's zoom level is smaller then base maps zoom level. |
        | | Verify that base maps's center is inside red rectangle on the minimap. |
        | Pan the base map | Verify that minimap is updated correctly with centre following base map centre |
        | Select Map Type button | |
        | Select Terrain Map button | Verify that base map is in Terrain view and minimap's type is unaltered |
        | Select Provider button | |
        | Select any other provider except nokia | Verify that map is displayed on the screen Nokia at the centre. |
        | Select Tools button | |
        | Select Minimap button | Verify that another smaller map above the base map. |
        | | Verify that Brisbane is inside red rectangle on the minimap. |
        | Pan the base map | Verify that minimap is updated smoothly with centre following base map centre. |"
        ));
    },

    qml_map_logo:function()
    {
        // Test meta data
        testTitle = "QML: Maps and Navigation - Logo";
        testBinary = "qml_location_mapviewer";
        testSource = "$QTDIR/qtlocation/examples/declarative/mapviewer"
        testGoal = "Verify that map can display logo (watermark).";
        testPreconditions = "Internet connection is required for this test case.";
        testGroups = "BAT, 5.0";
        testRequirements = "MOBILITY-2861, QTMOBILITY-796: QML for Maps & Navigation: mapping";

        // 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. Map is displayed on the screen |
        | Select Provider button | |
        | Select nokia provider | |
        | Select Tools button | |
        | Select Minimap button | Verify that minimap with logo is displayed on the screen. |"
        ));
    }

}  // end of testcase