Browse Source

fix: Merge pull request #1063 from sweco-semhul/correcting-ciao-test

Updating ciao tests to reflect current status in master to make them run
pull/1073/head
Diana Shkolnikov 7 years ago committed by GitHub
parent
commit
a8f27171fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      test/ciao/autocomplete/layers_alias_coarse.coffee
  2. 2
      test/ciao/autocomplete/layers_invalid.coffee
  3. 2
      test/ciao/autocomplete/layers_mix_invalid_valid.coffee
  4. 23
      test/ciao/reverse/boundary_circle_valid_radius_coarse.coffee
  5. 5
      test/ciao/reverse/layers_alias_coarse.coffee
  6. 2
      test/ciao/reverse/layers_invalid.coffee
  7. 2
      test/ciao/reverse/layers_mix_invalid_valid.coffee
  8. 4
      test/ciao/reverse/sources_multiple.coffee
  9. 5
      test/ciao/search/layers_alias_coarse.coffee
  10. 2
      test/ciao/search/layers_invalid.coffee
  11. 2
      test/ciao/search/layers_mix_invalid_valid.coffee

5
test/ciao/autocomplete/layers_alias_coarse.coffee

@ -32,6 +32,7 @@ should.not.exist json.geocoding.warnings
json.geocoding.query['text'].should.eql 'a' json.geocoding.query['text'].should.eql 'a'
json.geocoding.query['size'].should.eql 10 json.geocoding.query['size'].should.eql 10
json.geocoding.query.layers.should.eql [ "continent", json.geocoding.query.layers.should.eql [ "continent",
"empire",
"country", "country",
"dependency", "dependency",
"macroregion", "macroregion",
@ -45,5 +46,7 @@ json.geocoding.query.layers.should.eql [ "continent",
"neighbourhood", "neighbourhood",
"microhood", "microhood",
"disputed", "disputed",
"postalcode" "postalcode",
"ocean",
"marinearea"
] ]

2
test/ciao/autocomplete/layers_invalid.coffee

@ -24,7 +24,7 @@ json.features.should.be.instanceof Array
#? expected errors #? expected errors
should.exist json.geocoding.errors should.exist json.geocoding.errors
json.geocoding.errors.should.eql [ '\'notlayer\' is an invalid layers parameter. Valid options: coarse,address,venue,street,country,macroregion,region,county,localadmin,locality,borough,neighbourhood,continent,dependency,macrocounty,macrohood,microhood,disputed,postalcode' ] json.geocoding.errors.should.eql [ '\'notlayer\' is an invalid layers parameter. Valid options: coarse,address,venue,street,country,macroregion,region,county,localadmin,locality,borough,neighbourhood,continent,empire,dependency,macrocounty,macrohood,microhood,disputed,postalcode,ocean,marinearea' ]
#? expected warnings #? expected warnings
should.not.exist json.geocoding.warnings should.not.exist json.geocoding.warnings

2
test/ciao/autocomplete/layers_mix_invalid_valid.coffee

@ -24,7 +24,7 @@ json.features.should.be.instanceof Array
#? expected errors #? expected errors
should.exist json.geocoding.errors should.exist json.geocoding.errors
json.geocoding.errors.should.eql [ '\'notlayer\' is an invalid layers parameter. Valid options: coarse,address,venue,street,country,macroregion,region,county,localadmin,locality,borough,neighbourhood,continent,dependency,macrocounty,macrohood,microhood,disputed,postalcode' ] json.geocoding.errors.should.eql [ '\'notlayer\' is an invalid layers parameter. Valid options: coarse,address,venue,street,country,macroregion,region,county,localadmin,locality,borough,neighbourhood,continent,empire,dependency,macrocounty,macrohood,microhood,disputed,postalcode,ocean,marinearea' ]
#? expected warnings #? expected warnings
should.not.exist json.geocoding.warnings should.not.exist json.geocoding.warnings

23
test/ciao/reverse/boundary_circle_valid_radius_coarse.coffee

@ -26,14 +26,31 @@ json.features.should.be.instanceof Array
should.not.exist json.geocoding.errors should.not.exist json.geocoding.errors
#? expected warnings #? expected warnings
should.exist json.geocoding.warnings should.not.exist json.geocoding.warnings
json.geocoding.warnings.should.eql [ 'boundary.circle.radius is not applicable for coarse reverse' ]
#? inputs #? inputs
json.geocoding.query['size'].should.eql 10 json.geocoding.query['size'].should.eql 10
json.geocoding.query['layers'].should.eql 'coarse'
json.geocoding.query['point.lat'].should.eql 40.744243 json.geocoding.query['point.lat'].should.eql 40.744243
json.geocoding.query['point.lon'].should.eql -73.990342 json.geocoding.query['point.lon'].should.eql -73.990342
json.geocoding.query['boundary.circle.lat'].should.eql 40.744243 json.geocoding.query['boundary.circle.lat'].should.eql 40.744243
json.geocoding.query['boundary.circle.lon'].should.eql -73.990342 json.geocoding.query['boundary.circle.lon'].should.eql -73.990342
json.geocoding.query['boundary.circle.radius'].should.eql 999.9 json.geocoding.query['boundary.circle.radius'].should.eql 999.9
json.geocoding.query['layers'].should.eql [ "continent",
"empire",
"country",
"dependency",
"macroregion",
"region",
"locality",
"localadmin",
"macrocounty",
"county",
"macrohood",
"borough",
"neighbourhood",
"microhood",
"disputed",
"postalcode",
"ocean",
"marinearea"
]

5
test/ciao/reverse/layers_alias_coarse.coffee

@ -31,6 +31,7 @@ should.not.exist json.geocoding.warnings
#? inputs #? inputs
json.geocoding.query['size'].should.eql 10 json.geocoding.query['size'].should.eql 10
json.geocoding.query.layers.should.eql [ "continent", json.geocoding.query.layers.should.eql [ "continent",
"empire",
"country", "country",
"dependency", "dependency",
"macroregion", "macroregion",
@ -44,5 +45,7 @@ json.geocoding.query.layers.should.eql [ "continent",
"neighbourhood", "neighbourhood",
"microhood", "microhood",
"disputed", "disputed",
"postalcode" "postalcode",
"ocean",
"marinearea"
] ]

2
test/ciao/reverse/layers_invalid.coffee

@ -24,7 +24,7 @@ json.features.should.be.instanceof Array
#? expected errors #? expected errors
should.exist json.geocoding.errors should.exist json.geocoding.errors
json.geocoding.errors.should.eql [ '\'notlayer\' is an invalid layers parameter. Valid options: coarse,address,venue,street,country,macroregion,region,county,localadmin,locality,borough,neighbourhood,continent,dependency,macrocounty,macrohood,microhood,disputed,postalcode' ] json.geocoding.errors.should.eql [ '\'notlayer\' is an invalid layers parameter. Valid options: coarse,address,venue,street,country,macroregion,region,county,localadmin,locality,borough,neighbourhood,continent,empire,dependency,macrocounty,macrohood,microhood,disputed,postalcode,ocean,marinearea' ]
#? expected warnings #? expected warnings
should.not.exist json.geocoding.warnings should.not.exist json.geocoding.warnings

2
test/ciao/reverse/layers_mix_invalid_valid.coffee

@ -24,7 +24,7 @@ json.features.should.be.instanceof Array
#? expected errors #? expected errors
should.exist json.geocoding.errors should.exist json.geocoding.errors
json.geocoding.errors.should.eql [ '\'notlayer\' is an invalid layers parameter. Valid options: coarse,address,venue,street,country,macroregion,region,county,localadmin,locality,borough,neighbourhood,continent,dependency,macrocounty,macrohood,microhood,disputed,postalcode' ] json.geocoding.errors.should.eql [ '\'notlayer\' is an invalid layers parameter. Valid options: coarse,address,venue,street,country,macroregion,region,county,localadmin,locality,borough,neighbourhood,continent,empire,dependency,macrocounty,macrohood,microhood,disputed,postalcode,ocean,marinearea' ]
#? expected warnings #? expected warnings
should.not.exist json.geocoding.warnings should.not.exist json.geocoding.warnings

4
test/ciao/reverse/sources_multiple.coffee

@ -1,6 +1,6 @@
#> sources filter #> sources filter
path: '/v1/reverse?point.lat=1&point.lon=2&sources=openstreetmap,geonames' path: '/v1/reverse?point.lat=1&point.lon=2&sources=openstreetmap,openaddresses'
#? 200 ok #? 200 ok
response.statusCode.should.be.equal 200 response.statusCode.should.be.equal 200
@ -30,4 +30,4 @@ should.not.exist json.geocoding.warnings
#? inputs #? inputs
json.geocoding.query['size'].should.eql 10 json.geocoding.query['size'].should.eql 10
json.geocoding.query.sources.should.eql ["openstreetmap", "geonames"] json.geocoding.query.sources.should.eql ["openstreetmap", "openaddresses"]

5
test/ciao/search/layers_alias_coarse.coffee

@ -32,6 +32,7 @@ should.not.exist json.geocoding.warnings
json.geocoding.query['text'].should.eql 'a' json.geocoding.query['text'].should.eql 'a'
json.geocoding.query['size'].should.eql 10 json.geocoding.query['size'].should.eql 10
json.geocoding.query.layers.should.eql [ "continent", json.geocoding.query.layers.should.eql [ "continent",
"empire",
"country", "country",
"dependency", "dependency",
"macroregion", "macroregion",
@ -45,5 +46,7 @@ json.geocoding.query.layers.should.eql [ "continent",
"neighbourhood", "neighbourhood",
"microhood", "microhood",
"disputed", "disputed",
"postalcode" "postalcode",
"ocean",
"marinearea"
] ]

2
test/ciao/search/layers_invalid.coffee

@ -24,7 +24,7 @@ json.features.should.be.instanceof Array
#? expected errors #? expected errors
should.exist json.geocoding.errors should.exist json.geocoding.errors
json.geocoding.errors.should.eql [ '\'notlayer\' is an invalid layers parameter. Valid options: coarse,address,venue,street,country,macroregion,region,county,localadmin,locality,borough,neighbourhood,continent,dependency,macrocounty,macrohood,microhood,disputed,postalcode' ] json.geocoding.errors.should.eql [ '\'notlayer\' is an invalid layers parameter. Valid options: coarse,address,venue,street,country,macroregion,region,county,localadmin,locality,borough,neighbourhood,continent,empire,dependency,macrocounty,macrohood,microhood,disputed,postalcode,ocean,marinearea' ]
#? expected warnings #? expected warnings
should.not.exist json.geocoding.warnings should.not.exist json.geocoding.warnings

2
test/ciao/search/layers_mix_invalid_valid.coffee

@ -24,7 +24,7 @@ json.features.should.be.instanceof Array
#? expected errors #? expected errors
should.exist json.geocoding.errors should.exist json.geocoding.errors
json.geocoding.errors.should.eql [ '\'notlayer\' is an invalid layers parameter. Valid options: coarse,address,venue,street,country,macroregion,region,county,localadmin,locality,borough,neighbourhood,continent,dependency,macrocounty,macrohood,microhood,disputed,postalcode' ] json.geocoding.errors.should.eql [ '\'notlayer\' is an invalid layers parameter. Valid options: coarse,address,venue,street,country,macroregion,region,county,localadmin,locality,borough,neighbourhood,continent,empire,dependency,macrocounty,macrohood,microhood,disputed,postalcode,ocean,marinearea' ]
#? expected warnings #? expected warnings
should.not.exist json.geocoding.warnings should.not.exist json.geocoding.warnings

Loading…
Cancel
Save