summaryrefslogtreecommitdiffstats
path: root/tests/systemtests/sys_location/sys_location.qtt
blob: 23f4ddae50af3855a6b49e43720816267e83720b (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
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
/****************************************************************************
**
** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Mobility Components.
**
** $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 = {

    // \groups BAT,1.1,MOBILITY-65
    current_position: function()
    {
        // Test meta data
        testTitle = "Location - Current Position";
        testBinary = "weatherinfo_with_location";
        testSource = "$MOBILITYDIR/demos/weatherinfo";
        testGoal = "Verify that current position is detected and displayed.";
        testPreconditions = "Note that GPS connection is required for this test case";
        testGroups = "BAT_MOBILITY";
        testRequirements = "";

        // 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 weather information for your local area is displayed |
        "));
    },

    // \groups BAT,1.1,MOBILITY-65
    location_is_updated: function()
    {
        // Test meta data
        testTitle = "Location - Location Updates";
        testBinary = "lightmaps_with_location (sources are in demos/lightmaps)";
        testSource = "$MOBILITYDIR/demos/lightmaps";
        testGoal = "Verify that location data is received and map is updated and centered after changing location.";
        testPreconditions = "GPS and internet connection is required for this test case";
        testGroups = "BAT_MOBILITY";
        testRequirements = "";

        // 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. Verify that map is displayed and centered with the current position. |
            | Move to a different location | Verify that map is updated and centered with new location |
        "));
    },

    // \groups BAT,1.2,QTMOBILITY-873
    third_party_position_source: function()
    {
        // Test meta data
        testTitle = "Location - Position Detection via Custom Plugin";
        testBinary = "testQtLocation"; // this is part of BlueWeel project, sources are in git@scm.dev.nokia.troll.no:qtmobility/qtmobility-tests.git
        testSource = "$MOBILITYDIR/tests/applications/location/testqtlocation";
        testGoal = "Verify that positions can be detected using third party plugins";
        testPreconditions = "GPS and internet connection is required for this test case";
        testGroups = "BAT_MOBILITY";
        testRequirements = "QTMOBILITY-873: Allow 3rd party position sources";

        // 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 the Custom Service | Verify that no 'Unable to register location service' and 'Not valid interface.' messages appear |
            | Press the Update Map button | Verify that map was loaded and correct current position is displayed |
         "));
    },

    // \groups BAT,1.2,QTMOBILITY-658
    shift_to_the_given_offset: function()
    {
        // Test meta data
        testTitle = "Location - Shift To Given Offset";
        testBinary = "testQtLocation";
        testSource = "$MOBILITYDIR/tests/applications/location/testqtlocation";
        testGoal = "Verify that coordinates can be calculated as an offset to another position.";
        testPreconditions = "None";
        testGroups = "BAT_MOBILITY";
        testRequirements = "QTMOBILITY-658: Add a method to QGeoCoordinate which takes an offset and returns another QGeoCoordinate";

        // Note that significand precision should be taken into account during comparing real numbers, that is why we consider 5.48417e-16 value equal to zero

        // 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 the MapNavigation | |
            | Fill in '0' in to Start Latitude field | |
            | Fill in '100' in to Start Longitude field | |
            | Select Distance/Bearing from pre-defined dropdown list | |
            | Fill '1000000, 90' in to the given field | |
            | Press the Ok button | Verify that Destination fields are updated with 5.48417e-16 latitude and 108.9932 longitude |
            | Fill in '60' in to Start Latitude field | |
            | Fill in '100' in to Start Longitude field | |
            | Select Distance/Bearing from pre-defined dropdown list | |
            | Fill '1000000, 180' in to the given field | |
            | Press the Ok button | Verify that Destination fields are updated with 51.0068 latitude and 100 longitude |
            | Fill in '60' in to Start Latitude field | |
            | Fill in '100' in to Start Longitude field | |
            | Select Distance/Bearing from pre-defined dropdown list | |
            | Fill '1000000, 20' in to the given field | |
            | Press the Ok button | Verify that Destination fields are updated with 68.2523 latitude and 108.296 longitude |
        "));
    },

    store_and_load_a_landmark_data: {
        // Valid landmarks are -90~90 latitude, and -180~180 longitude
        landmark : ["landmark", "20", "120"]
    },

    // \groups BAT,1.1,MOBILITY-66
    store_and_load_a_landmark: function(name, latitude, longitude)
    {
        // Test meta data
        testTitle = "Landmark - Store and Load Landmarks";
        testBinary = "landmarkbrowser";
        testSource = "$MOBILITYDIR/examples/landmarkbrowser";        
        testGoal = "Verify that a landmark can be created (and stored)";
        testPreconditions = "None";
        testGroups = "BAT_MOBILITY";
        testRequirements = "";

        // Test steps
        startApplication(testBinary);
        select("Add Landmark");
        enter("Latitude", latitude);
        enter("Longitude", longitude);
        enter("Name", name);
        select("Ok");

        prompt("Verify that the landmark record is created");
    },

    negative_store_and_load_a_landmark_data: {
        // Landmarks outside the ranges -90~90 latitude, and -180~180 longitude
        bad_landmark_lat : ["bad_landmark", "100", "120"],
        bad_landmark_long : ["bad_landmark", "80", "300"]
    },

    // \groups BAT,1.1,MOBILITY-66
    negative_store_and_load_a_landmark: function(name, latitude, longitude)
    {
        // Test meta data
        testTitle = "Landmark - Handling Invalid Landmark";
        testBinary = "landmarkbrowser";
        testSource = "$MOBILITYDIR/examples/landmarkbrowser";  
        testGoal = "Verify that invalid landmarks are detected and handled gracefully.";
        testPreconditions = "None";
        testGroups = "BAT_MOBILITY";
        testRequirements = "";

        // Test steps
        startApplication(testTitle);
        select("Add Landmark");
        enter("Latitude", latitude);
        enter("Longitude", longitude);
        enter("Name", name);
        //expectMessageBox("Invalid");
        prompt("Verify a message box is shown indicating the values are ouside the valid range")
        select("Ok");
        select("Cancel");
    },

    // \groups BAT,1.1,MOBILITY-66
    sorted_search_based_on_category: function()
    {
        // Test meta data
        testTitle = "Landmark - Search on Category";
        testBinary = "landmarkbrowser";
        testSource = "$MOBILITYDIR/examples/landmarkbrowser";  
        testGoal = "Verify that landmarks can be sorted and filtered.";
        testPreconditions = "None";
        testGroups = "BAT_MOBILITY";
        testRequirements = "";

        // 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 |
            | Create Accomodation category | |
            | Create Businesses category | |
            | Run the landmarkbrowser application | |
            | Create A1 landmark  in Accomodation category | |
            | Create A2 landmark  in Accomodation category | |
            | Create BB landmark in Businesses category | |
            | Press the Set Filter button | |
            | Select the Category checkbox | |
            | Select Accomodation category | |
            | Press Ok button | Verify that only A1 and A2 landmark is in the list and they are present in alphabetical order |
            | Press the Set Filter button | |
            | Select Education category | |
            | Press Ok button | Verify that no landmarks are in the list |
        "));
    },

    // \groups BAT,1.1,MOBILITY-66
    sort_landmarks_in_alphabetical_and_nearest: function()
    {
        // Test meta data
        testTitle = "Landmark - Nearest Landmarks";
        testBinary = "landmarkbrowser";
        testSource = "$MOBILITYDIR/examples/landmarkbrowser";  
        testGoal = "Verify that landmarks can be displayed in sorted order with nearest first.";
        testPreconditions = "None";
        testGroups = "BAT_MOBILITY";
        testRequirements = "";

        // 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 |
            | Create landmark A(12;0) | |
            | Create landmark B(10;0) | |
            | Create landmark C(8;0) | |
            | Create landmark D(8;0) | |
            | Press Set Filter button | |
            | Select Proximity checkbox | |
            | Fill in 0 in to Lat field | |
            | Fill in 0 in to Long field | |
            | Fill in 10000000 in to Radius field| |
            | Press Ok button | Verify that C, D, B, A landmarks are in the list (not in alphabetical order) |
            | Press Set Filter button | |
            | Change radius value to 1000000 | |
            | Press Ok button | Verify that only C and D landmarks are in the list |
            | Press Set Filter button | |
            | Deselect Proximity checkbox | |
            | Press Ok button | Verify that landmarks appear in alphabetical order from A to Z |
        "));
    },

    // \groups BAT,1.1,MOBILITY-66
    landmarks_within_range_of_a_position: function()
    {
        // Test meta data
        testTitle = "Landmark - Within Range of Position";
        testBinary = "landmarkbrowser";
        testSource = "$MOBILITYDIR/examples/landmarkbrowser"; 
        testGoal = "Verify that landmarks within range of a position can be shown";
        testPreconditions = "None";
        testGroups = "BAT_MOBILITY";
        testRequirements = "";

        // 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 |
            | Create landmark A(12;0) | |
            | Create landmark B(10;0) | |
            | Create landmark C(8;0) | |
            | Create landmark D(8;0) | |
            | Press Set Filter button | |
            | Select Box checkbox | |
            | Fill in 9 in to Top Left Lat field | |
            | Fill in 0 in to Top Left Long field | |
            | Fill in 0 i to Bottom Right Lat filed | |
            | Fill in 1 in to Bottom Right Long field | |
            | Press Ok button | Verify that only C and D landmarks are in the list and landmarks appear in alphabetical order |
        "));
    },
    
    // \groups BAT,1.1,MOBILITY-66
    create_edit_and_delete_a_landmark: function()
    {
        // Test meta data
        testTitle = "Landmark - Edit and Delete Landmarks";
        testBinary = "landmarkbrowser";
        testSource = "$MOBILITYDIR/examples/landmarkbrowser"; 
        testGoal = "Verify that notifications can be send whenever landmarks are added, updated or deleted.";
        testPreconditions = "None";
        testGroups = "BAT_MOBILITY";
        testRequirements = "";

        // 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 |
            | Press Add Landmark button | |
            | Fill in AAA in to Name field | |
            | Fill in 30 into Latitude field | |
            | Fill in 30 into Longitude field | |
            | Press Ok button | Verify that message 'Landmark(s) have been added' appears on the screen |
            | Press Ok button | Verify that AAA landmark is in the landmarks list |
            | Select AAA landmark | |
            | Press Edit Landmark button | |
            | Change Latitude value to 40 | |
            | Change Longitude value to 40 | |
            | Change Name value to BBB | |
            | Press Ok button | Verify that message 'Landmark(s) have been edited' appears on the screen |
            | Press Ok button | Verify that BBB landmark has new latitude and longitude |
            | Select BBB landmark | |
            | Press Delete Landmarks button | Verify that message 'Landmark(s) have been removed' appears on the screen |
            | Press Ok button | Verify that only BBB landmark has been deleted |
            | Create 2 new landmarks A1 and A2 | |
            | Select both A1 and A2 landmarks |
            | Press Delete Landmarks button | Verify that message 'Landmark(s) have been removed' appears on the screen |
            | Press Ok button | Verify that only A1 and A2 landmarks have been deleted |
        "));
    },

    // \groups BAT,1.1,MOBILITY-66
    enumerate_categories: function()
    {
        // Test meta data
        testTitle = "Landmark - Enumerate";
        testBinary = "landmarkbrowser";
        testSource = "$MOBILITYDIR/examples/landmarkbrowser"; 
        testGoal = "Verify that created categories can be showed in a list.";
        testPreconditions = "None";
        testGroups = "BAT_MOBILITY";
        testRequirements = "";

        // 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 Category tab | |
            | Create several categories | |
            | Swith to the Landmark tab and back to the Category tab | Verify that the created categories are present in the list |
        "));
    },

    // \groups BAT,1.1,MOBILITY-66
    add_and_delete_a_category: function()
    {
        //Landmark manager provides notifications whenever categories are added, updated or deleted
        // Test meta data
        testTitle = "Landmark - Add and Delete Categories ";
        testBinary = "landmarkbrowser";
        testSource = "$MOBILITYDIR/examples/landmarkbrowser";
        testGoal = "Verify that the system sends notifications when categories are added or deleted.";
        testPreconditions = "None";
        testGroups = "BAT_MOBILITY";
        testRequirements = "";

        // 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 Category tab | |
            | Press Add Category button | |
            | Fill in AAA in to Name field | |
            | Press Ok button | Verify that message 'Category(ies) have been added' |
            | Press Ok button | Verify that AAA is added in list of categories in alphabetical order |
            | Press Add Category button | |
            | Fill in AAA in to Name field | |
            | Press Ok button | Verify that message 'Add Category Failed: category already Exists' appears on the screen |
            | Press Ok button | |
            | Press Add Category button | |
            | Press Ok button | Verify that message 'Category name must not be empty' appears on the screen |
            | Press Ok button | |
            | Select AAA category | |
            | Press Delete Categories button | Verify that message 'Categoty(ies) have been removed' appears on the screen |
            | Press Ok button | Verify that list of categories does not contain AAA category only|
            | Add A1 and A2 categories | |
            | Select A1 and A2 categories | |
            | Press Delete Categories button | Verify that message 'Categoty(ies) have been removed' appears on the screen |
            | Press Ok button | Verify that list of categories does not contain A1 and A2 categories only |
            | Select some of predefined categories | |
            | Press Delete Category button | Verify tha message 'Cannot delete a global category' appears on the screen |
            | Press Ok button | Verify that no categories have been deleted |
        "));
    },

    // \groups BAT,1.1,MOBILITY-538
    select_service_provider: function()
    {
        // Test meta data
        testTitle = "Maps and Navigation - Select Service Provider";
        testBinary = "geoservicedemo";
        testSource = "$MOBILITYDIR/tests/manual/location-testing-tools/geoservicedemo";
        testGoal = "Verify that service provider can be selected";
        testPreconditions = "None";
        testGroups = "BAT_MOBILITY";
        testRequirements = "";

        // Test steps
        startApplication(testBinary);
        select("Service Providers");
        select("nokia");
        select("Set Service Provider");
        prompt("Verify selected service provider is indicated as current service provider");
        /*
        prompt(twiki("---+++ " + testTitle + "<br><br>
            *Goal:* " + testGoal + "<br>
            *Pre-Requisites:* " + testPreconditions + "<br>
            *Tested Binary:* " + testBinary + "<br>
            *Requirements:* " + testRequirements + "<br>

            | *Step* | *Verification* |
            | | Verify selected service provider is indicated as current service provider |
        "));
        */
    },

    request_route_from_one_GPS_location_to_another_data: {
        route1:["-27.575", "153.088", "-27.465", "153.023", "15901", "15987"]
    },

    // \groups BAT,1.1,MOBILITY-538
    request_route_from_one_GPS_location_to_another: function(lat1, long1, lat2, long2, distance1, distance2)
    {
        // Test meta data
        testTitle = "Maps and Navigation - Route Calculation";
        testBinary = "geoservicedemo";
        testSource = "$MOBILITYDIR/tests/manual/location-testing-tools/geoservicedemo";
        testGoal = "Verify that routes can be calculated from one GPS location to another.";
        testPreconditions = "None";
        testGroups = "BAT_MOBILITY";
        testRequirements = "";

        // Test steps
        startApplication(testBinary);
        select("Service Providers");
        select("nokia");
        select("Set Service Provider");
        select("Route");
        select("Request Route");
        enter(lat1);
        enter(long1);
        enter(lat2);
        enter(long2);
        select("Ok");
        prompt("Wait until the route is calculated (should be less than 10 seconds), verify the there are 8 segments, first and last instructions indicate to 'Head toward Logan rd' and 'Turn right onto Bartley St'");
        /*
        prompt(twiki("---+++ " + testTitle + "<br><br>
            *Goal:* " + testGoal + "<br>
            *Pre-Requisites:* " + testPreconditions + "<br>
            *Tested Binary:* " + testBinary + "<br>
            *Requirements:* " + testRequirements + "<br>

            | *Step* | *Verification* |
            | Wait until the route is calculated (should be less than 10 seconds) | Verify the there are 8 segments, first and last instructions indicate to 'Head toward Logan rd' and 'Turn right onto Bartley St' |
        "));
        */
        select("routes/route");
        compare(getText("distance"), distance1);
        select("Request Route");
        enter(lat2);
        enter(long2);
        enter(lat1);
        enter(long1);
        select("Ok");
        prompt("Wait until the route is calculated (should be less than 10 seconds),verify the instructions for segments 1 and 2 indicate to Head towards Sedgebrook st and Turn right onto Sedgebrook st");
        /*
        prompt(twiki("---+++ " + testTitle + "<br><br>
            *Goal:* " + testGoal + "<br>
            *Pre-Requisites:* " + testPreconditions + "<br>
            *Tested Binary:* " + testBinary + "<br>
            *Requirements:* " + testRequirements + "<br>

            | *Step* | *Verification* |
            | Wait until the route is calculated (should be less than 10 seconds) | Verify the instructions for segments 1 and 2 indicate to Head towards Sedgebrook st and Turn right onto Sedgebrook st |
        "));
        */
        compare(getText("distance"), distance2);
    },
    
    // \groups BAT,1.1,MOBILITY-538
    geocoding: function()
    {
        // Test meta data
        testTitle = "Maps and Navigation - Geocoding";
        testBinary = "geoservicedemo"; // (sources are /tests/location-testing-tools/geoservicedemo)
        testSource = "$MOBILITYDIR/tests/manual/location-testing-tools/geoservicedemo";
        testGoal = "Verify that geocoding searches are supported.";
        testPreconditions = "Note that testing via proxy is not recommended, incorrect settings can be a cause of the 'Socket operation timed out' error";
        testGroups = "BAT_MOBILITY";
        testRequirements = "";

        // 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 Search By Adress tab | |
            | Select One-box Search checkbox | |
            | Fill in 'Brandl st, Eight Mile Plains, Australia' in search field | |
            | Select Geocoding search | |
            | Press Ok button | |
            | Wait until data is recieved | |
            | Select places | Verify that count = 1 |
            | Select place | Verify that latitude is -27.5798, longitude is 153.1 |
            | Select address | Verify that Country is AUSTRALIA, country code is AUS, city is Eight Mile Plains, street name is Branl St, post code is 4113 |
        "));
    },
    
    // \groups BAT,1.1,MOBILITY-538
    reverse_geocoding: function()
    {
        // Test meta data
        testTitle = "Maps and Navigation - Reverse Geocoding";
        testBinary = "geoservicedemo";
        testSource = "$MOBILITYDIR/tests/manual/location-testing-tools/geoservicedemo";
        testGoal = "Verify that a geocode can be calculated from a given position.";
        testPreconditions = "Note that testing via proxy is not recommended, incorrect settings can be a cause of the 'Socket operation timed out' error";
        testGroups = "BAT_MOBILITY";
        testRequirements = "";

        // 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 Geocoding tab | |
            | Press Search By Coordinates button | |
            | Fill in -27.5798 in Latitude field | |
            | Fill in 153.1 in Longitude field | |
            | Press Ok button | |
            | Wait until data is recieved | |
            | Select places/place/adress | Verify that Country is AUSTRALIA, country code is AUS, city is Eight Mile Plains, street name is 54 Brandl St, post code is 4113 |
        "));
   },

    // \groups BAT,1.1,MOBILITY-538
    display_a_map: function()
    {
        // Test meta data
        testTitle = "Maps and Navigation - Display a Map";
        testBinary = "mapsdemo";
        testSource = "$MOBILITYDIR/tests/manual/location-testing-tools/geoservicedemo";
        testGoal = "Verify that a map can be displayed";
        testPreconditions = "None";
        testGroups = "BAT_MOBILITY";
        testRequirements = "";

        // Test steps
        prompt(twiki("---+++ " + testTitle + "<br><br>
            *Goal:* " + testGoal + "<br>
            *Pre-Requisites:* " + testPreconditions + "<br>
            *Tested Binary:* " + testBinary + "<br>
            *Requirements:* " + testRequirements + "<br>
            
            Note that  internet connection is required for this test case.
            | *Step* | *Verification* |
            | Run the mapsdemo application (sources are /examples/mapsdemo) | Map for current location is displayed on the screen |
        "));
    },

    // \groups BAT,1.1,MOBILITY-538
    different_map_types: function()
    {
        // Test meta data
        testTitle = "Maps and Navigation - Map View Options";
        testBinary = "mapviewer"; // (sources are /tests/location-testing-tools/mapviewer)
        testSource = "$MOBILITYDIR/tests/location-testing-tools/mapviewer";
        testGoal = "Verify that maps can be shown in street, satellite and terrain mode.";
        testPreconditions = "<br>1. internet connection is required for this test case.<br>2. Nokia map engine supports only Street, Satellite and Terrain map types";
        testGroups = "BAT_MOBILITY";
        testRequirements = "";

        // 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 and map for current location is displayed on the screen |
            | Press Option button | |
            | Press Street button (if button is enabled) | Map is drawn in Street view |
            | Press Option button | |
            | Press Satellite button (if button is enabled) | Map is drawn in Satellite view |
            | Press Option button | |
            | Press Terrain button (if button is enabled) | Map is drawn in Satellite view |
        "));
    },

    // \groups BAT,1.1,MOBILITY-538
    zooming_support:function()
    {
        // Test meta data
        testTitle = "Maps and Navigation - Zooming";
        testBinary = "mapsdemo"; // (sources are /tests/location-testing-tools/mapviewer)
        testSource = "$MOBILITYDIR/examples/mapsdemo";
        testGoal = "Verify that maps can be zoomed in and out.";
        testPreconditions = "internet connection is required for this test case.";
        testGroups = "BAT_MOBILITY";
        testRequirements = "";

        // 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 |
            | Run the mapsdemo application | Map is displayed on the screen |
            | Press - button | Map is zoomed out correctly |
            | Press + button | Map is zoomed in correctly |
        "));
    },

    // \groups BAT,1.1,MOBILITY-538
    capturing_coordinates:function()
    {
        // Test meta data
        testTitle = "Maps and Navigation - Coordinate Capturing";
        testBinary = "mapviewer"; // (sources are /tests/location-testing-tools/mapviewer)
        testSource = "$MOBILITYDIR/tests/location-testing-tools/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_MOBILITY";
        testRequirements = "";

        // 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 |
            | Navigate and/or zoom in the map to see Brisbane | |
            | Right mouse click on the square which represents Brisbane | |
            | Select Coordinates menu item | |
            | Select Capture menu item | Verify that dialog with coordinates appears on the screen. Latitude is about -27.46, longitude is about 153.02 |
        "));
    },

    // \groups BAT,1.2,QTMOBILITY-757,QTMOBILITY-701
    pixmap_object_zooming: function()
    {
        //Test application testqtLocation covers just one use case meanwhile we have 8 different situation
        //depending on what units and transforms are in use (we have 4 types of units (PixelUnit, MeterUnit, RelativeArcSecondUnit, AbsoluteArcSecondUnit)
        //and 2 types of transforms (BilinearTransform, ExactTransform)). New set of tests has to be created as soon as testqtLocation is improved.

        // Test meta data
        testTitle = "Maps and Navigation - Pixmap Object Zooming";
        testBinary = "testQtLocation";
        testSource = "$MOBILITYDIR/tests/applications/location/testqtlocation";
        testGoal = "Verify that pixmap object can be zoomed";
        testPreconditions = "GPS and internet connection is required for this test case";
        testGroups = "BAT_MOBILITY";
        testRequirements = "QTMOBILITY-757: Be able to prevent a QGeoMapPixmapObject from being scaled when zooming occurs<br>
                            QTMOBILITY-701: Add a QGraphicsItem based map object.";

        // 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 the MapNavigation | |
            | Go to Map tab | Verify that map is loaded for current position |
            | Swith to MapObject mode | |
            | Tap on the screen to create pixmap object | Verify that blue square appears on the screen in place of touch |
            | Switch to Pan/Zoom mode | |
            | Increase zoom level | Verify that the blue square is not scaled |
            | Decrease zoom level | Verify that the blue square is not scaled |
        "));
    },

    request_landmarks_for_given_coordinate_with_reverse_geocoding: function()
    {
        // Test meta data
        testTitle = "Maps and Navigation - Landmarks for Coordinate with Reverse Geocoding";
        testBinary = "weatherinfo_with_location";
        testSource = "$MOBILITYDIR/demos/weatherinfo";
        testGoal = "Verify that ";
        testPreconditions = "None";
        testGroups = "BAT_MOBILITY";
        testRequirements = "";

        // 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 |");
*/

        skip( "Nothing tested", SkipAll );
    },


    //TESTED_COMPONENT=plugins/declarative/location

    // \groups BAT,1.2,QTMOBILITY-796
    qml_display_map: function()
    {
        // Test meta data
        testTitle = "Location - Map Display";
        testBinary = "qml_mapviewer";
        testSource = "$MOBILITYDIR/tests/examples/declarative-location/mapviewer";
        testGoal = "Verify that a map can be loaded for a given position.";
        testPreconditions = "Internet connection is required for this test case.";
        testGroups = "BAT_MOBILITY";
        testRequirements = "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* |
            | Run the qml_mapviewer application (sources are in examples/declarative-location/mapviewer) | Verify that map is loaded for the default location (lat 51.5, long -0.11) |
        "));
    },

    // \groups BAT,1.2,QTMOBILITY-796
    qml_zoom_a_map: function()
    {
        // Test meta data
        testTitle = "Location - Zoom In and Out";
        testBinary = "testQtLocation";
        testSource = "$MOBILITYDIR/tests/applications/location/testqtlocation";
        testGoal = "Verify that ";
        testPreconditions = "GPS and internet connection is required for this test case.";
        testGroups = "BAT_MOBILITY";
        testRequirements = "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 |
            | Select the MapNavigation.qml | |
            | Tap on the Mode button | Verify that map is loaded |
            | Tap on Plus button | Verify that map is zoomed in |
            | Tap on Plus button | Verify that zoom level is decreased and map is displayed correctly with new zoom level |
        "));
    }


}  // end of testcase


/*

----Maps And Navigation use cases

    list_of_way_points: function() {    },

    distinguish_pedestrian_and_car_navigation: function() {    },

    find_matching_landmarks_for_given_search_criteria_with_geocoding: function() {    },

    provide_map_for_given_coordinate: function() {    },

    online_and_offline: function() {    }

*/