]> git.openstreetmap.org Git - nominatim.git/blob - test/bdd/features/api/details/simple.feature
release 5.1.0.post5
[nominatim.git] / test / bdd / features / api / details / simple.feature
1 Feature: Object details
2     Check details page for correctness
3
4     Scenario Outline: Details request with OSM id
5         When sending v1/details
6           | osmtype | osmid |
7           | <type>  | <id>  |
8         Then a HTTP 200 is returned
9         And the result is valid json
10         And the result contains
11             | osm_type | osm_id |
12             | <type>   | <id> |
13
14     Examples:
15      | type | id |
16      | N    | 5484325405 |
17      | W    | 43327921 |
18      | R    | 123924 |
19
20     Scenario Outline: Details request with different class types for the same OSM id
21         When sending v1/details
22           | osmtype | osmid     | class   |
23           | N       | 300209696 | <class> |
24         Then a HTTP 200 is returned
25         And the result is valid json
26         And the result contains
27           | osm_type | osm_id    | category |
28           | N        | 300209696 | <class>  |
29
30     Examples:
31      | class |
32      | tourism |
33      | mountain_pass |
34
35     Scenario: Details request without osmtype
36         When sending v1/details
37           | osmid |
38           | <id>  |
39         Then a HTTP 400 is returned
40         And the result is valid json
41
42     Scenario: Details request with unknown OSM id
43         When sending v1/details
44           | osmtype | osmid |
45           | R       | 1     |
46         Then a HTTP 404 is returned
47         And the result is valid json
48
49     Scenario: Details request with unknown class
50         When sending v1/details
51           | osmtype | osmid     | class   |
52           | N       | 300209696 | highway |
53         Then a HTTP 404 is returned
54         And the result is valid json
55
56     Scenario: Details for interpolation way return the interpolation
57         When sending v1/details
58           | osmtype | osmid |
59           | W       | 1     |
60         Then a HTTP 200 is returned
61         And the result is valid json
62         And the result contains
63           | category | type   | osm_type | osm_id | admin_level |
64           | place    | houses | W        | 1      | 15          |
65
66
67     @skip
68     Scenario: Details for interpolation way return the interpolation
69         When sending details query for 112871
70         Then the result is valid json
71         And the result contains
72             | category | type   | admin_level |
73             | place    | houses | 15          |
74         And result has not attributes osm_type,osm_id
75
76
77     @skip
78     Scenario: Details for postcode
79         When sending details query for 112820
80         Then the result is valid json
81         And the result contains
82             | category | type     | admin_level |
83             | place    | postcode | 15          |
84         And result has not attributes osm_type,osm_id
85
86
87     Scenario Outline: Details debug output returns no errors
88         When sending v1/details
89           | osmtype | osmid | debug |
90           | <type>  | <id>  | 1     |
91         Then a HTTP 200 is returned
92         And the result is valid html
93
94     Examples:
95      | type | id |
96      | N    | 5484325405 |
97      | W    | 43327921 |
98      | R    | 123924 |
99