]> git.openstreetmap.org Git - nominatim.git/blob - test/bdd/api/reverse/params.feature
Merge branch 'patch-1' of https://github.com/ganeshkrishnan1/Nominatim into ganeshkri...
[nominatim.git] / test / bdd / api / reverse / params.feature
1 @APIDB
2 Feature: Parameters for Reverse API
3     Testing different parameter options for reverse API.
4
5     Scenario Outline: Reverse-geocoding without address
6         When sending <format> reverse coordinates 53.603,10.041
7           | addressdetails |
8           | 0 |
9         Then exactly 1 result is returned
10         And result has not attributes address
11
12     Examples:
13       | format |
14       | json |
15       | jsonv2 |
16       | geojson |
17       | xml |
18
19     Scenario Outline: Coordinates must be floating-point numbers
20         When sending reverse coordinates <coords>
21         Then a HTTP 400 is returned
22
23     Examples:
24       | coords    |
25       | -45.3,;   |
26       | gkjd,50   |
27
28     Scenario Outline: Reverse Geocoding with extratags
29         When sending <format> reverse coordinates 10.776234290950017,106.70425325632095
30           | extratags |
31           | 1 |
32         Then result 0 has attributes extratags
33
34     Examples:
35         | format |
36         | xml |
37         | json |
38         | jsonv2 |
39         | geojson |
40
41     Scenario Outline: Reverse Geocoding with namedetails
42         When sending <format> reverse coordinates 10.776455623137625,106.70175343751907
43           | namedetails |
44           | 1 |
45         Then result 0 has attributes namedetails
46
47     Examples:
48         | format |
49         | xml |
50         | json |
51         | jsonv2 |
52         | geojson |
53
54     Scenario Outline: Reverse Geocoding contains TEXT geometry
55         When sending <format> reverse coordinates 47.165989816710066,9.515774846076965
56           | polygon_text |
57           | 1 |
58         Then result 0 has attributes <response_attribute>
59
60     Examples:
61         | format   | response_attribute |
62         | xml      | geotext |
63         | json     | geotext |
64         | jsonv2   | geotext |
65
66     Scenario Outline: Reverse Geocoding contains SVG geometry
67         When sending <format> reverse coordinates 47.165989816710066,9.515774846076965
68           | polygon_svg |
69           | 1 |
70         Then result 0 has attributes <response_attribute>
71
72     Examples:
73         | format   | response_attribute |
74         | xml      | geosvg |
75         | json     | svg |
76         | jsonv2   | svg |
77
78     Scenario Outline: Reverse Geocoding contains KML geometry
79         When sending <format> reverse coordinates 47.165989816710066,9.515774846076965
80           | polygon_kml |
81           | 1 |
82         Then result 0 has attributes <response_attribute>
83
84     Examples:
85         | format   | response_attribute |
86         | xml      | geokml |
87         | json     | geokml |
88         | jsonv2   | geokml |
89
90     Scenario Outline: Reverse Geocoding contains GEOJSON geometry
91         When sending <format> reverse coordinates 47.165989816710066,9.515774846076965
92           | polygon_geojson |
93           | 1 |
94         Then result 0 has attributes <response_attribute>
95
96     Examples:
97         | format   | response_attribute |
98         | xml      | geojson |
99         | json     | geojson |
100         | jsonv2   | geojson |
101         | geojson  | geojson |
102
103     Scenario Outline: Reverse Geocoding in geojson format contains no non-geojson geometry
104         When sending geojson reverse coordinates 47.165989816710066,9.515774846076965
105           | polygon_text | polygon_svg | polygon_geokml |
106           | 1            | 1           | 1              |
107         Then result 0 has not attributes <response_attribute>
108
109     Examples:
110         | response_attribute |
111         | geotext            |
112         | polygonpoints      |
113         | svg                |
114         | geokml             |