Commit Graph

22 Commits

Author SHA1 Message Date
Martin Raifer 6526d655f6 further tweak and add tests for last map location restore
see #9146
2022-07-19 13:04:44 +02:00
Bryan Housel b2d18d1ebe Fix hash tests in Chrome, avoid loading imagery tiles 2021-08-18 12:51:13 -04:00
Bryan Housel 33fab5580b Before calling init() make sure the assetPath is set
init kicks off building the ui, which can fetch spritesheets for the <defs>
The assetPath needs to be set otherwise these files will not be found
2021-08-16 22:06:42 -04: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 e19bcb77d5 Require init() call before coreContext starts doing things
(closes #7304)
2020-01-29 19:27:12 -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 99a3741b0c Better isolation of services, to avoid hitting network during test runs
1. All services are disabled in testing now to prevent network accesses
2. Only services are enabled when needed to test something
3. Many changes throughout code to allow iD to run with services disabled
   (e.g. check for osm service instead of assuming context.connection() will work)
4. Actually export the services so we can disable and enable them
2017-08-09 22:04:09 -04:00
Bryan Housel c18cc7577d Add flash test, avoid using sinon.useFakeTimers in tests.
sinon.useFakeTimers mocks setInterval, setTimeout, etc,
but not requestAnimationFrame, which d3 transitions rely on.
2017-02-11 00:19:49 -05:00
Bryan Housel 6ca4b13304 Store view transform and selectedIDs w/history, and undo/redo them
(closes #2204)
2016-12-10 23:25:58 -05:00
Bryan Housel f800e5afbc Remove unnecessary window parameter to Context 2016-11-10 15:19:03 -05:00
Bryan Housel af3db7ea36 Swap url hash map order to zoom/latitude/longitude
(closes #3554)
2016-11-10 09:56:20 -05:00
Bryan Housel 87950fd472 Fix lib export, flatten names in tests and docs 2016-10-04 21:56:09 -04:00
Bryan Housel 7ca6d06254 Replace iD global with iD.Context() module (#3254) 2016-07-19 10:15:32 -04:00
John Firebaugh dd0e08b244 Write presets and imagery to standalone files 2014-10-23 15:52:29 -07:00
John Firebaugh 0b1ec49402 Rewrite as a separate layer 2014-09-19 14:51:44 -07:00
Vladimir Agafonkin 831f4964aa fix build and tests, add missing methods to lodash build 2013-11-22 01:19:09 +02:00
Tom MacWright b1eef6ad0c Fix hash tests 2013-03-13 17:56:27 -04:00
Ansis Brammanis b8f3292c2b fix hash test 2013-03-05 11:18:36 -05:00
Tom MacWright f15191af2c Update tests 2013-02-09 18:06:35 -05:00
John Firebaugh 000ceb6467 iD.Context -> iD
All the UI setup code moved to iD.ui.
2013-02-01 12:40:15 -05:00
John Firebaugh 7e68e8e114 Add iD.Context
This is a facade interface that ties together a bunch of
different internal objects and will make it easier to write
tests for behaviors, modes, and operations.
2013-02-01 12:40:15 -05:00
John Firebaugh bbccec75be Convert Hash to a behavior 2013-01-31 18:28:24 -05:00