Bryan Housel
9faf8c0fe5
Test that fallback presets are there before data is loaded
...
Also, we don't actually need a vertex preset anymore, it was removed a while ago
2020-02-06 17:04:11 -05:00
Bryan Housel
2edf81605c
Remove fallback presets from the test data
...
presetIndex has them already
2020-02-06 16:26:31 -05:00
Bryan Housel
3f1f85a1e9
Restore some odd but necessary workarounds to the presetCollection test
2020-02-06 16:10:55 -05:00
Bryan Housel
3c6ba9703a
presetIndex.build -> presetIndex.merge, and make it merge data
2020-02-05 21:13:15 -05:00
Bryan Housel
e3e7cd3003
Memoize presetCollection.item (it's an Array.find)
...
Also add tests for `matchAllGeometry`
2020-02-05 10:32:20 -05:00
Bryan Housel
0fe766d9a4
WIP on external presets
...
- preset data is no longer bundled into iD.js
- some code pathways commented out re: external presets
- many changes so that tests can run without presets at start, or async
- still need to make sure fallbacks are always there (point, line, area, etc)
2020-02-05 09:38:26 -05:00
Bryan Housel
e19bcb77d5
Require init() call before coreContext starts doing things
...
(closes #7304 )
2020-01-29 19:27:12 -05:00
Quincy Morgan
7700fac66a
Update test label wording
2020-01-15 14:31:19 -05:00
Quincy Morgan
41355bf2a0
Rename "visible" property of presets to "addable" (re: a06ec59514b30a52601e3614ef69006d2dc1bc91)
2020-01-15 14:29:45 -05:00
Bryan Housel
2fd6359505
Boost matchScore if additional matches occur in addTags
...
(closes #6802 )
2019-08-26 12:53:03 -04:00
Tobias Zwick
a1b89332bb
add test
2019-04-30 22:15:34 +02:00
Bryan Housel
d0452e6be4
Convert fakeServer tests to use fakeFetch
...
- Many text expects are now wrapped in setTimeout, as the fetch
promises settle async now.
- This makes the tests somewhat brittle, and we should maybe consider
reworking some of them. For example it is very hard to perform
a test like `expect(spy).to.have.not.been.called` in an async way.
(We could instead inspect the fakeServer requests() to know this.)
- Also includes some trickery for osm.js, which uses d3-xml (fetch)
now for unauthenticated calls and osmauth (xhr) for authenticated calls
2019-04-26 22:29:48 -04:00
Quincy Morgan
7e92f6aa89
Combine vertex and point geometries into a single Point fallback preset
2019-03-18 12:36:20 -04:00
Quincy Morgan
12b1af7002
Don't say tags imply area for tags that iD doesn't have a preset for ( close #5933 )
2019-02-25 12:42:39 -05:00
Bryan Housel
71b2d2c6b7
Upgrade legacy symbols in tests
...
- iD.Context -> iD.coreContext
- iD.Graph -> iD.coreGraph
- iD.Node -> iD.osmNode
- iD.Way -> iD.osmWay
- iD.Relation -> iD.osmRelation
2019-01-30 15:43:02 -05:00
Bryan Housel
7138acc652
Properly export areaKeys, fix preset and maprules tests
2019-01-30 15:29:37 -05:00
Max Grossman
8f33a85a12
make collection.index function to handle failing tests
2018-12-17 17:16:10 -05:00
Max Grossman
1b51b8bc57
adding tests and updating/fixing external presets logic
2018-12-14 13:23:58 -05:00
Max Grossman
c897331cd1
presets test w/build
2018-12-13 13:30:38 -05:00
Max Grossman
96e44be69c
merge 2.12.2
2018-12-13 11:22:32 -05:00
Max Grossman
f3e6459191
working on preset visibility
2018-12-13 11:16:24 -05:00
Bryan Housel
ea9e3008a5
addTags() -> setTags() / removeTags() -> unsetTags()
...
This avoids overriding the `addTags` and `removeTags` objects with functions
2018-11-21 12:59:43 -05:00
Max Grossman
f168f85496
passing mapcss test w/out parser, use that on sever
...
ref #remote-presets
2018-08-10 09:16:59 -04:00
Max Grossman
659a291e89
add core overwrite for external preset source
...
ref #remote-presets
2018-07-17 16:43:00 -04:00
Bryan Housel
a5d04cc2f1
Fix the highway=pedestrian + area=yes test
2017-10-31 16:56:55 -04:00
Bryan Housel
b3842d97f4
Remove lodash from the test suite
...
(closes #4378 )
2017-10-18 14:37:39 -04:00
Bryan Housel
8abc39461b
Fallback Area preset should preserve the area=yes tag
...
(closes #4424 )
2017-10-10 20:54:41 -04:00
Bryan Housel
0d35c5ed59
Give preset priority in preset list when search matches name exactly
...
(closes #4325 )
2017-09-10 12:56:14 -04:00
Bryan Housel
de44a73e05
Fix areaKeys logic to better handle presets that can be area or line
2017-03-12 15:29:14 -04:00
Bryan Housel
9b7d79a3fe
Use live bound object for presets object, change context.presets() getter
2016-11-14 15:44:02 -05:00
Bryan Housel
bf67bb9534
iD.presets.presets (!) is now iD.presetsInit
2016-10-04 22:09:36 -04:00
Bryan Housel
87950fd472
Fix lib export, flatten names in tests and docs
2016-10-04 21:56:09 -04:00
Bryan Housel
747b9f37d5
Pacify eslint
2016-07-24 17:39:06 -07:00
Tom MacWright
af776501d3
Require locale, second pass ( #3259 )
...
* Require locale, second pass
* Remove t global, remove t where it isn't needed
2016-07-21 16:20:13 -04:00
Bryan Housel
0d8fb87f93
Treat entities on addr:interpolation lines as points, not vertices
...
(closes #3241 )
2016-07-14 13:00:36 -04:00
Bryan Housel
5f496f2020
Cleanup test html, alphabetize, make sure all tests run
2016-07-14 12:59:47 -04:00
Bryan Housel
c2629a3359
Add tests for diacritic mark replacement
2016-07-08 10:19:42 -04:00
Bryan Housel
0b3df36da0
Replace diacritics when doing fuzzy searches
...
(closes #3159 )
2016-07-07 23:54:00 -04:00
Bryan Housel
9f1fff0828
Eliminate unused var lint warnings from tests
2016-06-15 10:30:06 -04:00
Kushan Joshi
295b8544eb
Remove linting errors from spec/modes & spec/presets
2016-06-15 18:26:11 +05:30
Bryan Housel
649ba856f6
Preset.isFallback() should return true for the area: yes preset
2016-01-29 00:38:33 -05:00
Bryan Housel
99d037e97f
Better logic for adding area=yes ( closes #2578 )
...
This fixes a few issues:
1. before: checked first key in applyTags and break loop, now: check all of them
(this was what caused `area=yes` to be added to 'branded' presets:
the first key is for these is `name` which isn't in areaKeys.)
2. add `area=yes` if user is drawing an area but the preset can be an
area or a line (e.g. `barrier=city_wall`)
3. remove `area=yes` when switching to another preset
2015-04-22 17:04:18 -04:00
John Firebaugh
d381812f96
Add area=yes when necessary
...
Example: highway=pedestrian areas.
Fixes #2069
2014-01-03 12:46:50 -08:00
John Firebaugh
d1b4e04ee4
Don't add addr:housenumber=yes when applying Address preset ( #1874 )
2013-10-09 16:35:12 -07:00
John Firebaugh
6cdd928ea3
Default wildcard tags to "yes"
...
Fixes #1715
2013-08-22 14:30:27 -07:00
John Firebaugh
4bdd49b5fc
Adjustments to multipolygon preset
...
* It shouldn't appear as a search result for simple areas.
* Changing to another area preset shouldn't remove the
type=multipolygon tag.
* It shouldn't be preferred to the Building preset, which
matches with score 0.5.
Fixes #1546 .
2013-05-29 16:00:34 -07:00
John Firebaugh
a61e0c9fd4
Fix preset search
2013-05-24 17:17:41 -07:00
John Firebaugh
5868875833
Split "other" preset into geometry specific fallbacks
...
This way the name and icon can be geometry-specific.
2013-05-24 11:14:59 -07:00
John Firebaugh
9502729f5e
Optimize presets.match
...
Previous implementation was linear in the number of
presets. This should be near constant time.
2013-05-13 21:07:26 -07:00
John Firebaugh
525d37c647
Preset#matchTags -> Preset#matchScore
2013-05-13 17:48:18 -07:00