]> git.openstreetmap.org Git - nominatim.git/blob - test/bdd/api/details/simple.feature
expand details BDD tests
[nominatim.git] / test / bdd / api / details / simple.feature
1 @APIDB
2 Feature: Object details
3     Check details page for correctness
4
5     Scenario: Details by place ID
6         When sending details query for 107077
7         Then the result is valid json
8         And results contain
9             | place_id |
10             | 107077   |
11
12
13     Scenario Outline: Details via OSM id
14         When sending details query for <type><id>
15         Then the result is valid json
16         And results contain
17             | osm_type | osm_id |
18             | <type>   | <id> |
19
20     Examples:
21      | type | id |
22      | N    | 5484325405 |
23      | W    | 43327921 |
24      | R    | 123924 |
25
26
27     Scenario Outline: Details for different class types for the same OSM id
28         When sending details query for N300209696:<class>
29         Then the result is valid json
30         And results contain
31           | osm_type | osm_id    | category |
32           | N        | 300209696 | <class> |
33
34     Examples:
35      | class |
36      | tourism |
37      | natural |
38      | mountain_pass |
39
40
41     Scenario Outline: Details via unknown OSM id
42         When sending details query for <object>
43         Then a HTTP 404 is returned
44
45     Examples:
46       | object |
47       | 1 |
48       | R1 |
49       | N300209696:highway |
50
51
52     @v1-api-php-only
53     Scenario: Details for interpolation way just return the dependent street
54         When sending details query for W1
55         Then the result is valid json
56         And results contain
57             | category |
58             | highway |
59
60
61      @v1-api-python-only
62      Scenario: Details for interpolation way return the interpolation
63         When sending details query for W1
64         Then the result is valid json
65         And results contain
66             | category | type   | osm_type | osm_id | admin_level |
67             | place    | houses | W        | 1      | 15          |
68
69
70     @v1-api-php-only
71      Scenario: Details for Tiger way just return the dependent street
72         When sending details query for 112871
73         Then the result is valid json
74         And results contain
75             | category |
76             | highway |
77
78
79      @v1-api-python-only
80      Scenario: Details for interpolation way return the interpolation
81         When sending details query for 112871
82         Then the result is valid json
83         And results contain
84             | category | type   | admin_level |
85             | place    | houses | 15          |
86         And result has not attributes osm_type,osm_id
87
88
89     @v1-api-php-only
90      Scenario: Details for postcodes just return the dependent place
91         When sending details query for 112820
92         Then the result is valid json
93         And results contain
94             | category |
95             | boundary |
96
97
98      @v1-api-python-only
99      Scenario: Details for interpolation way return the interpolation
100         When sending details query for 112820
101         Then the result is valid json
102         And results contain
103             | category | type     | admin_level |
104             | place    | postcode | 15          |
105         And result has not attributes osm_type,osm_id