1 Feature: v1/reverse Parameter Tests
 
   2     Tests for parameter inputs for the v1 reverse endpoint.
 
   3     This file contains mostly bad parameter input. Valid parameters
 
   4     are tested in the format tests.
 
   7         When sending v1/reverse
 
   9           | 47.14122383 | 9.52169581334 | sdf |
 
  10         Then a HTTP 400 is returned
 
  12     Scenario: Missing lon parameter
 
  13         When sending v1/reverse
 
  16         Then a HTTP 400 is returned
 
  18     Scenario: Missing lat parameter
 
  19         When sending v1/reverse
 
  22         Then a HTTP 400 is returned
 
  24     Scenario Outline: Bad format for lat or lon
 
  25         When sending v1/reverse
 
  28         Then a HTTP 400 is returned
 
  41           | <script></script> | 3.4 |
 
  42           | 3.4 | <script></script> |
 
  46     Scenario: Non-numerical zoom levels return an error
 
  47         When sending v1/reverse
 
  49           | 47.14122383 | 9.52169581334 | adfe |
 
  50         Then a HTTP 400 is returned
 
  52     Scenario Outline: Truthy values for boolean parameters
 
  53         When sending v1/reverse
 
  54           | lat         | lon           | addressdetails |
 
  55           | 47.14122383 | 9.52169581334 | <value> |
 
  56         Then a HTTP 200 is returned
 
  57         And the result is valid xml
 
  58         And the result has attributes address
 
  60         When sending v1/reverse
 
  61           | lat         | lon           | extratags |
 
  62           | 47.14122383 | 9.52169581334 | <value> |
 
  63         Then a HTTP 200 is returned
 
  64         And the result is valid xml
 
  65         And the result has attributes extratags
 
  67         When sending v1/reverse
 
  68           | lat         | lon           | namedetails |
 
  69           | 47.14122383 | 9.52169581334 | <value> |
 
  70         Then a HTTP 200 is returned
 
  71         And the result is valid xml
 
  72         And the result has attributes namedetails
 
  83     Scenario: Only one geometry can be requested
 
  84         When sending v1/reverse
 
  85           | lat         | lon           | polygon_text | polygon_svg |
 
  86           | 47.14122383 | 9.52169581334 | 1            | 1           |
 
  87         Then a HTTP 400 is returned
 
  89     Scenario Outline: Illegal jsonp are not allowed
 
  90         When sending v1/reverse with format json
 
  91           | lat         | lon           | json_callback |
 
  92           | 47.14122383 | 9.52169581334 | <data> |
 
  93         Then a HTTP 400 is returned
 
 102     Scenario Outline: Reverse debug mode produces valid HTML
 
 103         When sending v1/reverse
 
 104           | lat   | lon   | debug |
 
 105           | <lat> | <lon> | 1 |
 
 106         Then a HTTP 200 is returned
 
 107         And the result is valid html
 
 112           | 47.06645 | 9.56601 |
 
 113           | 47.14081 | 9.52267 |
 
 115     Scenario Outline: Full address display for city housenumber-level address with street
 
 116         When sending v1/reverse with format <format>
 
 118           | 47.1068011 | 9.52810091 |
 
 119         Then a HTTP 200 is returned
 
 120         And the result is valid <outformat>
 
 121         And the result contains in field address
 
 125           | neighbourhood  | Oberdorf  |
 
 126           | village        | Triesen   |
 
 127           | ISO3166-2-lvl8 | LI-09     |
 
 128           | county         | Oberland  |
 
 130           | country        | Liechtenstein |
 
 131           | country_code   | li        |
 
 134           | format  | outformat |
 
 139     Scenario Outline: Results with name details
 
 140         When sending v1/reverse with format <format>
 
 141           | lat      | lon     | zoom | namedetails |
 
 142           | 47.14052 | 9.52202 | 14   | 1           |
 
 143         Then a HTTP 200 is returned
 
 144         And the result is valid <outformat>
 
 145         And the result contains in field namedetails
 
 150           | format  | outformat |
 
 155     Scenario Outline: Results with extratags
 
 156         When sending v1/reverse with format <format>
 
 157           | lat      | lon     | zoom | extratags |
 
 158           | 47.14052 | 9.52202 | 14   | 1         |
 
 159         Then a HTTP 200 is returned
 
 160         And the result is valid <outformat>
 
 161         And the result contains in field extratags
 
 166           | format | outformat |