]> git.openstreetmap.org Git - nominatim.git/blob - tests/features/api/reverse_simple.feature
correctly handle comma-only exclude_place_ids
[nominatim.git] / tests / features / api / reverse_simple.feature
1 Feature: Simple Reverse Tests
2     Simple tests for internal server errors and response format.
3     These tests should pass on any Nominatim installation.
4
5     Scenario Outline: Simple reverse-geocoding
6         When looking up xml coordinates <lat>,<lon>
7         Then the result is valid xml
8         When looking up json coordinates <lat>,<lon>
9         Then the result is valid json
10         When looking up jsonv2 coordinates <lat>,<lon>
11         Then the result is valid json
12
13     Examples:
14      | lat      | lon
15      | 0.0      | 0.0
16      | 45.3     | 3.5
17      | -79.34   | 23.5
18      | 0.23     | -178.555
19
20     Scenario Outline: Wrapping of legal jsonp requests
21         Given the request parameters
22         | json_callback
23         | foo
24         When looking up <format> coordinates 67.3245,0.456
25         Then the result is valid json
26
27     Examples:
28       | format
29       | json
30       | jsonv2
31
32     Scenario: Reverse-geocoding without address
33         Given the request parameters
34           | addressdetails
35           | 0
36         When looking up xml coordinates 36.791966,127.171726
37         Then the result is valid xml
38         When looking up json coordinates 36.791966,127.171726
39         Then the result is valid json
40         When looking up jsonv2 coordinates 36.791966,127.171726
41         Then the result is valid json
42
43     Scenario: Reverse-geocoding with zoom
44         Given the request parameters
45           | zoom
46           | 10
47         When looking up xml coordinates 36.791966,127.171726
48         Then the result is valid xml
49         When looking up json coordinates 36.791966,127.171726
50         Then the result is valid json
51         When looking up jsonv2 coordinates 36.791966,127.171726
52         Then the result is valid json
53
54     Scenario: Missing lon parameter
55         Given the request parameters
56           | lat
57           | 51.51
58         When sending an API call reverse
59         Then exactly 0 results are returned
60
61     Scenario: Missing lat parameter
62         Given the request parameters
63           | lon
64           | -79.39114
65         When sending an API call reverse
66         Then exactly 0 results are returned
67
68     Scenario: Missing osm_id parameter
69         Given the request parameters
70           | osm_type
71           | N
72         When sending an API call reverse
73         Then exactly 0 results are returned
74
75     Scenario: Missing osm_type parameter
76         Given the request parameters
77           | osm_id
78           | 3498564
79         When sending an API call reverse
80         Then exactly 0 results are returned
81
82     Scenario Outline: Bad format for lat or lon
83         Given the request parameters
84           | lat   | lon   |
85           | <lat> | <lon> |
86         When sending an API call reverse
87         Then exactly 0 results are returned
88
89     Examples:
90      | lat      | lon
91      | 48.9660  | 8,4482
92      | 48,9660  | 8.4482
93      | 48,9660  | 8,4482
94      | 48.966.0 | 8.4482
95      | 48.966   | 8.448.2
96      | Nan      | 8.448
97      | 48.966   | Nan