]> git.openstreetmap.org Git - nominatim.git/blob - test/bdd/features/api/details/simple.feature
release 5.3.2.post9
[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: Details request without osmtype
21         When sending v1/details
22           | osmid |
23           | <id>  |
24         Then a HTTP 400 is returned
25         And the result is valid json
26
27     Scenario: Details request with unknown OSM id
28         When sending v1/details
29           | osmtype | osmid |
30           | R       | 1     |
31         Then a HTTP 404 is returned
32         And the result is valid json
33
34     Scenario: Details request with unknown class
35         When sending v1/details
36           | osmtype | osmid     | class   |
37           | N       | 300209696 | highway |
38         Then a HTTP 404 is returned
39         And the result is valid json
40
41     Scenario: Details for interpolation way return the interpolation
42         When sending v1/details
43           | osmtype | osmid |
44           | W       | 1     |
45         Then a HTTP 200 is returned
46         And the result is valid json
47         And the result contains
48           | category | type   | osm_type | osm_id | admin_level |
49           | place    | houses | W        | 1      | 15          |
50
51
52     @skip
53     Scenario: Details for interpolation way return the interpolation
54         When sending details query for 112871
55         Then the result is valid json
56         And the result contains
57             | category | type   | admin_level |
58             | place    | houses | 15          |
59         And result has not attributes osm_type,osm_id
60
61
62     @skip
63     Scenario: Details for postcode
64         When sending details query for 112820
65         Then the result is valid json
66         And the result contains
67             | category | type     | admin_level |
68             | place    | postcode | 15          |
69         And result has not attributes osm_type,osm_id
70
71
72     Scenario Outline: Details debug output returns no errors
73         Given debug output is enabled
74         When sending v1/details
75           | osmtype | osmid | debug |
76           | <type>  | <id>  | 1     |
77         Then a HTTP 200 is returned
78         And the result is valid html
79
80     Examples:
81      | type | id |
82      | N    | 5484325405 |
83      | W    | 43327921 |
84      | R    | 123924 |