Commit Graph

24 Commits

Author SHA1 Message Date
Quincy Morgan 49526a7a67 Fix JS error upon changing addablePresetIDs after initial load
Accept addablePresetIDs as an array
Add code tests for invalid preset IDs in addablePresetIDs
2020-06-02 11:19:30 -04:00
Quincy Morgan 78a4b75e55 Fix regression where explicit addable presets were not populating the default preset list 2020-05-28 16:16:35 -04:00
Quincy Morgan 90b1395df4 Fix code tests 2020-04-01 13:27:30 -07:00
Quincy Morgan 60f7dc7c0b Replace presets property of context with singleton
Remove utilPreset
2020-04-01 13:08:45 -07:00
Quincy Morgan a1af118f0e Ensure locales and presets are loaded before the UI loads (close #7406)
Consolidate localization behavior and init to a coreLocalizer function and singleton
Explicitly support `en-US` locale
Rename coreData to coreFileFetcher and export a singleton rather than using a property of coreContext
Add `apiConnections` property of coreContext to simplify adding a source switcher
Replace some init functions with re-callable, promise-supporting `ensureLoaded` functions
Make coreContext itself load the UI if a container has been specified at init time
Fix code tests
2020-03-31 12:23:31 -07:00
Bryan Housel 2149692bee Make sure the addablePresetIDs can be reset back to null too 2020-02-07 12:55:16 -05:00
Bryan Housel 1155498766 Restore the addablePresetID feature 2020-02-07 12:06:59 -05:00
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 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 41355bf2a0 Rename "visible" property of presets to "addable" (re: a06ec59514b30a52601e3614ef69006d2dc1bc91) 2020-01-15 14:29:45 -05: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
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 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 f3e6459191 working on preset visibility 2018-12-13 11:16:24 -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 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