From 51709b58ff24277e64193b5e9cc5cd2ff610a58f Mon Sep 17 00:00:00 2001 From: sweco-semhul Date: Thu, 16 Nov 2017 12:45:37 +0100 Subject: [PATCH] Updating ciao tests to reflect current status in master to make them run --- .../autocomplete/layers_alias_coarse.coffee | 5 +++- test/ciao/autocomplete/layers_invalid.coffee | 2 +- .../layers_mix_invalid_valid.coffee | 2 +- ...boundary_circle_valid_radius_coarse.coffee | 23 ++++++++++++++++--- test/ciao/reverse/layers_alias_coarse.coffee | 5 +++- test/ciao/reverse/layers_invalid.coffee | 2 +- .../reverse/layers_mix_invalid_valid.coffee | 2 +- test/ciao/reverse/sources_multiple.coffee | 4 ++-- test/ciao/search/layers_alias_coarse.coffee | 5 +++- test/ciao/search/layers_invalid.coffee | 2 +- .../search/layers_mix_invalid_valid.coffee | 2 +- 11 files changed, 40 insertions(+), 14 deletions(-) diff --git a/test/ciao/autocomplete/layers_alias_coarse.coffee b/test/ciao/autocomplete/layers_alias_coarse.coffee index 5ceaaa46..fe934f55 100644 --- a/test/ciao/autocomplete/layers_alias_coarse.coffee +++ b/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['size'].should.eql 10 json.geocoding.query.layers.should.eql [ "continent", + "empire", "country", "dependency", "macroregion", @@ -45,5 +46,7 @@ json.geocoding.query.layers.should.eql [ "continent", "neighbourhood", "microhood", "disputed", - "postalcode" + "postalcode", + "ocean", + "marinearea" ] diff --git a/test/ciao/autocomplete/layers_invalid.coffee b/test/ciao/autocomplete/layers_invalid.coffee index 5396387a..74b04379 100644 --- a/test/ciao/autocomplete/layers_invalid.coffee +++ b/test/ciao/autocomplete/layers_invalid.coffee @@ -24,7 +24,7 @@ json.features.should.be.instanceof Array #? expected 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 should.not.exist json.geocoding.warnings diff --git a/test/ciao/autocomplete/layers_mix_invalid_valid.coffee b/test/ciao/autocomplete/layers_mix_invalid_valid.coffee index 6a9cc488..7357fda5 100644 --- a/test/ciao/autocomplete/layers_mix_invalid_valid.coffee +++ b/test/ciao/autocomplete/layers_mix_invalid_valid.coffee @@ -24,7 +24,7 @@ json.features.should.be.instanceof Array #? expected 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 should.not.exist json.geocoding.warnings diff --git a/test/ciao/reverse/boundary_circle_valid_radius_coarse.coffee b/test/ciao/reverse/boundary_circle_valid_radius_coarse.coffee index b3f76c69..7d5d9bfc 100644 --- a/test/ciao/reverse/boundary_circle_valid_radius_coarse.coffee +++ b/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 #? expected warnings -should.exist json.geocoding.warnings -json.geocoding.warnings.should.eql [ 'boundary.circle.radius is not applicable for coarse reverse' ] +should.not.exist json.geocoding.warnings #? inputs 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.lon'].should.eql -73.990342 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.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" +] \ No newline at end of file diff --git a/test/ciao/reverse/layers_alias_coarse.coffee b/test/ciao/reverse/layers_alias_coarse.coffee index f70eeb11..276ca93f 100644 --- a/test/ciao/reverse/layers_alias_coarse.coffee +++ b/test/ciao/reverse/layers_alias_coarse.coffee @@ -31,6 +31,7 @@ should.not.exist json.geocoding.warnings #? inputs json.geocoding.query['size'].should.eql 10 json.geocoding.query.layers.should.eql [ "continent", + "empire", "country", "dependency", "macroregion", @@ -44,5 +45,7 @@ json.geocoding.query.layers.should.eql [ "continent", "neighbourhood", "microhood", "disputed", - "postalcode" + "postalcode", + "ocean", + "marinearea" ] diff --git a/test/ciao/reverse/layers_invalid.coffee b/test/ciao/reverse/layers_invalid.coffee index 7298285a..cbd46a89 100644 --- a/test/ciao/reverse/layers_invalid.coffee +++ b/test/ciao/reverse/layers_invalid.coffee @@ -24,7 +24,7 @@ json.features.should.be.instanceof Array #? expected 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 should.not.exist json.geocoding.warnings diff --git a/test/ciao/reverse/layers_mix_invalid_valid.coffee b/test/ciao/reverse/layers_mix_invalid_valid.coffee index c3165cf7..90d0ea41 100644 --- a/test/ciao/reverse/layers_mix_invalid_valid.coffee +++ b/test/ciao/reverse/layers_mix_invalid_valid.coffee @@ -24,7 +24,7 @@ json.features.should.be.instanceof Array #? expected 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 should.not.exist json.geocoding.warnings diff --git a/test/ciao/reverse/sources_multiple.coffee b/test/ciao/reverse/sources_multiple.coffee index 4fd24366..986adc0e 100644 --- a/test/ciao/reverse/sources_multiple.coffee +++ b/test/ciao/reverse/sources_multiple.coffee @@ -1,6 +1,6 @@ #> 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 response.statusCode.should.be.equal 200 @@ -30,4 +30,4 @@ should.not.exist json.geocoding.warnings #? inputs json.geocoding.query['size'].should.eql 10 -json.geocoding.query.sources.should.eql ["openstreetmap", "geonames"] +json.geocoding.query.sources.should.eql ["openstreetmap", "openaddresses"] diff --git a/test/ciao/search/layers_alias_coarse.coffee b/test/ciao/search/layers_alias_coarse.coffee index af8d3d8e..c9ecf7d3 100644 --- a/test/ciao/search/layers_alias_coarse.coffee +++ b/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['size'].should.eql 10 json.geocoding.query.layers.should.eql [ "continent", + "empire", "country", "dependency", "macroregion", @@ -45,5 +46,7 @@ json.geocoding.query.layers.should.eql [ "continent", "neighbourhood", "microhood", "disputed", - "postalcode" + "postalcode", + "ocean", + "marinearea" ] diff --git a/test/ciao/search/layers_invalid.coffee b/test/ciao/search/layers_invalid.coffee index 52b370dd..2d8b6275 100644 --- a/test/ciao/search/layers_invalid.coffee +++ b/test/ciao/search/layers_invalid.coffee @@ -24,7 +24,7 @@ json.features.should.be.instanceof Array #? expected 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 should.not.exist json.geocoding.warnings diff --git a/test/ciao/search/layers_mix_invalid_valid.coffee b/test/ciao/search/layers_mix_invalid_valid.coffee index da39b9e8..91393881 100644 --- a/test/ciao/search/layers_mix_invalid_valid.coffee +++ b/test/ciao/search/layers_mix_invalid_valid.coffee @@ -24,7 +24,7 @@ json.features.should.be.instanceof Array #? expected 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 should.not.exist json.geocoding.warnings