Add polygon geographies to Budgets' map

Note that in the budgets wizard test we now create district with no
associated geozone, so the text "all city" will appear in the districts
table too, meaning we can't use `within "section", text: "All city" do`
anymore since it would result in an ambiguous match.

Co-Authored-By: Julian Herrero <microweb10@gmail.com>
Co-Authored-By: Javi Martín <javim@elretirao.net>
This commit is contained in:
Matheus Miranda
2018-11-13 17:22:55 -02:00
committed by Javi Martín
parent d1f1e1dfea
commit de13e789dd
33 changed files with 379 additions and 26 deletions

View File

@@ -8,10 +8,19 @@ FactoryBot.define do
sequence(:name) { |n| "District #{n}" }
sequence(:external_code, &:to_s)
sequence(:census_code, &:to_s)
color { "#0081aa" }
trait :in_census do
census_code { "01" }
end
trait :with_html_coordinates do
html_map_coordinates { "30,139,45,153,77,148,107,165" }
end
trait :with_geojson do
geojson { '{ "geometry": { "type": "Polygon", "coordinates": [[-0.117,51.513],[-0.118,51.512],[-0.119,51.514]] } }' }
end
end
factory :banner do