Browse Source

Update VCR fixture for place to match better import

Now with administrative regions and address.
tags/0.3.6^2
Bèr Kessels 3 months ago
parent
commit
0fbc71ee01

+ 11
- 8
test/fixtures/vcr_cassettes/bragi_hm_nijmegen.yml View File

@@ -15,20 +15,23 @@ http_interactions:
message: OK
headers:
content-length:
- '1186'
- '2623'
connection:
- close
content-type:
- application/json
cache-control:
- max-age=3600
content-type:
- application/json
date:
- Wed, 18 Mar 2020 16:14:01 GMT
- Thu, 23 Apr 2020 14:39:02 GMT
body:
encoding: UTF-8
string: '{"type":"FeatureCollection","geocoding":{"version":"0.1.0","query":""},"features":[{"type":"Feature","geometry":{"coordinates":[5.865323399999999,51.8473397],"type":"Point"},"properties":{"geocoding":{"id":"poi:osm:node:989225414","type":"poi","label":"H&M","name":"H&M","postcode":"6511RA","city":null,"citycode":null,"administrative_regions":[],"poi_types":[{"id":"poi_type:shop:clothes","name":"Kledingwinkel"}],"properties":[{"key":"addr:city","value":"Nijmegen"},{"key":"addr:country","value":"NL"},{"key":"addr:housenumber","value":"1"},{"key":"addr:postcode","value":"6511RA"},{"key":"addr:street","value":"Burchtstraat"},{"key":"name","value":"H&M"},{"key":"opening_hours","value":"Mo-We
10:00-18:00; Th 10:00-21:00; Fr 10:00-18:00; Sa 09:30-17:30; Su 12:00-17:30"},{"key":"shop","value":"clothes"},{"key":"shop:number","value":"NL0050"},{"key":"source","value":"BAG;http://www.hm.com/nl/"},{"key":"source:date","value":"2014-05-07"},{"key":"wheelchair","value":"yes"}],"address":{"id":"addr:5.8652752;51.8473134:4","type":"house","label":"Gapershof
4","name":"Burchtstraat 1","housenumber":"1","street":"Burchtstraat","postcode":"6511RA","city": "Nijmegen","citycode":null,"administrative_regions":[]}}}}]}'
string: '{"type":"FeatureCollection","geocoding":{"version":"0.1.0","query":""},"features":[{"type":"Feature","geometry":{"coordinates":[5.865323399999999,51.8473397],"type":"Point"},"properties":{"geocoding":{"id":"poi:osm:node:989225414","type":"poi","label":"H&M
(Nijmegen)","name":"H&M","postcode":"6511RA","city":"Nijmegen","citycode":"","administrative_regions":[{"id":"admin:osm:relation:1200994","insee":"","level":10,"label":"Nijmegen,
Gelderland, Nederland","name":"Nijmegen","zip_codes":[],"coord":{"lon":5.833201435730207,"lat":51.83480943401887},"bbox":[5.7576206,51.7905891,5.9083469,51.8946209],"zone_type":"city","parent_id":"admin:osm:relation:47554","codes":[{"name":"ref:woonplaatscode","value":"3030"},{"name":"wikidata","value":"Q47887"}]},{"id":"admin:osm:relation:47554","insee":"","level":4,"label":"Gelderland,
Nederland","name":"Gelderland","zip_codes":[],"coord":{"lon":5.9108573,"lat":51.984257},"bbox":[4.9938547,51.7335807,6.8328017,52.522025],"zone_type":"state","parent_id":"admin:osm:relation:47796","codes":[{"name":"ISO3166-2","value":"NL-GE"},{"name":"ref:provinciecode","value":"25"},{"name":"wikidata","value":"Q775"}]},{"id":"admin:osm:relation:47796","insee":"","level":3,"label":"Nederland","name":"Nederland","zip_codes":[],"coord":{"lon":4.8936041,"lat":52.3727598},"bbox":[3.080161,50.7503658,7.227498499999999,53.744389],"zone_type":"country","parent_id":null,"codes":[{"name":"wikidata","value":"Q55"}]}],"poi_types":[{"id":"poi_type:shop:clothes","name":"Kledingwinkel"}],"properties":[{"key":"addr:city","value":"Nijmegen"},{"key":"addr:country","value":"NL"},{"key":"addr:housenumber","value":"1"},{"key":"addr:postcode","value":"6511RA"},{"key":"addr:street","value":"Burchtstraat"},{"key":"name","value":"H&M"},{"key":"opening_hours","value":"Mo-We
10:00-18:00; Th 10:00-21:00; Fr 10:00-18:00; Sa 09:30-17:30"},{"key":"shop","value":"clothes"},{"key":"shop:number","value":"NL0050"},{"key":"source","value":"BAG;http://www.hm.com/nl/"},{"key":"source:date","value":"2014-05-07"},{"key":"wheelchair","value":"yes"}],"address":{"id":"addr:5.8652752;51.8473134:4","type":"house","label":"Gapershof
4 (Nijmegen)","name":"Gapershof 4","housenumber":"4","street":"Gapershof","postcode":"6511VA","city":"Nijmegen","citycode":"","administrative_regions":[{"id":"admin:osm:relation:1201020","insee":"","level":8,"label":"Nijmegen","name":"Nijmegen","zip_codes":[],"coord":{"lon":5.8634696,"lat":51.8427385},"bbox":[5.7576206,51.7905891,5.9083469,51.8946209],"zone_type":"city","parent_id":null,"codes":[{"name":"ref:gemeentecode","value":"268"},{"name":"wikidata","value":"Q47887"}]}]}}}}]}'
http_version: null
recorded_at: Thu, 09 Nov 1989 17:57:00 GMT
recorded_at: Thu, 23 Apr 2020 14:39:02 GMT
recorded_with: VCR 5.1.0

+ 3
- 2
test/integration/web/view_places_test.rb View File

@@ -27,16 +27,17 @@ describe 'web view places' do

# Name and Address
assert_selector page, 'h2', text: 'H&M'
# TODO: find out why the import matches Gapershof and not Burchtstraat
assert_selector page,
'address',
text: 'Burchtstraat 1 , 6511RA Nijmegen'
text: 'Gapershof 4 , 6511VA Nijmegen'

# A badge with class success means open.
assert_selector page, 'span.badge-success', text: 'Open'

within('table#opening_hours') do
assert_selector page, 'tr', text: 'Ma 10:00 18:00'
assert_selector page, 'tr', text: 'Zo 12:00 17:30'
assert_selector page, 'tr', text: 'Zo'

# Current day is Thursday. Current Day is bold
assert_equal 4, die_wende.wday

Loading…
Cancel
Save